The Copybook entity
With this entity, you can obtain Data Structure descriptions in COBOL and generate them in a file. Each description is stored in a COBOL source library and can be integrated into programs with the COPY statement.
A single Data Structure can be used to generate various descriptions. Each description is adapted to a particular purpose in the calling program. It can be integrated into the FILE SECTION or in the WORKING-STORAGE SECTION, depending on the parameters you enter.
To indicate all the parameters that are required to generate each description, you must create and describe a Copybook. The Copybook generates the description of the Segments of the Data Structure in an SQL format or not, according to the generation option that is selected when the Copybook is created. You indicate the values of the parameters in the Copybook or in the DATA or DATASQ Input Aid that is called in the Data Structure -GC Lines.
You must then generate the Copybook from the Design Explorer view or the generation command line. The generation produces a file with a .cpy extension under the Copybook instance. If you double-click the file, it opens in the standard COBOL editor.
However, you can also open it in the specific PDP COPY editor. To do so, right-click the file and select . You will then be warned of any desynchronization between the generated code and the design.
Two sample descriptions of a Data Structure are available. One is generated in the FILE SECTION and the other is generated in the WORKING-STORAGE SECTION.