MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
MFdigger Beginner Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Thu Jan 08, 2009 9:01 am Post subject: A001- File Open Error - SYSIN while running Easytrieve PGM
Hi,
I'm not very much familier with Easytreive, I'm facing with FILE OPEN ERROR while executing my program
I'm trying to read a VB file
and I have defined the file as below in my program
FILE SENDIN
IN-FILEI 01 12196 A
IN-CCD 01 01 A
IN-D 35 02 A
I-RD 51 01 A
and output file as below
FILE SENDOUT
OUT-FILEO 01 12196 A
Input file is a very big VB file as defined above but I want to read only 3 fields.
Not sure if I have defined the INPUT FILE wrong in the program ,coz its a VB file, I'm facing with FILE OPEN ERROR
Could someone please help me out
Thank you
_________________ Tx
Digger
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Jan 08, 2009 9:46 am Post subject:
what kind of 'file open error'? _________________ Dick Brenholtz
American living in Varel, Germany
Back to top
MFdigger Beginner Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Thu Jan 08, 2009 10:37 am Post subject:
Hi Dick brenholtz
Below is the error message showing in SYSOUT
IEF237I JES2 ALLOCATED TO SYSUDUMP
*******A001 FILE OPEN ERROR - SYSIN _________________ Tx
Digger
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Jan 08, 2009 10:50 am Post subject:
is not the file in error SYSIN? _________________ Dick Brenholtz
American living in Varel, Germany
Back to top
MFdigger Beginner Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Thu Jan 08, 2009 3:38 pm Post subject:
Yes, its the file which is in error defined in SYSIN _________________ Tx
Digger
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Jan 08, 2009 5:35 pm Post subject:
MFdigger ,
SYSIN is where you code the program. Make sure that you have the program instream or in an existing pds member. If you running a compiled load module you wouldn't have got this error. Since your input files are VB you need VB on file definitions also.
This is how your program should look like
untested code
Code:
//STEP0100 EXEC PGM=EZTPA00
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SENDIN DD DSN=INPUT vb FILE,
// DISP=SHR
//SENDOUT DD DSN=OUTPUT FILE,
// DISP=..
//SYSIN DD *
FILE SENDIN VB(12196 0)
IN-FILEI 01 12196 A
IN-CCD 01 01 A
IN-D 35 02 A
I-RD 51 01 A
FILE SENDOUT VB(12196 0)
OUT-FILEO 01 12196 A
JOB INPUT (SENDIN)
IF IN-CCD = 'A' AND IN-D = 'BB' AND I-RD = 'C'
PUT SENDOUT FROM SENDIN
END-IF
/*
Back to top
MFdigger Beginner Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Fri Jan 09, 2009 9:57 am Post subject: File open error
Hi Kolusu
Thank you for the details.
I have tried the same way as you mentioned, but still facing with the same error ' *******A001 FILE OPEN ERROR - SYSIN'
Code:
//K1111C1 JOB (0,1134),'XXXXXXX',
// NOTIFY=k123411,MSGCLASS=D,MSGLEVEL=(1,1)
//*=====================================================================
//STEP001 EXEC PGM=EZTPA00
//SYSSNAP DD SYSOUT=*
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//SENDIN DD DSN=INPUT.VB.FILE1,
// DISP=SHR
//SENDOUT DD DSN=OUTPUT.VB.FILE2,
// DISP=(,CATLG,CATLG),
// DCB=(MODEL,BLKSIZE=32000,LRECL=12200,RECFM=VB),
// SPACE=(CYL,(10,20),RLSE)
//SYSIN DD *
FILE SENDIN VB(12196 0)
IN-FILEI 01 12196 A
IN-CCD 01 01 A
IN-D 35 02 A
IN-RD 51 01 A
FILE SENDOUT VB(12196 0)
IN-FILEO 01 12196 A
JOB INPUT (SENDIN)
MOVE IN-FILEI TO IN-FILEO
IF IN-CCD = 'ABC'
PUT SENDOUT
ELSE
IF IN-D = '14'
PUT SENDOUT
END-IF
IF IN-RD = 'KL'
PUT SENDOUT
END-IF
/*
Below is the SYSOUT
Code:
IEF236I ALLOC. FOR KXXXXX STEP001
IEF237I JES2 ALLOCATED TO SYSSNAP
IGD103I SMS ALLOCATED TO DDNAME STEPLIB
IGD103I SMS ALLOCATED TO DDNAME SYSIN
IGD103I SMS ALLOCATED TO DDNAME SENDIN
IGD101I SMS ALLOCATED TO DDNAME (SENDOUT )
DSN (XXXX.XXXX.XXX)
STORCLAS (XXXX) MGMTCLAS (XXXX) DATACLAS (XXXXX)
VOL SER NOS= XXXX
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO SYSOUT
IEF237I JES2 ALLOCATED TO SYSUDUMP
*******A001 FILE OPEN ERROR - SYSIN
IEF142I XXXXXE STEP001 - STEP WAS EXECUTED - COND CODE 0016
IEF285I XXXXXX.XXXXXX.XXXXXX.D0000101.? SYSOUT
IGD104I EASYTREV.LOADLIB RETAINED, DDNAME=STEPLIB
IGD104I xxxxxx.xxxxx.PARMLIB RETAINED, DDNAME=SYSIN
IGD104I XXXX.XXXX.SRT RETAINED, DDNAME=SENDIN
Please advice.
Thank you
_________________ Tx
Digger
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Jan 09, 2009 11:28 am Post subject:
MFdigger ,
No. You did NOT run the job with instream program. Looks like your program is in a parmlib. The JES messages clearly shows you that you are using a dataset
Code:
IGD104I xxxxxx.xxxxx.PARMLIB RETAINED, DDNAME=SYSIN
If you are using a pds as input make sure that you have the member name correct and the PDS has an LRECL of 80 and RECFM of FB. Ideally your JCL should look like this
Code:
//STEP001 EXEC PGM=EZTPA00
//SYSSNAP DD SYSOUT=*
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//SENDIN DD DSN=INPUT.VB.FILE1,
// DISP=SHR
//SENDOUT DD DSN=OUTPUT.VB.FILE2,
// DISP=(,CATLG,CATLG),
// DCB=(MODEL,BLKSIZE=0,LRECL=12200,RECFM=VB),
// SPACE=(CYL,(10,20),RLSE)
//*
//SYSIN DD DSN=xxxxxx.xxxxx.PARMLIB(MYPGM),
// DISP=SHR
And also there is no need to have that many IF statements . you can just do it with a single IF statement.
xxxxxx.xxxxx.PARMLIB(MYPGM), will contain this
Code:
FILE SENDIN VB(12196 0)
IN-FILEI 01 12196 A
IN-CCD 01 01 A
IN-D 35 02 A
IN-RD 51 01 A
FILE SENDOUT VB(12196 0)
JOB INPUT (SENDIN)
IF IN-CCD = 'ABC' OR IN-D = '14' OR IN-RD = 'KL'
PUT SENDOUT FROM SENDIN
END-IF
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum