IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What will happen if empty vsam file is opened for input


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jan 14, 2011 2:41 am
Reply with quote

Yup, went keylexic - wrong double-letter. . . and they're so close on the keyboard . . . icon_rolleyes.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Jan 14, 2011 2:43 am
Reply with quote

As soon as the program gains control, issue a CALL to IKJEFT01, building a PRINT INDATASET('YOUR.VSAM.FILE') COUNT(0) TSO command.

To make things easier, pass the DSN in a PARM card and let the program extract the DSN.

Upon return from IKJEFT01, if the LASTCC=0, then the file has data or had a record (or multiple records) written to it at one time and its/they've been deleted. It can then be opened as INPUT or I-O.

If the LASTCC=4, then the file is truly < EMPTY > and it needs to be opened as OUTPUT.

If the LASTCC is other than 0 and other than 4, then you've got other problems, such as the file is open/enabled to CICS.

You'll get several hundred hits for "IKJEFT01" when searched-for on all the IBMMAINFRAME forums.

You can experiment with the PRINT INDATASET('YOUR.VSAM.FILE') COUNT(0) TSO command after exiting ISPF, then followed by the Ready prompt and from here you can enter the command.

HTH....

Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 14, 2011 2:45 am
Reply with quote

I don't know ... I like the sound of

Quote:
When I read the post asking for __________ , I scrooled.
You can fill in the blank appropriately.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jan 14, 2011 2:53 am
Reply with quote

Quote:
Yup, went keylexic - wrong double-letter. . . and they're so close on the keyboard


Funny coincidence. I was just listening to NPR in my car and they were talking about funny "autocorrections" where the "smart" phone changes words you type to other words. They had some funny examples like changing Taos to Tacos, babe to baboon, and princess to primate. They said there's even a website dedicated to it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top