Select the View for which a COBOL copybook is to be generated using the PARM field of the JCL used to invoke the program. The PARM field is also used to define a prefix to apply to generated COBOL data names and to generate a tableBASE COMMAND-AREA. An example of the specification of these parameters is shown below.
//STEP1 EXEC PGM=TBCOBFD,REGION=256K,PARM=‘view,fldprfx,Y’
The parameters are positional. The first parameter, VIEW, must be defined. The parameters have the following meanings:
This first parameter defines the name of the View for which a COBOL copybook is to be generated.
This second parameter is used to alter the field names of the generated copy books. If this parameter is not specified, the generated field names will be prefixed by the name of the View selected; otherwise, they will be prefixed by the value specified for this parameter. This parameter has a maximum length of eight characters.
The third parameter controls the generation of the tableBASE COMMAND-AREA. It may have either of two values:
- Y, to generate the tableBASE COMMAND-AREA for this View. Y is the default.
- N, to avoid the generation of the tableBASE COMMAND-AREA for this View.
The COMMAND-AREA will be generated as a level 01 item immediately following the table ROW-AREA.
The following JCL example will generate a copybook for the PAYROLL View. The generated field names will begin with the characters HR. A tableBASE COMMAND-AREA will be generated. The View is read from MAINLIB. The View is written to the DSN assigned to CBLOUT. TBCOBFD always returns a condition code of zero.