Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using quotes in Symbolic Parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 52
Location: Cochin

PostPosted: Thu Mar 13, 2014 8:19 am    Post subject: Using quotes in Symbolic Parameter
Reply with quote

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

TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Mar 13, 2014 9:47 am    Post subject: Re: Using quotes in Symbolic Parameter
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7313

PostPosted: Thu Mar 13, 2014 12:58 pm    Post subject: Reply to: Using quotes in Symbolic Parameter
Reply with quote

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

Active User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Thu Mar 27, 2014 2:38 pm    Post subject:
Reply with quote

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

New User


Joined: 22 Feb 2010
Posts: 52
Location: Cochin

PostPosted: Thu Mar 27, 2014 8:25 pm    Post subject:
Reply with quote

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

Active User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Thu Mar 27, 2014 8:44 pm    Post subject:
Reply with quote

Try it and go beyond hope into reality.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1677
Location: NY,USA

PostPosted: Thu Mar 27, 2014 8:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us