|
|||||||||||
|
Chicago-Soft
|
Using SAS as an Aid When Creating an MVS/Quick-Ref User Database by Mike Shaw Introduction and
Overview As MVS/Quick-Ref users know, just about any text that fits within 78 columns or less can be stored in an MVS/Quick-Ref user data base. Each set of text records that comprises an item to be stored in a user data base must be preceded by a record that tells the MVS/Quick-Ref user data base creation program what item name to store the reference text under. This record is called a "key indicator record" and is normally inserted by the person preparing the user data base input file. Key indicator records contain an uppercase "K" in column one, a one or two-character topic indicator in columns two through three, and a one to fourteen character item name starting in column five. Using SAS
Consider the JCL below: //JS10 EXEC SAS,SORT=1,WORK='2,1' //SYSPRINT DD SYSOUT=* //SYSIN DD * PROC SOURCE INDD=PDS OUTDD=SEQDS; BEFORE ‘K02 XXXXXXXX’ 5; //PDS DD DSN=input.text.file // DISP=SHR //SEQDS DD DSN=output.text.file, // DISP=(,CATLG),UNIT=SYSDA, // SPACE=(TRK,(30,30),RLSE) In this JCL, PROC SOURCE is used to unload a PDS to a sequential output data set. The BEFORE control statement following the statement invoking PROC SOURCE in the SAS input file is used as a skeleton in creation of a single record that precedes each member’s records in the output file. The member name is substituted for the ‘XXXXXXXX’ string in the output record created. For example, if the PDS input file contained two members named JCLRULES and TAPERULS, then the two members would be unloaded by the JCL above and each member’s set of records would be preceded in the output file by a generated key indicator record. Member JCLRULES’s contents in the output file would be preceded by a record that looks like this: K02 JCLRULES and member TAPERULS’s contents in the output file would be preceded by a record that looks like this: K02 TAPERULS The output file written to the SEQDS DD statement would therefore look like this: K02 JCLRULES
member JCLRULES record 1
member JCLRULES record 2
...
member JCLRULES record n
K02 TAPERULS
member TAPERULS record 1
member TAPERULS record 2
...
member TAPERULS record n
The sequential output file produced, with key indicator records inserted automatically into it by PROC SOURCE, is ready for input to the MVS/Quick-Ref user data base creation job via the DATAIN file. An example of user data base creation JCL can be found in member QWUSER in the MVS/Quick-Ref JCL data set. Please note that the member name of each member in the input PDS processed is used as the item name under which that member’s contents are stored in the created user data base. If this will be acceptable for your input data, then you can use PROC SOURCE for this purpose. The '02' in columns two through three of the generated key indicator records is the topic indicator for the item name on that record. The '02’ value is arbitrary; you can use whatever two-character topic indicator you have chosen for your user data base for the items from the PDS being unloaded. The PROC SOURCE procedure also supports a SELECT statement that can be used to only unload selected members of the PDS, rather than the entire PDS, if this is desired. Summary
Mike Shaw is a
senior software developer in the MVS/Quick-Ref product support group at
Chicago-Soft, Ltd., in Vienna, VA. |
|
||||||||
home · current
articles
· archives · forums · |