To override the default location used during the creation of datasets, you can configure Enterprise Server to consult a file containing rules that determine where new datasets are created.
You do this by setting the ES_ALLOC_OVERRIDE environment variable to the location of the "rules" file. Each rule in the file specifies: an offset from the beginning of the catalog record, a value that will be found at the offset in records for datasets that match the rule, and a directory in which the files for those datasets will be created.
For example, the following rule:
OFFSET(n) VALUE (MYSTRING) SUBDIR (C:\MYDIR\MYSUBDIR)
will allocate to C:\MYDIR\MYSUBDIR all files that contain the string "MYSTRING" at position n of the catalog record. The catalog structure is defined in the copyfile: mvscatlg.cpy. This is located in %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\source .
Each rule must occupy only 1 line and all keywords must be in uppercase. Rules are processed in the order that they appear in the file, and the first one that matches is the one that is used; that is, no further rules are consulted for that dataset.
Example rules file
# Key off of the spool indicator OFFSET(313) VALUE(S) SUBDIR(C:\MVSP0030\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 6 bytes of the dataset name OFFSET(1) VALUE(MFIDMF) SUBDIR(C:\MVSP0030\MFIDMF) # Key off of the DATACLAS value. OFFSET(449) VALUE(MFIDMFY) SUBDIR(C:\MVSP0030\DATACLAS)
OFFSET(313) VALUE(S) SUBDIR(<CatalogFolder>\SPOOL)
OFFSET(313) VALUE(S) SUBDIR($APPROOT\SPOOL)where APPROOT is the environment variable. The environment variable will be expanded before it is used in the pc dataset name field in the system catalog.