View previous topic :: View next topic
|
Author |
Message |
anu2 Warnings : 1 New User
Joined: 10 Jun 2007 Posts: 36 Location: Chennai
|
|
|
|
Hi,
Can anyone tell me, why do we use two dots in DSN while using symbolic parameters ?
Regards,
anu |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You don't. You use one. The symbolic parameter starts with the ampersand (&) and ends with the period (.). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Actualy, the dot is not a sign for "end", it is a "concatenate to what follows".
O. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
gamarendra
New User
Joined: 12 May 2006 Posts: 13 Location: bangalore
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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
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.. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Abhijit,
Quote: |
there is no point in arguing |
I would not like to argue rather would like to discuss .
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. |
|
Back to top |
|
|
|