Creating a copybook from a File Manager/Db2 Template
FM/Db2 provides a sample REXX exec (FMN2CPYB) that you can use to create a PL/I or COBOL copybook from a File Manager/Db2 template.
To run the exec:
- Copy FMN2CPYB from the sample library SFMNSAM1 to a REXX library allocated to your TSO session (for example, SYSPROC or SYSEXEC).
- Issue the statement:
Where:FMN2CPYB input_file output_file copybook_type
- input_file
- The name of a File Manager/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.