View previous topic :: View next topic
|
Author |
Message |
pawaria
New User
Joined: 06 Apr 2006 Posts: 7 Location: Noida
|
|
|
|
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
-Pawaria- |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|