MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VSAM Processing in Batch Cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Tue Oct 04, 2005 5:25 am    Post subject: VSAM Processing in Batch Cobol Reply with quote

hi,
I've not used VSAM before, so can anyone help me with a example for batch , how is it different from coding a batch program which accesses a flat file,
any changes to be done in FD, JCL etc..

thanks
ganesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Oct 04, 2005 5:31 am    Post subject: Reply with quote

gans79,

Please search before posting. check these links

http://mvsforums.com/helpboards/viewtopic.php?t=221&highlight=vsam+processing

http://mvsforums.com/helpboards/viewtopic.php?t=2281&highlight=vsam+processing

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Oct 04, 2005 5:38 am    Post subject: Reply with quote

Gans79,

Your question is simple and basic, but it will take ages for anyone to explain you all the concepts in one post. Please go thro' the IBM COBOL Programming guide manual (Link is provided below). It provides extensive explanation along with good examples.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG20/1.10?DT=20040220035836

Code:

how is it different from coding a batch program which accesses a flat file,


Everything is different.
1. FD Section - You need to specify ORGANIZATION, ACCESS MODE, RECORD KEY along with the DD Name that you normally provide for a flat file.

2. READ Statement - Differs a bit from the normal READ for a flat file. You may need to use INVALID KEY and NOT INVALID KEY Phrases.

3. No changes in OPEN & CLOSE statements.

4. VSAM Files can be updated, deleted and new records could be inserted/appended. Whereas in a flat file, you cannot delete records.

5. As far as JCL declaractions are considered, if the VSAM is a input file then there is no difference b/w JCL for VSAM & JCL for a flat file. In case, your VSAM is a output file, then You should use either DISP=OLD or DISP=SHR. DISP=(NEW,CATLG) or (MOD,CATLG) won't work here. You actually have to create a VSAM file beforehand using IDCAMS or Outside the Job and then pass it to the JCL.

Please go thro' the manual and if you have any questions, let us know,

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group