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

File Tailoring -- Temporary dataset in skeleton


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
samzee71

New User


Joined: 01 Feb 2010
Posts: 8
Location: Dallas, TX, USA

PostPosted: Fri Dec 01, 2017 3:12 am
Reply with quote

I am generating the jcl using file tailoring. The skeleton jcl uses the temporary dataset &&dataset1 which get converted to &dataset1 in the generated jcl.

&& gets converted to &

Code:
ORIGINAL CODE:                                   
//OUTFILE  DD DSN=&&DATASET1,DISP=(NEW,PASS,DELETE)
                                                 
CONVERTED CODE:                                   
//OUTFILE  DD DSN=&DATASET1,DISP=(NEW,PASS,DELETE)


Please advice.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2286
Location: USA

PostPosted: Fri Dec 01, 2017 3:50 am
Reply with quote

1) JCL rule: both &&DATASET, and &DATASET are considered as the same temporary DSNAME

2) File Tailoring rule: in order to generate each single apostrophe, two '&' characters in a row must be used:
'&&' --> '&'
'&&&&' --> '&&'
Back to top
View user's profile Send private message
samzee71

New User


Joined: 01 Feb 2010
Posts: 8
Location: Dallas, TX, USA

PostPosted: Fri Dec 01, 2017 4:01 am
Reply with quote

Thanks alot
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 774
Location: Denmark

PostPosted: Fri Dec 01, 2017 2:55 pm
Reply with quote

Quote:
1) JCL rule: both &&DATASET, and &DATASET are considered as the same temporary DSNAME

Unless there is a SET symbol (or system symbol if activated for batch jobs) with that name, so I would advocate always using double ampersands for temporary datasetnames.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
Search our Forums:


Back to Top