View previous topic :: View next topic
|
Author |
Message |
reena_preethi
New User
Joined: 14 Jun 2006 Posts: 14
|
|
|
|
hi friends
i got one question
1.what is difference between && temp and &temp?
thanks in advance
regards
reena |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Single Ampersand (&) denotes a Symbloic Parameter, for which a value can be assigned in an Exec statement or on Proc staement and down the line u can use that parameter with prefix &.
Double ampersand (&&) denotes a temporary dataset.
u can get this info in any JCL book.
ksk |
|
Back to top |
|
|
reena_preethi
New User
Joined: 14 Jun 2006 Posts: 14
|
|
|
|
thanks a lot ksk
regards
reena |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Reena,
& -->To identify a symbolic parameter, for example, &LIB
&& --> To identify a temporary data set name, for example, &&TEMPDS, and, to identify an in-stream or sysout data set name, for example, &&PAYOUT
Real Time Example
Code: |
//SET1 SET VAL1='ABC,',VAL2=DEF,NULLSYM='
//S1 EXEC PGM=IEFBR14,PARM=&VAL1
// TIME=3)
//S2 EXEC PGM=IEFBR14,PARM=&VAL2
// TIME=3)
//S3 EXEC PGM=IEFBR14,PARM=&VAL1
// &NULLSYM |
Code: |
//S1 EXEC PGM=IEFBR14,ACCT='&&ABC'
//DD1 DD DSN=&&TEST,UNIT=SYSDA,SPACE=(TRK,(1,1))
|
|
|
Back to top |
|
|
reena_preethi
New User
Joined: 14 Jun 2006 Posts: 14
|
|
|
|
thanks a lot khamarutheen for explain with example
regards
reena |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Both & and && can be used to define a temp dataset.
The difference is that if &xxx is used somewhere else in the JCL for a symbolic, it will be used as a symbolic in the dsn too.
For example;
// set pgm1=abc
//s1 exec pgm=&pgm1
//dd1 dd dsn=&pgm1,disp=(,pass),...
pgm abc will be executed and a permanent ds with dsn abc will be created.
If
//s1 exec pgm=def
//dd1 dd dsn=&pgm1,disp=(,pass),...
a temp ds with a temp dsn beginning with "pgm1" is created.
That's why it's best to use && for temp datasets. |
|
Back to top |
|
|
|