This function builds a Predict file and linked fields from COBOL copy code (record description or a subordinate section without a level 01 entry). Up to 20 files can be built per session. The copy code may contain only the following:
File definitions. Each line may contain a maximum of one data definition.
Blank lines.
Comment lines. Comments are added to the last valid file or field object that is incorporated.
It is not possible to incorporate information from COBOL programs.
The information incorporated is stored in Predict file objects of type sequential and field objects.
This document covers the following topics:
The following resources are required for this function:
Natural workfile 1 (record format F or FB with record length 80, V or VB)
Natural workfile 2 (record format V or VB, record length at least 44).
In batch mode, the following additional resources are also required:
Natural report 1
Natural report 2
Natural report 3.
The Incorporate COBOL Copy Code
screen is called with function code I and object type code CO in any Predict
main menu or with command INCORPORATE COBOL
.
09:59:05 ***** P R E D I C T ***** 2007-05-31 Plan 0 - Incorporate COBOL Copy Code - File ID .......... Incorporation options Prefix .............. A- Decimal character ..* P Currency sign ......* $ Literal delimiter ..* ' List ...............* R Store ............... Y (Y,N) Replace ............. N (Y,N) Input type .........* W Compiler ...........* 7 Comment lines to ...* A RE-Group as Group ... Y (Y,N) |
Parameters | |||||||||
---|---|---|---|---|---|---|---|---|---|
File ID |
If file ID is not specified, level 01 entries on the workfile are interpreted as file IDs. A new file is created for each new level 01 entry. All other entries are interpreted as fields of these files. If file ID is specified, all entries on the workfile are interpreted as fields of this file. Level 01 entries are taken as groups. |
||||||||
Incorporation Options | |||||||||
Prefix | Prefix to be added to any field ID with an invalid initial character for a Predict object ID. See Naming Conventions in the section General Information in the Predefined Object Types in Predict documentation. Field IDs that are too long are truncated from the right. | ||||||||
Decimal character |
|
||||||||
Currency sign | The currency symbol in the PICTURE clause. Any currency symbol valid in COBOL can be used. The default is dollar. | ||||||||
Literal delimiter |
|
||||||||
List |
|
||||||||
Store |
|
||||||||
Replace |
|
||||||||
Input type |
|
||||||||
Compiler |
|
||||||||
Comment lines to |
|
||||||||
RE-Group as Group |
|
Command: INCORPORATE COBOL
Enter parameters on next line using positional or keyword form.
Field | Keyword | Position |
---|---|---|
File ID | FILE-ID | 1 |
Prefix | PREFIX | 2 |
Decimal character | DECIMAL-CHAR | 3 |
Currency sign | CURRENCY-SIGN | 4 |
List | LIST | 5 |
Store | STORE | 6 |
Replace | REPLACE | 7 |
Input type | INPUT-TYPE | 8 |
Literal delimiter | DELIMITER | 9 |
Compiler | COMPILER | 10 |
Comment lines to | COMMENT | 11 |
RE-Group as Group | RE-AS-GROUP | 12 |
The table below shows how COBOL data definitions are documented in Predict after incorporating COBOL copy code.
COBOL USAGE Clause | COBOL PICTURE Clause | COBOL Number of digits/bytes | Predict Format Length | Meaning * | For COBOL Compiler | ||
---|---|---|---|---|---|---|---|
BINARY | none | I | 2 | binary | WANG | ||
BINARY | P S V 9 | 1-4 | 2 | I | 2 | binary | WANG |
5-9 | 4 | I | 4 | ||||
10-18 | 8 | I | 8 | ||||
COMP | P S V 9 | 1-4 | 2 | I | 2 | binary | |
5-9 | 4 | I | 4 | ||||
10-18 | 8 | I | 8 | ||||
P or PS | nn.m | packed numeric binary | WANG | ||||
COMP-1 | not applicable | F | 4 | internal floating point short | |||
COMP-2 | not applicable | F | 8 | internal floating point long | |||
COMP-3 | P S V 9 | P or PS | nn.m | packed numeric binary | |||
COMP-4 | P S V 9 | 1-4 | 2 | I | 2 | binary | |
5-9 | 4 | I | 4 | ||||
10-18 | 8 | I | 8 | ||||
DISPLAY | AB | A | nnnnn | alphabetic | |||
DISPLAY | A * 9 | A | nnnnn | alphanumeric | |||
DISPLAY | A * 9 B 0 / | A | nnnnn | alphanum. for print | |||
DISPLAY | A P V Z 9 0 / , . + - CR DB * $ | P or PS | nn.m | numerical for print | |||
DISPLAY | P S V 9 | N or NS | nn.m | decimal external | |||
DISPLAY | E V 9 . + - | F | 8 | ||||
DISPLAY | V 9 for mantissa | 16 | F | 8 | floating point external | ||
DISPLAY | 99 for exponent | 2 | F | 8 | |||
INDEX | not applicable | not supported | Index | ||||
PACKED- DECIMAL | P S V 9 | P or PS | nn.m | packed numeric binary | 85 |
* See the respective COBOL language description for more information on the different data formats.