home about us   contact us
 
   







 


Chicago-Soft
ATTN: TSO Times
One Maple Street
Hanover, NH 03755
(603) 643-4002
information
@tsotimes.com

 

Using SAS as an Aid When Creating an MVS/Quick-Ref User Database

by Mike Shaw

Introduction and Overview
The user data base facility of MVS/Quick-Ref is a powerful and easy to use method of making reference text available for quick access under ISPF. In this article, we will discuss how MVS/Quick-Ref users can utilize the SAS system from SAS Institute as an aid in preparing input text for inclusion in an MVS/Quick-Ref user data base.

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
If SAS is installed at your site, you can use the SAS system to automatically create MVS/Quick-Ref key indicator records to use as input with text members from a partitioned data set (PDS). SAS includes as one of its capabilities a function called PROC SOURCE, which is used to unload a PDS to a sequential file. PROC SOURCE will also automatically precede each member of the PDS with a customized identification record that includes the member name. We can use this feature of PROC SOURCE to input an entire PDS (or part of a PDS) into an MVS/Quick-Ref user data base, without having to manually produce the required key indicator records.

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
In this article, we have seen how you can use the SAS PROC SOURCE procedure as an aid in loading an entire PDS (or part of it) for input into an MVS/Quick-Ref user data base, without having to edit the text records in the PDS or manually adding MVS/Quick-Ref key indicator records to the input file.

Mike Shaw is a senior software developer in the MVS/Quick-Ref product support group at Chicago-Soft, Ltd., in Vienna, VA.



The TSO Times is back by popular demand!
Register now for your FREE subscription









 

Chicago-Soft, LTD
ISPF Tools & Toys
MVS Help Board
Lionel Dyck's Tools
IBM ISPF Page
Tom Brennan's Vista tn3270 Page
Mark Zelden's MVS Utilities


 


 

home · current articles · archives · forums ·
· subscribe · about us · contact us · links