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
 

 

What is difference between && temp and &temp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
reena_preethi

New User


Joined: 14 Jun 2006
Posts: 14

PostPosted: Mon Jun 19, 2006 10:59 am    Post subject: What is difference between && temp and &temp
Reply with quote

hi friends
i got one question
1.what is difference between && temp and &temp?

thanks in advance

regards
reena
Back to top
View user's profile Send private message

ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon Jun 19, 2006 11:55 am    Post subject: Re: interview question
Reply with quote

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

New User


Joined: 14 Jun 2006
Posts: 14

PostPosted: Mon Jun 19, 2006 12:01 pm    Post subject:
Reply with quote

thanks a lot ksk

regards
reena
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Jun 19, 2006 1:18 pm    Post subject: JCL Doubt
Reply with quote

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

New User


Joined: 14 Jun 2006
Posts: 14

PostPosted: Tue Jun 20, 2006 6:22 pm    Post subject: Re: What is difference between && temp and &temp
Reply with quote

thanks a lot khamarutheen for explain with example

regards
reena
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 24, 2006 7:33 am    Post subject:
Reply with quote

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

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm


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