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 User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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