View previous topic :: View next topic
|
Author |
Message |
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
In a Procedure I have given a symbolic variable for a high level qualifier as below
Code: |
HLQ1='R1Y9PB'
...
...
|
And I have used it in a later step
Code: |
SYSOUT DD DSN=&HLQ1..ABC.FILE1 |
My question is even if I declare the HLQ1 without the single quotes, the DSN gets expanded in the same manner as DSN with single quotes. So the single quotes do not have any impact while resolving the symbolic in a DD statement ?
Code: |
HLQ1=R1Y9PB
...
...
|
|
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
seahawk789 wrote: |
So the single quotes do not have any impact while resolving the symbolic in a DD statement ?
|
Yes, single quotes can be used with SET statement to assign value to variable. But remember double quotes " will not work. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Try setting a symbolic value with a leading space, or an embedded space, or a signification trailing space. Any space. For instance. Same for any character which would otherwise cause misbehavement. And it is not just single-quotes. Have a dig into the manual, experiment (costs nothing) and just be a bit more creative, don't be blinkered by thinking "the value of the symbol has to be valid for JCL" - it can be a for a PARM, so all bets are off.
If you are adventuresome, you'll also try with characters which JCL does know about. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 581 Location: London
|
|
|
|
You only need to specify quotes around the symbolic value when it contains special characters such as a period, or things like the GDG appendage (+1), or if inserting a value into a PARM which has quotes around it already.
e.g. 1
// SET HLQ1='ABC.DEF'
// SET GDG='(+1)'
//ALLOC DD DSN=&HLQ1..REST.OF.DSN&GDG
e.g. 2
For PARM.
In execution JCL specify..
// SET RANGE='XYZ'
In the PROC on the PROC statement specify..
//ABC PROC RANGE=''
on the DD statement specify...
//STEP080 EXEC PGM=DLMSCR,PARM='TYPE=TMS,PREFIX=&RANGE'
This will insert the XYZ into the PARM..
//STEP080 EXEC PGM=DLMSCR,PARM='TYPE=TMS,PREFIX=XYZ' |
|
Back to top |
|
|
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Pete Wilson wrote: |
You only need to specify quotes around the symbolic value when it contains special characters such as a period, or things like the GDG appendage (+1), or if inserting a value into a PARM which has quotes around it already.
e.g. 1
// SET HLQ1='ABC.DEF'
// SET GDG='(+1)'
//ALLOC DD DSN=&HLQ1..REST.OF.DSN&GDG
e.g. 2
For PARM.
In execution JCL specify..
// SET RANGE='XYZ'
In the PROC on the PROC statement specify..
//ABC PROC RANGE=''
on the DD statement specify...
//STEP080 EXEC PGM=DLMSCR,PARM='TYPE=TMS,PREFIX=&RANGE'
This will insert the XYZ into the PARM..
//STEP080 EXEC PGM=DLMSCR,PARM='TYPE=TMS,PREFIX=XYZ' |
Thanks. So for a text that does not have any special characters setting the symbolic using quotes or without quotes will yield same result while expanding the DSN name I hope. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 581 Location: London
|
|
|
|
Try it and go beyond hope into reality. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
Thanks. So for a text that does not have any special characters setting the symbolic using quotes or without quotes will yield same result while expanding the DSN name I hope. |
Do you still hope ? How much time it takes to try? |
|
Back to top |
|
|
|