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

Why do we use two dots in Symbolic parameters


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

New User


Joined: 10 Jun 2007
Posts: 36
Location: Chennai

PostPosted: Tue Sep 11, 2007 7:02 pm
Reply with quote

Hi,

Can anyone tell me, why do we use two dots in DSN while using symbolic parameters ?

Regards,
anu
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Sep 11, 2007 7:06 pm
Reply with quote

You don't. You use one. The symbolic parameter starts with the ampersand (&) and ends with the period (.).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 7:17 pm
Reply with quote

Hello,

You use 2 dots when you want one of them to remain in the dsn after the symbolic parameter(s) have been resolved.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Sep 11, 2007 7:46 pm
Reply with quote

Quote:
The symbolic parameter starts with the ampersand (&) and ends with the period (.).

The symobilc parameter should start with ampersand(&), but may or may not end with period(.) depends on where the symbolic param is used.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Sep 11, 2007 7:57 pm
Reply with quote

Devzee wrote:
The symobilc parameter should start with ampersand(&), but may or may not end with period(.) depends on where the symbolic param is used.
Yup, agree.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Sep 12, 2007 10:33 am
Reply with quote

System needs to know about where does a Symbolic parameter name starts and where does it end. Agree? A special character will indicate the end of symbolic parameter.
Ex:

Code:
//      exec pgm=xyz,parm='name&pr/nnumber'


here &pr is symbolic parameter, you must code a special charactar to denote end of symbolic parameter. '.' If I dont code / in above example then system will consider symbolic parameter named &prnumber, which again vaiolates another rule that restricts name of the symbolic parameter to 8 charactars, and you will end up in JCL error.
Code:
//      exec pgm=xyz,parm='name&prnnumber'


'.' is a special charactar which indicates the end of symbolic parameter name but does not become part of it.

In DSN you need '.' as a part of dataset name. So you code two dots..
fair enough? icon_smile.gif
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Sep 12, 2007 11:22 am
Reply with quote

Actualy, the dot is not a sign for "end", it is a "concatenate to what follows".

O.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 12, 2007 6:20 pm
Reply with quote

Hi,

Let's take following examples:
1.
Code:
//BACKUP PROC
//STEP1 EXEC PGM=PGM1
//INPUT DD DSN=&NAMEIN,DISP=OLD
//OUTPUT DD  DSN=&NAMEOUT,DISP=(NEW,KEEP)
//                   DCB PARAMETERS

JOB executing tha above PROC is:
Code:
//BACKUP JOB(@),001,
********************************
*EXECUTES THE BACKUP PROCDURE*
********************************
*
//PROC1 EXEC BKUP
//          NAMEIN=SALESIN
//          NAMEOUT=SALESOUT


Now system will interpret the NAMEIN=SALESIN & NAMEOUT=SALESOUT. No need of ".".

2.
Value Aggined in a JOB: TYPE=TEMP
Symbolic Parameter coded in procedure:DSN=&TEMP
Operating System Interpretation:DSN=TEMP

3.
Value Aggined in a JOB: USER=ANUJ,DEPT=100
Symbolic Parameter coded in procedure:DSN=&USER&DEPT
Operating System Interpretation:DSN=ANUJ100

In all we didn't use "." as delimiter for symbolic parameters. In 3rd example "&" works as delimiter.

So agree with this
Quote:
Actualy, the dot is not a sign for "end", it is a "concatenate to what follows".

but this
agkshirsagar wrote:
In DSN you need '.' as a part of dataset name. e]
This is not always true.
Back to top
View user's profile Send private message
gamarendra

New User


Joined: 12 May 2006
Posts: 13
Location: bangalore

PostPosted: Thu Sep 13, 2007 8:46 am
Reply with quote

Adding one more Point.

DSN=&USER&DEPT here Both are symbolic Parameters so there is no need for a separate delimiter.but if

I need something else in Place of DEPT Say EDPT which is not a symbolic parameter
DSN=&USEREDPT in this case we need a delimiter like DSN=&USER.EDPT other wise it will look for a sybolic parameter &USEREDPT as a result JOb will be abend.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Sep 13, 2007 10:54 am
Reply with quote

Anuj,
Quote:
agkshirsagar wrote:
In DSN you need '.' as a part of dataset name. e]
This is not always true

I dont agree with you on this.. what if you need dataset name more than 8 charactars? qualified dataset name are everywhere I guess.. So I made a general statement about that icon_smile.gif

Quote:
In all we didn't use "." as delimiter for symbolic parameters. In 3rd example "&" works as delimiter.


If you read carefully my post, I didn't say only '.' indicates end of symbolic parameter but any 'special charactar' indiates it..
so you agree with ofer haan..
whatever example you gave above in that you didnt use '.' but still values were concatenated, right?
Quote:
So agree with this
Quote:
Actualy, the dot is not a sign for "end", it is a "concatenate to what follows".

So again, there is no point in arguing about-
'.' is a special charactar which indicates the end of symbolic parameter name but does not become part of it. Let me know if you still have any point.. icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Sep 14, 2007 3:37 pm
Reply with quote

Hi Abhijit,

Quote:
there is no point in arguing

I would not like to argue rather would like to discuss icon_smile.gif.

We both are right & I think, we are being bit out of discussion per original thread & that's why (but strang) OP has just disappeared from the discussion. icon_razz.gif
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 Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Injecting HTTPHEADER parameters in th... PL/I & Assembler 0
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts passing symbolic parameters through d... JCL & VSAM 3
No new posts Trim values of parameters in JCL JCL & VSAM 2
Search our Forums:

Back to Top