Tools for Creating IMS Access Descriptors

Defining Access Descriptors

The SAS/ACCESS interface to IMS is different from other SAS/ACCESS interfaces in that it requires you to define the database in your access descriptor. Other SAS/ACCESS interfaces are able to query a data dictionary or another information repository to acquire detailed information about the database object that is being accessed.
Defining access descriptors for IMS databases can be time consuming because the data has to be entered manually. To automate this process, especially in cases where many access descriptors must be defined, there are several tools available for your use.


The COB2SAS tool uses the COB2SAS utility to process COBOL copybook database definitions and to store them in a permanent SAS data file. This data file is then processed by a DATA step program that is supplied in the installed prefix.SAMPLE PDS, called IMSS2A. The IMSS2A program processes the observations in the data file and generates most of the syntax required by the PROC ACCESS procedure statements that create an access descriptor for the database.
The generated statements are written to a host file (physical sequential or PDS member) where they can be edited. The statements written to the host file require some editing because the copybook file does not contain all the information that is necessary to create the access descriptor. You need to add DBD-specific information such as segment lengths, search and sequence field names, DBD name, DBTYPE, and segment names, in order to complete the code. You can then either submit the generated statements with JCL in a batch execution, or submit them from the SAS Program Editor window.
The COB2SAS tool is available from SAS free of charge for download from the World Wide Web, from an FTP site, or in the form of a mailer tape. This tool was originally designed to aid in converting COBOL file copybooks to INPUT statements for SAS DATA steps. For access descriptor creation, it is not necessary to complete all of the steps outlined in the COB2SAS usage instructions. Typically, after the copybook is processed, the results are stored in a temporary SAS file, which is then used to generate the INPUT statement. For IMS access descriptor creation, only the steps up to and including creation of the SAS file (dictionary file) are necessary. A modification is made to make the dictionary file permanent, and from there the IMSS2A program is used to complete the process.
Note that only steps R2COB1-R2COB5 are needed to create the dictionary file. Member R2MVS is the file to edit to make the dictionary a permanent file. R2MVS is also the main program that drives all of the other steps. It is well documented, and comments provide information about what each step does.
For more information about using the COB2SAS tool and about the IMSS2A sample program, look in the sample PDS for z/OS.

SAS Macro and DATA Step Code

The second tool was donated by a SAS user (Bruce Babbitt of New England Power Service Company). The tool consists of SAS macro and DATA step code that processes the database DBD directly. The benefit of this tool is that the file of generated PROC ACCESS code does not need further editing before being submitted for execution. This tool is available in the sample PDS for z/OS.