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

Dynamic dd name


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

New User


Joined: 27 Oct 2005
Posts: 2

PostPosted: Sun Mar 19, 2006 4:16 am
Reply with quote

Hi,

I have a jcl whick looks like this :

//JS01 EXEC PGM=MYPROG
//INPUT DD DSN=TB@TEMP.TEST.FILE.T830,DISP=(new,catlg,delete),....
// DD DSN=TB@TEMP.TEST.FILE.T850.GEN(+1),DISP=SHR


I just would like to know which value will be replaced by '@' when jcl is run and where does this JCL take value for '@'
Back to top
View user's profile Send private message
martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Mon Mar 20, 2006 3:35 pm
Reply with quote

Hi Saket,

'@' does not indicate a variable, it a valid character! TB@TEMP will simply be TB@TEMP!!

N.B.: if is wasn't '@', but '&', it would indicate a variable!:-

- the variable would be &TEMP.
- How the system would resolve it, is impossible to say from the 3 lines of code you provided; it could be anything! Usually it's resolved by some code prior to the step using the variable (on the job-card, or by means of a SET-statement)....
- Note that when you use TB&TEMP.TEST, the '.' will be regarded as 'end of variable'-indicator, and will be removed when the variable is resolved. For instance; if &TEMP take the value 'SAMPLE', the result will be:
TBSAMPLETEST. if you want the result to be TBSAMPLE.TEST you would have to code TB&TEMP..TEST (two dots).

I hope you don't mind me going on about variables a bit, (as all you needed to know is that '@' is a valid character!..) it's one of my pet-subjects I'm afraid!
Back to top
View user's profile Send private message
Saket

New User


Joined: 27 Oct 2005
Posts: 2

PostPosted: Mon Mar 20, 2006 8:25 pm
Reply with quote

Hi Martin,

Thank you very much for your reply.

Can you please clarify one more doubt?

I have a skeleton jcl in which i have to create seperate output file by replacing few characters in DDname and dsn.

For example i have :

Comp num comp-name

230 W
239 V
240 G

In my program i process each company records by changing the control card. Depending on company, each output file has records for each company.

ex:

when i submit my control card for company -230

and my jcl has value

//comp@ dd dsn=ssxt.rti.comp@.data.

When i submit my jcl it should create DSN -

ssxt.rti.compW.data.W -

similarly,

ssxt.rti.compV.data.V - when i run with 239 comp
ssxt.rti.compG.data.G - when i run with 240 comp

So finally what i want to say is i have a generic or skeleton jcl which should create dynamic DSN for each company. I know it is possible. But can you please let me know how to do it?

Thank you and Regards,
Saket







martijn wrote:
Hi Saket,

'@' does not indicate a variable, it a valid character! TB@TEMP will simply be TB@TEMP!!

N.B.: if is wasn't '@', but '&', it would indicate a variable!:-

- the variable would be &TEMP.
- How the system would resolve it, is impossible to say from the 3 lines of code you provided; it could be anything! Usually it's resolved by some code prior to the step using the variable (on the job-card, or by means of a SET-statement)....
- Note that when you use TB&TEMP.TEST, the '.' will be regarded as 'end of variable'-indicator, and will be removed when the variable is resolved. For instance; if &TEMP take the value 'SAMPLE', the result will be:
TBSAMPLETEST. if you want the result to be TBSAMPLE.TEST you would have to code TB&TEMP..TEST (two dots).

I hope you don't mind me going on about variables a bit, (as all you needed to know is that '@' is a valid character!..) it's one of my pet-subjects I'm afraid!
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Mar 20, 2006 8:30 pm
Reply with quote

I think that the "at" sign (@) variable is probably a variable supplied by the job scheduling system.
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 Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts Dynamic file allocation using JCL JCL & VSAM 8
No new posts Dynamic Sortin DD cards SYNCSORT 8
Search our Forums:

Back to Top