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
 

 

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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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