Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Empty Vsam File after Repro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Wed Oct 14, 2009 11:57 pm    Post subject: Empty Vsam File after Repro
Reply with quote

Recently in a batch job an empty VSAM file was created. The next step was a cobol program which failed on the VSAM file open. Are there parm I can code in the repro to instead of having an empty VSAM, move low-value to the key.

My card currently looks like this:

********************************* Top of Data ****
REPRO -
INDATASET(WABC.WD.GH.IJK.ERRF.XT) -
OUTDATASET(WABC.WD.LG.VRMB3Z0.ERRFILE)
******************************** Bottom of Data **

At execution of above, message read:

DC0005I NUMBER OF RECORDS PROCESSED WAS 0
DC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

Job went on to fail in the pgm OPEN of the vsam dataset:
******* FILE I/O ERROR

PROGRAM = VRMB3Z0
FILE NAME = IRM3Z0A
I/O OPERATION = OPEN
RECORD KEY =
ROUTINE LABEL =

FILE STATUS CODE = 35-UNKNOWN ERROR CODE
FILE FUNCTION CODE = 00000-NO FUNCTION CODE ERROR
FILE RETURN CODE = 00000-
FILE FEEDBACK CODE = 00000-NO FEEDBACK CODE ERROR


Thanks you for any assistance.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Thu Oct 15, 2009 12:01 am    Post subject:
Reply with quote

You cannot open a VSAM file for input until at least one record has been written to it. Doing a REPRO from an empty sequential file does not write a record to the VSAM file, hence does not count -- only writing a record to the VSAM file counts. You may immediately delete the record from the VSAM file, but the write has to be done first.

Your REPRO copied zero records, so presumably was from an empty file, so the VSAM file was not eligible to be opened for input.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 15, 2009 12:06 am    Post subject: Reply to: Empty Vsam File after Repro
Reply with quote

After the REPRO, you should always check the LASTCC value in an "IF" check.

I'm unsure what the LASTCC value would be for a REPRO without any records (maybe a 4?) in the INFILE, but once you determine an empty file LASTCC value, then REPRO a single "DUMMY" (existing) record, which resides on a different file, into the target OUTFILE and you should be OK.

The "DUMMY" record will be a site-dependent INITIALIZER record, containing valid values for all fields associated with the particular record-layout, so when the given subsequent program OPEN's and READ's this record, you won't have any trouble.

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 15, 2009 12:11 am    Post subject:
Reply with quote

Hello,

Or, you might create a permanent qsam file with one "dummy" record to use for the REPRO.

Some systems have one High-Values record in every VSAM file to deal with this.
Back to top
View user's profile Send private message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Thu Oct 15, 2009 12:14 am    Post subject:
Reply with quote

Thank you all. icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us