1.  Sequential files: S.NO. File Status 1 Attempt to read from a file after reaching EOF. 10 2 Attempt to open a file that was earlier closed with LOCK option. 38 3 Attempt to open a file, which is already open. 41 4 Attempt to close a file that was not opened. 42 5 Attempt […]

Read More »

USE OF ARRAYS IN CLIST   Arrays are not supported by CLIST, but REXX has this option. In case you still want to use arrays in CLIST, find below the work around. SET NUM=1                               SET &ARRAY = &STR(&&ARRAY)              DO WHILE &NUM

Read More »

COBOL PERFORM WITH TEST AFTER

PERFORM WITH TEST AFTER UNTIL The following COBOL program depicts the use of  PERFORM WITH TEST AFTER UNTIL        01 WS-SUB   PIC 9 VALUE ZEROS.              PERFORM 20000-FIRST-PARA WITH TEST AFTER UNTIL WS-SUB=5              DISPLAY ‘PARA NAME IS  10000-FIRST-PARA’       

COBOL PERFORM WITH TEST AFTER Read More »

SORT JCL with OMIT

If you wish to exclude certain records which match a specific criteria.(Using OMIT) OMIT COND=((34,2,CH,EQ,C’AB’),AND,(74,1,CH,EQ,C’ ‘))  The above SORT card will exclude records which have ‘AB’ at 34th position and have spaces at 74th position. Example JCL is provided below. ; ; ; ; //SORTIN   DD DISP=SHR,DSN=USERID.ABC.INPFILE, //SORTOUT  DD DSN=USERID.ABC.OUTFILE, //      SPACE=(TRK,(30,10),RLSE),

SORT JCL with OMIT Read More »