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: 47
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: 7228

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: 437
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: 47
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: 437
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: 1609
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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm


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