Passing Data From JCL to COBOL

Just TERADATA
Just TERADATA

From JCL we can pass data into COBOL program many ways. One is through PARM (maximum limit is 100 bytes), second through Input file, third through SYSIN card.

The data that we passed from PARM and SYSIN are passed to LINKAGE SECTION. In LINKAGE section we need to give 2 bytes extra to store length, and next we need to give actual size of the data.

LINKAGE SECTION.

01 PARMDATA.

05 STRINGLEN PIC 9(4) USAGE COMP.

05 STRINGPARM PIC X(80).

PROCEDURE DIVISION USING PARMDATA.

IF STRINGLEN > 0 . . .

The logic tests that if string-len is greater than zero, we can validate the data from JCL.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.