IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DD names for twin alternate indexes.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Yvonne1980

New User


Joined: 31 Aug 2010
Posts: 20
Location: Edinburgh

PostPosted: Mon Jul 04, 2011 8:11 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 04, 2011 8:26 pm
Reply with quote

no ... for jcl contigous-ness has no meaning ...
what counts are just ... guess what icon_biggrin.gif ... 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
View user's profile Send private message
Yvonne1980

New User


Joined: 31 Aug 2010
Posts: 20
Location: Edinburgh

PostPosted: Mon Jul 04, 2011 8:43 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 04, 2011 8:47 pm
Reply with quote

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 icon_biggrin.gif
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 icon_cool.gif
maybe Murphy can provide some words of wisdom on the issue
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 05, 2011 6:01 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jul 05, 2011 8:06 am
Reply with quote

Quote:
A wacky solution would be to code the second file as ending in "2" instead of "1".


Nahhh Bill! how do You dare ? icon_biggrin.gif
a ddname ending with 2, according to the rules,
is the access path to the first file thru the second alternate index icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 05, 2011 11:40 am
Reply with quote

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. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts Read file names from existing file th... DFSORT/ICETOOL 6
No new posts Unable to retrieve Datasets Names usi... CLIST & REXX 20
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts Column names in SYSIBM tables DB2 5
Search our Forums:

Back to Top