by needhelp » Wed Jan 23, 2013 1:28 am
Below is the JCL and the beginning of the easytrieve, the line number that gets the error is highlighted in red - the job statement. Actual file, program and field names have been changed. This is from the latest that I tried.
ddname 4 started with 'FILE ddname4 TABLE (300000)' and worked fine until I expanded the DESC from 39 2 N to DESC 20 21 A.
//stepname EXEC PGM=pgmname
//*
//SYSABOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SORTWK01 DD UNIT=WORK,SPACE=(CYL,(200,50),RLSE)
//SORTWK02 DD UNIT=WORK,SPACE=(CYL,(200,50),RLSE)
//SORTWK03 DD UNIT=WORK,SPACE=(CYL,(200,50),RLSE)
//EZTVFM DD UNIT=WORK,SPACE=(CYL,(200,50),RLSE)
//*
//ddname1 DD DSN=filename,DISP=SHR,
// AMP=('BUFNI=20','BUFND=10')
//ddname2 DD DSN=filename,DISP=SHR,
// AMP=('BUFNI=20','BUFND=10')
//ddname3 DD DSN=filename,DISP=SHR,BUFNO=30
//ddname4 DD DSN=flename,DISP=SHR,BUFNO=30
//*
//ddname5 DD DSN=filename,
// DISP=(,CATLG,DELETE),
// UNIT=WORK,SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=120,BLKSIZE=0,BUFNO=30)
//*
PARM LINK(pgmname R) ABEXIT SNAP DEBUG(STATE FLDCHK NOXREF) +
ENVIRONMENT (COBOL) LIST (PARM FILE) +
VFM (4096)
FILE ddname1 VS(NOVERIFY)
%EZcopy1
*
FILE ddname2 VS(NOVERIFY)
%EZcopy2
*
FILE ddname3 FB(40 0)
SUB-RECORD 1 18 N
SUB-KEY 1 18 N
SUB-f1 1 3 N
SUB-f2 4 15 N
SUB-f3 19 1 A
SUB-f4 20 3 N
SUB-f5 23 15 N
SUB-f6 38 1 A
SUB-f7 39 2 N
*
FILE ddname4 FB(40 0) VIRTUAL TABLE 300000
ARG 1 18 N
DESC 20 21 A
*
FILE ddnamre FB(120 0)
GM-RECORD 1 120 A
GM-f1 1 2 N
GM-f2 3 3 N
GM-f3 6 2 N
GM-f4 8 15 N
GM-f5 24 2 N
GM-f6 26 2 N
GM-f7 28 3 N
GM-f8 31 2 N
*
WS-KEY W 18 N
WS-table W 21 A
WS-table-f1 WS-table 3 N
WS-table-f2 WS-table +3 15 N
WS-table-f3 WS-table +18 1 A
WS-table-f4 WS-table +19 2 N
*
**
JOB INPUT (ddname3)
*
IF EOF ddname
STOP
END-IF
*
key-f4 EQ SUB-f4
key-f EQ 00
key-f5 EQ SUB-f5
*
READ ddname2 KEY key STATUS
IF FILE-STATUS(ddname2) NE 0
DISPLAY 'READ ERROR ON ddname2 - KEY = ' key STOP
END-IF
*
WS-KEY EQ SUB-KEY
*
SEARCH ddname4 WITH WS-KEY, GIVING WS-table
*