View previous topic :: View next topic
|
Author |
Message |
kaushikmitra
New User
Joined: 11 Apr 2008 Posts: 26 Location: MONTEREY
|
|
|
|
I have a requirement to write the system date and time in PS dataset by running a job. To do that I ran a REPRO with
//INDD DD *
%&DATE%
and
//OUTDD DD DSN
as the PS file.
This did not work out as I got this text "%&DATE%" written in my dataset. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
kaushikmitra wrote: |
This did not work out as I got this text "%&DATE%" written in my dataset. |
Hmm, you think?
DD * indicates that the JCL is ending and data follows. %&DATE% is nothing more than data. I don't know what you were expecting it to do. IDCAMS obviously doesn't know that it represents anything. Your example would only work if you were using a program that actually knew what value to translate the data %&DATE% into.
Why not use either SORT or the EZACFSM1 program? And, what exactly is the value of %&DATE% supposed to represent? |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
hello kaushikmitra,
You can use the below JCL:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY
//SORTOUT DD DSN=....your input dataset
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1:DATE,2X,TIME)
/* |
You can have different format of date. Since you didnt provided the date format so i assumed it to be mm/dd/yy.
Regards,
Rajat |
|
Back to top |
|
|
kaushikmitra
New User
Joined: 11 Apr 2008 Posts: 26 Location: MONTEREY
|
|
|
|
Hi Rajat ,
This works perfectly fine. Thanks a lot for the suggestion. |
|
Back to top |
|
|
|