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
 

 

Reading a ksds file with alternate key

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

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Sat Feb 03, 2007 12:02 am    Post subject: Reading a ksds file with alternate key
Reply with quote

hi

i am reading a ksds file with alternate key. here is the following.

*** WS-NUM is my alternate key.

MOVE 100 TO WS-NUM
START VSAMFILE KEY IS EQUAL TO WS-NUM.

PERFORM UNTIL WS-VSAM-STATUS = '00'
PERFORM READ-VSAMFILE
END-PERFORM.


READ-VSAMFILE.
READ VSAMFILE NEXT.
IF WS-VSAM-STATUS = '00' OR '02'
CONTINUE
ELSE
PERFORM ERROR-PARA
END-IF.

Kindly let me know if i am doing right....and checking for the right statuses.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Feb 03, 2007 12:49 am    Post subject:
Reply with quote

FS 00 normal and FS 02 more coming, but what about FS 10 no more available?
Back to top
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Sat Feb 03, 2007 3:04 am    Post subject: hi
Reply with quote

as far as i understand...if there are more records with that alternate key then the vsam status code would be '02' and when the final one is reached the status code would be '00' which indicates no more available with that alternate key...hope i am right.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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