Creating a copybook from a Z Data Tools/Db2 Template
ZDT/Db2 provides a sample REXX exec (HFM2CPYB) that you can use to create a PL/I or COBOL copybook from a Z Data Tools/Db2 template.
To run the exec:
- Copy HFM2CPYB from the sample library SHFMSAM1 to a REXX library allocated to your TSO session (for example, SYSPROC or SYSEXEC).
- Issue the statement:
Where:HFM2CPYB input_file output_file copybook_type
- input_file
- The name of a Z Data Tools/Db2 template. This is typically a member of a partitioned data set.
- output_file
- The name of an LRECL=80 sequential file, or member of a partitioned data set. The output file contains the copybook derived from the template. Any existing data in the sequential file or member is overwritten.
- copybook_type
- This parameter is optional. It specifies the type of copybook to be produced.
Valid values are:
- COBOL
- COBOL copybook created.
- PLI
- PL/I copybook created.