Joined: 09 Mar 2006 Posts: 14 Location: The Netherlands
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!
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!