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.