View previous topic :: View next topic
|
Author |
Message |
Yvonne1980
New User
Joined: 31 Aug 2010 Posts: 20 Location: Edinburgh
|
|
|
|
I have two separate but similar VSAM files, both ha ve alternate indexes that I need to read and update.
These are widely used VSAMs within our system and always have the same DD names: GN70178T and GN70178S. I am in the rare situation of requiring to access them both in the same program. Normally for base cluster DD names that are already 8 chars long, the alternate index DD name is the base cluster with the last char replaced with a '1'. In my case this means I would have two identically named DD names in the same step: GN701781 (different dataset names).
Before I code and test this does anyone know if the operating system will associate the correct DD to the correct cluster ?, Is the fact that the declaration of the alternate index occurs immediately after the main cluster declaration enough ?
Many thanks. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
no ... for jcl contigous-ness has no meaning ...
what counts are just ... guess what ... the ddnames
and the choice is completely up to You
but i beg to differ a bit on the terminology ...
cluster .... the <base thing>
alternate index ... <another thing>
PATH what lets You access the cluster thru an alternate index
usually the program and the jcl should not be concerned with the alternate index <thing>
just the BASE cluster and the PATH |
|
Back to top |
|
|
Yvonne1980
New User
Joined: 31 Aug 2010 Posts: 20 Location: Edinburgh
|
|
|
|
Enrico,
Yes, I'm talking about the JCL declaration for the Path that relates to the alternate index. In this case I am restriced in my choice of DD names due to installation 'rules'.
Can you tell me if my multiple use of the same DD name (//GN701781) will cause a problem. Here is an example of what the JCL would look like:
Code: |
//GN70178T DD DSN=MY.VSAM.GN70178T,
// DISP=OLD
//GN701781 DD DSN=MY.VSAM.GN70178T.PATH,
// DISP=OLD
//GN70178S DD DSN=MY.VSAM.GN70178S,
// DISP=OLD
//GN701781 DD DSN=MY.VSAM.GN70178S.PATH,
// DISP=OLD
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Code: |
In this case I am restriced in my choice of DD names due to installation 'rules'. |
but the use of the same DDNAME to refer to different things is a NO NO
just shoot the idTENt who set the installation rules
I wonder why those people lack completely the flexibility to adapt to exceptions
one of the rules when setting the rules is ... never use all the <space/characters> available
maybe Murphy can provide some words of wisdom on the issue |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
A wacky solution would be to code the second file as ending in "2" instead of "1".
If it were me, I'd take the "problem" to my boss, so that he (or his boss or whoever) can take it to to the boss of the "standards" and get an "official" answer for you. Your "problem" is that it is impossible to produce valid code or JCL and follow the standards, so it is delaying development, and therefore implementation. Should also ask for all the naming standards to be reviewed along the lines enrico suggests at the same time.
I prefer this sort of memo to actual "shooting" (embarrassment to the offender, without prison sentence for you), but otherwise agree with enrico. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
A wacky solution would be to code the second file as ending in "2" instead of "1". |
Nahhh Bill! how do You dare ?
a ddname ending with 2, according to the rules,
is the access path to the first file thru the second alternate index |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
enrico, after reading yours I thought 7, then, better, Q.
Then I realised Q would be for datasets accessed via 3rd alternate index on Thusday's only.
No way we can be wacky at all. |
|
Back to top |
|
|
|