View previous topic :: View next topic
|
Author |
Message |
khannay2k
New User
Joined: 24 Feb 2005 Posts: 28 Location: Bangalore
|
|
|
|
Hi,
can any one lemme know the answer.
I want to create the dataset in jcl based on current date do u have any idea please let me know.
rajesh. |
|
Back to top |
|
|
pr_ibm
New User
Joined: 04 May 2005 Posts: 9
|
|
|
|
Rajesh,
Question is not clear . Can you make it clear with example?
Thanks
Pr.. |
|
Back to top |
|
|
ankyhunk
Moderator
Joined: 05 May 2005 Posts: 98 Location: Navi Mumbai, India
|
|
|
|
Temporary datasets are created with current date & time. You can put the current date value in the name of the dataset to be created. |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi Ankur,
Can you please elaborate more on
"You can put the current date value in the name of the dataset to be created"
I want to know how exactly you go about it.
regards,
David. |
|
Back to top |
|
|
ankyhunk
Moderator
Joined: 05 May 2005 Posts: 98 Location: Navi Mumbai, India
|
|
|
|
I meant that u can name the dataset manually according to current date. This can also be automated thru a REXX utility. Code will be something like this -
Code: |
say 'Enter the source dataset name'
parse pull indd
say 'The target file will be.'
todays_date = date('U')
parse value todays_date with todays_mm '/' todays_dd '/' todays_yy
outdd = indd || '.D' || todays_dd || todays_mm
parse value outdd with t1 '.' t2 '.' t3
outdd = 'S4PROD.OVERRIDE.' || t3 |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
rajesh, in order to use a value for current date in the job, you will need to define a variable and assign a value to it for the date. Normally, this function is handled by your job scheduling system. However, to accomplish this outside of that environment, you can use the JCL SET command in your job immediately after the JOB statements:
Code: |
//MYJOB JOB (....),CLASS=X<MSGCLASS=X
//*
//SET MYDATE=050905
//*
....
//STEPXXXX EXEC PGM=MYPGM
//SYSUT2 DD DSN=MYHLQ.D&MYDATE,DISP=(,CATLG,DELETE),...
|
|
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
I want specify that JCL SET run only for JCL statements and not for instream DD.
i.e. if you want to delete a dataset with IDCAMS and specify the entry you desire, and it contain a variable as you can see in superk's sample, in conversion phase that variable is not converted.
Ususally the system scheduler convert jcl before the jes conversion! So.. if you need to delete it use a IEFBR14 or, as extreme solution, write a rexx source to have a dynamic and efficient solution. |
|
Back to top |
|
|
|