When the cobol converter of CA-EARL was used to convert a record description to a CA-EARL file definition the conversion is incorrect and incomplete.
Fields are missing and binary fields (COMP) are wrong.
Release : 6.1
Component : CA EARL
Download and apply APAR LU01621
To facilitate implementation of this feature the Appendix C required some changes. Please review these instructions and guidance.
Appendix C. COBOL Conversion Program
The EARLCNV1 program is a conversion aid used to create Advantage CA-Earl FILE
and DEFINE statements from COBOL source library entries.
The input to the conversion program may be any of the three following collections of
statements:
■ A complete COBOL program.
■ A collection of file descriptions and record descriptions.
■ A record description starting with the 01 level data description entry.
C.1 Executing EARLCNV1
The utility will process multiple input source decks created under the following
conditions:
On non-SP VSE systems, the source decks are created by the SSERV utility using the
PUNCH function. The input source books are separated by 'CATALS' control
statements. The output source books will contain 'CATALS' statements using the same
bookname but with the '0' sublibrary prefix. The output source books can be added to
a source statement library using the MAINT utility.
Under VSE/SP you must assign SYSPCH to disk and execute LIBR as follows:
EXEC LIBR, PARM = 'ACC SUB=xxx.yyy'
where xxx = library name and yyy = sublibrary name.
C-2
C.1.1 Sample JCL (VSE/SP)
_ $$ JOB JNM=CONV,CLASS=_
_ $$ LST CLASS=I
// JOB TESTING PACK CONVERSION
// PAUSE
// EXEC LIBR
ACC SUB=PRV.SORT72
CATALOG TESTCOMP.C
FD FILE1
RECORDING MODE IS V
LABEL RECORDS ARE OMITTED.
_1 REC-1.
_2 CUST-NAME PIC X(2_).
_2 CUST-ADDR PIC S9(4) USAGE COMP .
_2 CODE-IN PIC X(5).
_2 FIELD-D PIC S9(8) COMP.
_2 FIELD-XX PIC S9(8) COMP.
_2 FIELD-YYY PIC S9(8) COMP.
_2 FIELD-E PIC XXX.
/+
/_
// DLBL IJSYSPH,'BARB.PUN.FILE',_
// EXTENT SYSPCH,SORT62,1,_,18_,1_
ASSGN SYSPCH,DISK,VOL=SORT62,SHR
// EXEC LIBR
ACC SUB=PRV.SORT72
PUNCH TESTCOMP.C
/_
// JOB AAA
CLOSE SYSPCH,PUNCH
_ STEP2 CONVERSION
// ASSGN SYS__4,DISK,VOL=SORT62,SHR
// DLBL UIN,'BARB.PUN.FILE',,SD
// EXTENT SYS__4,SORT62
// DLBL UOUT,'BARB.COB2.EARL',,SD
// EXTENT SYS__4,SORT62,1,_,19_,1_
// EXEC EARLCNV1,SIZE=256K
BOOK=TESTCOMP,
INPUT=DISK,
OUTPUT=DISK,
HYPHEN=NULL
/_
/&
// JOB MOVE BOOKS BACK TO SLB
// DLBL IJSYSIN,'BARB.COB2.EARL',,SD
// EXTENT SYSIPT,SORT62
ASSGN SYSIPT,DISK,VOL=SORT62,SHR
// EXEC LIBR,PARM='ACC S=PRV.SORT72'
/_
CLOSE SYSIPT,READER
/_
/&
// JOB PUNCH THE BOOKS
// EXEC LIBR
ACC SUB=PRV.SORT72
LIST TESTCOMP._
/_
/&
Appendix
C.1.2 Sample JCL (MVS)
On MVS systems, the source decks are created by the IEBPTPCH utility using the
PUNCH function. The input source decks are separated by 'MEMBER NAME' control
statements. The output source decks will contain './ ADD NAME=' control statements
using the same member name as the input. The output source members can then be
added into an Advantage CA-Earl copy library using the IEBUPDTE utility.
The following conversion program converts COBOL to EARL in MVS systems:
//COMPGO EXEC PGM=EARLCNV1,REGION=0M
//STEPLIB DD DSN=EARL.LINKLIB,DISP=SHR
//SYSPRINT DD SYSOUT=A,DCB=(LRECL=133,BLKSIZE=133,RECFM=F)
//SYSUT1 DD DSN=COBOL.LIB(MEMBER)
//SYSUT2 DD SYSOUT=B,DCB=(RECFM=F,BLKSIZE=8_)
//SYSUDUMP DD SYSOUT=A
// SYSIN DD _
MEMBER=
/_
//
C.2 Processing of COBOL Statements
C.2.1 File Description Statements
The program will process FILE-CONTROL SELECT statements and FILE SECTION statements if present in the
input deck. It will create Advantage CA-Earl FILE statements with as much information as is available.
If an FD statement is missing the RECORD clause and has more than one 01 record, the 01 record with the largest length must be the first to follow the FD statement.
The output may have to be altered if insufficient information is available (for example,
if there are no SELECT statements).
FILE-CONTROL section
C.2.2 Record Description Statements
The program will process FILE SECTION data description entries starting with level 01. The
conversion utility will generate an Advantage CA-Earl DEFINE statement for each
group and elementary data item. It supports the following features:
■ Level 01 through 49 data description entries.
■ Data names of up to 30 characters are supported. However, there is an Advantage
CA-Earl restriction that the first 18 characters must be unique.
■ The OCCURS clause is supported for elementary items. When the OCCURS
clause appears as a group item, the utility will generate a field for the group item
using the total length of its subservient elementary items.
■ The following PICTURE clause characters are supported:
A and X for alphanumeric items
S, V, Z and 9 for numeric items
The conversion utility uses the PICTURE clause to determine the size and
precision of the input field. It does not attempt to create an Advantage CA-Earl
PICTURE statement for editing numeric items. The following USAGE clause
formats are supported:
DISPLAY
COMP
COMP-3
PACKED-DECIMAL
BINARY
■ The COBOL VALUE clause specified in the file section is not supported and will be ignored.
■ The COBOL SYNC option specified in the file section is not supported and will be ignored.
■ The COBOL PIC clause option SIGN LEADING is not supported and will be ignored.
■ The COBOL FILLER name is not generated in the Earl DEF output. The length associated with the FILLER statement will be included in length calculation.
C.2.3 Control Statements
Any combination of the following control statements can be submitted to EARLCNV1
in a SYSIN dataset. (If no control statements are needed, you must specify SYSIN DD
DUMMY in your JCL.)
EARLCNV1 control statements start in any column, and the keywords may be
submitted in any order, separated by commas. Keywords may be omitted if the default
is to be taken. The control statement is terminated by a space following the last
keyword. Statements may be continued by coding a comma following the last
keyword on the line. If a keyword is specified more than once, the value taken is the
last occurrence.
BOOK=copybookname (VSE)
where:
copybookname Is the user-supplied name for the Advantage CA-Earl output
copybook created by the conversion program.
Default: The input COBOL copybookname (supplied on the
CATALS statement) will be used.
MEMBER=membername (MVS)
where:
membername Is the user-supplied name for the Advantage CA-Earl output
copybook created by the conversion program.
Default: The input COBOL copybookname (supplied on the
MEMBER statement) will be used.
INPUT= { TAPE (DOS/VS(E)) }
{ DISK }
Specifies the input device for the conversion program. Valid options for this parameter
are TAPE or DISK.
Default: The program will use the assignment for SYS004 to determine the device
type.
OUTPUT= { TAPE (DOS/VS(E)) }
{DISK }
Specifies the input device for the conversion program. Valid options for this parameter
are TAPE or DISK.
Default: The program will use the assignment for SYS004 to determine the device
type.
HYPHEN=a or NULL
where:
a represents a valid Advantage CA-Earl character to replace the
hyphens in the COBOL data names. NULL forces EARLCNV1 to
exclude all hyphens when formatting the Advantage CA-Earl field
name.
Default: If the parameter is omitted, the utility will use the
underscore character(_).
Examples:
COBOL name Advantage CA-Earl name
HYPHEN=NULL ANNUAL-SALARY ANNUALSALARY
HYPHEN=Q ANNUAL-SALARY ANNUALQSALARY
HYPHEN=_ ANNUAL-SALARY ANNUAL_SALARY
Default ANNUAL-SALARY ANNUAL_SALARY
USEREXIT=modulename
where:
modulename Is the name of a module cataloged in the core image library (VSE)
or link-edited to a load library (MVS) with a member name
corresponding to module name, or is a TEXT file in CMS.
The user exit provides a facility to alter the Advantage CA-Earl field
names before they are written to the output file.
Default: None.
PRINT=ALL
causes a side-by-side listing of the COBOL input and the resulting EARL output to be
produced.
If PRINT= is specified with an operand other than ALL, it is ignored.
Default: No listing is printed.
C.1 Executing EARLCNV1
The utility will process multiple input source decks created under the following
conditions:
On non-SP VSE systems, the source decks are created by the SSERV utility using the
PUNCH function. The input source books are separated by 'CATALS' control
statements. The output source books will contain 'CATALS' statements using the same
book name but with the '0' sublibrary prefix. The output source books can be added to
a source statement library using the MAINT utility.
Under VSE/SP you must assign SYSPCH to disk and execute LIBR as follows:
EXEC LIBR, PARM = 'ACC SUB=xxx.yyy'
where xxx = library name and yyy = sublibrary name.
CALU014E Table name is out of space
Explanation: Internal program error. The internal table name is out of space.
User Response: Contact product support
CALU015E Table name POP failed. No data found
Explanation: Internal program error. A request for data from internal table name found not data to return.
User Response: Contact product support
CALU016E routine name failed to find search data
Explanation: Internal program error. A request to find search data in routine name failed to find any results.
User Response: Contact product support