Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Cn I use a VSAM file in different access mode in single PGM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
pawaria

New User


Joined: 06 Apr 2006
Posts: 7
Location: Noida

PostPosted: Thu Apr 27, 2006 11:04 pm    Post subject: Cn I use a VSAM file in different access mode in single PGM
Reply with quote

I want to use a single VSAM file in different access mode inside a single program.

Like this...
-Cobol Code-

SELECT tempdata ASSIGN dd1
FILE ORGANISATION IS INDEXED
ACCESS MODE IS RANDOM.

SELECT tempdata1 ASSIGN dd2
FILE ORGANISATION IS INDEXED
ACCESS MODE IS DYNAMIC.

-JCL Code-

For compiling this cobol code
Can I put same VSAM cluster in both dd1 and dd2

Like this..
//GO.DD1 DD DSN=AAAA.BBBB.CLUSTER,DISP=SHR
//GO.DD2 DD DSN=AAAA.BBBB.CLUSTER,DISP=SHR

Ty in advance icon_smile.gif

-Pawaria-
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Apr 28, 2006 7:24 am    Post subject: Re: Cn I use a VSAM file in different access mode in single
Reply with quote

Hi Pawaria,

There's no need to code both. Just code for DYNAMIC. It allows you to access the file both randomly and sequentially.

Check the COBOL Pgmr's Guide and the Language Reference on this site. There are issues concerning the key pointer (don't remember the exact name ) reset when going from one mode to the other.

Scroll to the top of this page and click on "manuals" scroll down a little and find the COBOL manuals for your compiler. Look thru the TOC for VSAM file processing.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us