View previous topic :: View next topic
|
Author |
Message |
queryman
New User
Joined: 28 Nov 2011 Posts: 3 Location: India
|
|
|
|
Hi,
I am getting the error "IDC3351I ** VSAM OPEN RETURN CODE IS 160" in one of the step of my job to take the bake up of the input VSAM file.As error code showed, my input file is empty and so the error is coming.
But since last 3 runs the input file were empty and it did not abend.I checked the history of the job and found that sometimes the input file was empty and job went fine and some time it abended with the RETURN CODE 160.
Can anybody please help me in understanding the behavior of the code 160?
Thanks and regards,
Pallabi |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you are going to bake the input file, take the dog out of the oven first :-)
You'll have to do some digging into your job logs. Is the file delete/defined somewhere in the run? How does it become "empty"? Have you looked up the message with the 160, and what did you understand by it? Have you googled for suspects and information? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What are you using to perform the backup
What are the full messages and codes issued. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
But since last 3 runs the input file were empty and it did not abend.I checked the history of the job and found that sometimes the input file was empty and job went fine and some time it abended with the RETURN CODE 160.
|
/sarcasm on/
Oh yeah, computers are like that: one time doing one thing and the next, doing something else.
/sarcasm off/ |
|
Back to top |
|
|
queryman
New User
Joined: 28 Nov 2011 Posts: 3 Location: India
|
|
|
|
Hi,
I have used the IDCAMS utility to take the back up of the file.The job step is:
//STEP2 EXEC PGM=IDCAMS
//DD1 DD DSN=INPUT.DATASET,DISP=SHR,
// AMP=(‘BUFNI=04,BUFND=12’)
//DD2 DD DSN=BACKUP.DATASET(+1),DISP=(.CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(25,10)),
// DCB=(RECFM=FB,LRECL=40,BLKSIZE=0,BUFNO=15)
//SYSIN DD DSN=PARMLIB.DATASET(COPYMEM),DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
The error message shows as:
.IDCAMS SYSTEM SERVICES
.
.REPRO INFILE(DD1)-
. OUTFILE(DD2)
.IDC3300I ERROR OPENING INPUT.DATASET
.IDC3351I **VSAM OPEN RETURN CODE IS 160
.IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
.IDC3003I FUNCTION TERMINATED.CONDITION CODE IS 12
.
IDC0002I IDCAMS PROCESING COMPLETE.MAXIMUM CONDITION CODE WAS 12
But the same step did not abend in other run while input file was with 0 records.The SYSPRINT message is:
.IDCAMS SYSTEM SERVICES
.
.REPRO INFILE(DD1)-
. OUTFILE(DD2)
.IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
.IDC0001I FUNCTION COMPLETED.HIGHEST CONDITION CODE WAS 0
.
IDC0002I IDCAMS PROCESING COMPLETE.MAXIMUM CONDITION CODE WAS 0
PS:The input file got created in differnt job where some times no records to put.
Thanks and regards,
Pallabi |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
VSAM distinguishes between an empty file and a file with no records in it. An empty file is a file that has been created but has never been opened for output and had records placed in it. Once a VSAM file is opened and at least one record placed in it, the file is no longer empty -- even if the record is then immediately deleted.
The 160 means, most likely (any other reason could indicate serious problems with your system that your support group probably would be addressing already), that the VSAM file you are attempting to open for input is empty. VSAM does not allow an empty file to be opened for input or I-O processing, period.
So the answer to your problem is to make sure that the input VSAM file has had at least one record written to it, even if that record is then deleted. If you wish to claim that another job did not get the IDC3351I message with return code 160, that is entirely possible -- because the input VSAM file was not empty at the time that job executed. This does NOT change the fact that your job execution failed for an empty VSAM file. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
then your problem is not empty file, but un-initilized file.
all of your delete/defines should be followed by an initialization.
write a record, delete the record.
then process with your program.
but, do you really want to be backing-up empty files?
if so, add the initialization process to all of your delete/defines
then you will get clean backups of empty files.
but if you do not want to back-up empty files,
precede the repro step with a PRINT(1)
and if that bombs, then skip the repro step.
depends on what you want to do,
but, i imagine the 160 is coming based on the initialization (lack of).
and as usual, i am slow, Robert was here first, but i am here last |
|
Back to top |
|
|
queryman
New User
Joined: 28 Nov 2011 Posts: 3 Location: India
|
|
|
|
Thanks All !!!
I understood the problem with code 160.For the time I will include the initialisation of the input dataset to rectify the abend.
For taking the back up of empty input file, I will analyse a bit more whether back up is needed or not for every run, regardless of file has record or not.
Thanks and Regards,
Pallabi |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
google VSAMINIT for an initialisation job |
|
Back to top |
|
|
|