![]() |
Override Default File Location ES_ALLOC_OVERRIDE Environment Variable |
| When technology complements business | Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| The SimoTime Home Page |
This example will focus on Micro Focus Enterprise Server and the Mainframe Sub-System (or ES/MSS). When a Region (or Server) is configured within Micro Focus Enterprise Server to run batch jobs (i.e. submit JCL) a default directory is defined and used for placement of new physical files that are allocate by a job. This is an example of how to catalog a new data set and override the base configuration and place the physical file in an alternate directory. The technique provides the capability to key off any portion of a catalog record to control the target directory where the physical files will reside.
This section describes the two simple tasks required to prepare to override the default file location within Enterprise Server.
The following is an example of a configuration file (CATMAPA1.cfg) that will place certain file in a directory other than the default directory specified within Enterprise Server.
# ---------------------------------------------------------------- # This example will focus on Micro Focus Enterprise Server and the # Mainframe Sub-System (or ES/MSS). When a Region (or Server) is # configured within Micro Focus Enterprise Server to run batch jobs # (i.e. submit JCL) a default directory is defined and used for # placement of new physical files that are allocate by a job. # This is an example of how to catalog a new data set and override # the base configuration and place the physical file in an # alternate directory.. The technique provides the capability to # key off any portion of a catalog record to control the target # directory where the physical files will reside. # # All keywords must be in UPPER case. # # Each rule can occupy only 1 line. Examples are below: # # The rules are applied to any new catalog record in the order # in which they occur in this file. The first rule that matches # upon an offset within the catalog record will be used. # # Note: To have the catalogs retain their portability it is a # good practice to keep the "SUBDIR" directories at the # same level or in directories that are children of the # directory containing the CATALOG.DAT file. In the # example below the CATALOG.DAT file may be located in # "C:\SimoSam1\DataLib1\". This is not an absolute # requirement. However, this will help with the # maintenance and support efforts. # # To enable set the following environment variable: # # ES_ALLOC_OVERRIDE=d:\dirname\CatMapA1.cfg # # The name of the configuration file can be any valid Windows # file name. In the following examples there is one rule that is # keying off the High Level Qualifier or HLQ (SIMOTIME.WRK1), # one that is keying off the fact that its a spool record, etc. # ---------------------------------------------------------------- # # Key off of the spool indicator OFFSET(313) VALUE(S) SUBDIR(<CATALOGFOLDER>\SPOOL) # Key off of the VOLUME value. # OFFSET(314) VALUE(CSIWRK) SUBDIR(C:\MVSP0030\VOLUME) # Key off of the DSORG # OFFSET(324) VALUE(VSAM) SUBDIR(C:\MVSP0030\VSAM) # Key off of the LRECL # OFFSET(469) HEXVALUE(0063) SUBDIR(C:\MVSP0030\LRECL99) # Key off of the first leftmost bytes of the dataset name OFFSET(1) VALUE(SIMOTIME.WRK1.) SUBDIR(C:\SimoSAM1\DataLibA\Wrk1) # Key off of the DATACLAS value. # OFFSET(449) VALUE(MFIDMFY) SUBDIR(C:\MVSP0030\DATACLAS) # ----------------------------------------------------------------
The location of the configuration file must be defined to Enterprise Server by setting the following environment variable.
c:\> set ES_ALLOC_OVERRIDE=d:\dirname\CATMAPA1.cfg
Note: The name of the configuration file can be any valid Windows file name.
This section describes the JCL Member to test the configuration of Enterprise Server and the Configuration File and and the expected results.
The JCL Member (ALOCATJ1.jcl) creates two files. The first file will be placed in an alternate directry based on information in the configuration file. The second file will be placed in the directory defined within Enterprise Server.The following is a listing of the contents of the JCL Member.
//ALOCATJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* ALOCATJ1.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by: SimoTime Enterprises * //* (C) Copyright 1987-2012 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create Sequential Data Sets on disk using IEBGENER. //* Author - SimoTime Enterprises //* Date - January 24, 1996 //* //* The first job step (QSAMDELT) will delete any previously created //* file. //* //* The second job step (QCRTDIN1) will create a new file and place //* the physical file into the alternate directory defined in the //* configuration file identified by the ES_ALLOC_OVERRIDE //* environment variable. //* //* The third job step (QCRTDIN2) will create a new file and place //* the physical file into the default directory defined within //* Enterprise Server. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 of 3, Delete any previously created files... //* //QSAMDELT EXEC PGM=IEFBR14 //FILEWRK1 DD DSN=SIMOTIME.WRK1.ALOCATDD,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //FILEWRK2 DD DSN=SIMOTIME.WRK2.ALOCATDD,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 3, Create and populate a new QSAM file... //* //QCRTDIN1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. //SYSUT1 DD * 11********************************************** 12*** This is a test for ES_ALLOC_OVERRIDE *** 13********************************************** /* //SYSUT2 DD DSN=SIMOTIME.WRK1.ALOCATDD, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //* //* ******************************************************************* //* Step 3 of 3, Create and populate a new QSAM file... //* //QCRTDIN2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. //SYSUT1 DD * 21********************************************** 22*** This is a test for ES_ALLOC_OVERRIDE *** 23********************************************** /* //SYSUT2 DD DSN=SIMOTIME.WRK2.ALOCATDD, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //
The following directories were used in this example.
The directory for the CATALOG.DAT was defined within Enterprise Server as C:\SIMOSAM1\DATA The Default Allocated Dataset Location was defined within Enterprise Server as C:\SIMOSAM1\DATA\APPL The directory for the SPOOL Files was defined in the configuration file as C:\SIMOSAM1\DATA\SPOOL The directory for the 1st data file was determined in the configuration file as C:\SIMOSAM1\DATA\WRK1 The directory for the 2nd data file was determined within Enterprise Server as C:\SIMOSAM1\DATA\APPL
The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This documents and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.
SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that is beyond the scope and purpose of this document.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.
Note: You must be attached to the Internet to download a Z-Pack or view the list.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
This document was created and is maintained by SimoTime Enterprises.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com
We appreciate hearing from you.
Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| Override Default File Location, ES_ALLOC_OVERRIDE Environment Variable |
| Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |