Previous Topic Next topic Print topic


Dynamic PDSs

In MSS, each member of a PDS is implemented as a separate physical PC file. By default, you have to create a separate catalog entry for each such member, giving the filename of the physical file. This is not practicable if a PDS has a great many members. You can avoid it by using a dynamic PDS.

To define a dynamic PDS you create just one catalog entry. On its Catalog Entry page in ESMAC, you set the DS Org field to PO and then put a check mark by Dynamic PDS. This enables the Physical Filename and PDS Exts fields. The value you enter in the Physical File field is assumed to be the name of an existing directory. The members of the PDS are implemented as individual physical files within this directory.

The Physical Filename field must end with a backslash ("\") on Windows or a forward slash ("/") on UNIX. As in any catalog entry, it must specify the full path. You can use the string "<CATALOGFOLDER>" to represent the directory where the catalog is stored.
Restriction: No other formats for the Physical Filename (for example paths containing an environment variable) are supported.

In the PDS Exts field you specify one or more filename extensions, separated by spaces. When a PDS member is created, the physical file is given a name consisting of the member's name as the basename, and the first entry in this field as the filename extension.

On UNIX, all member names used in a dynamic PDS must be upper case. Any file that uses a lower case member name will not be found.

Example

If you define a Catalog Entry with

Field Value
DS Name SOURCE.PDS
Physical File <CATALOGFOLDER>\PAYROLL\
DS Org PO
Dynamic PDS checked
PDS Exts CBL CPY

where the catalog folder is C:\CATALOG, and you then run the following JCL:

/FILE1	   DD DSN=SOURCE.PDS(PAYUPD),DISP=OLD
/FILE2	   DD DSN=SOURCE.PDS(PAYREP),DISP=OLD

(note DISP= OLD because SOURCE.PDS already exists), then this JCL creates physical files PAYUPD.CBL and PAYREP.CBL in directory C:\CATALOG\PAYROLL. It creates catalog entries for these individual PDS members (DSOrg = PDSM) automatically.

When a PDS member is being sought, the directory is searched for a file with the member's name plus each of the specified extensions in turn, and the first match is used. For example, if the directory contains PAYUPD.CBL, PAYUPD.CPY and PAYREP.CPY, then an attempt to access SOURCE.PDS(PAYUDP) will find PAYUPD.CBL. Because the search terminates once a match has been found, PAYUPD.CPY will never be found. An attempt to access SOURCE.PDS(PAYREP) will find PAYREP.CPY.

Previous Topic Next topic Print topic