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

Passing System date through SYSIN card


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kaushikmitra

New User


Joined: 11 Apr 2008
Posts: 26
Location: MONTEREY

PostPosted: Thu Jun 26, 2008 5:50 am
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jun 26, 2008 5:58 am
Reply with quote

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

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Thu Jun 26, 2008 6:00 am
Reply with quote

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

New User


Joined: 11 Apr 2008
Posts: 26
Location: MONTEREY

PostPosted: Thu Jun 26, 2008 10:15 pm
Reply with quote

Hi Rajat ,

This works perfectly fine. Thanks a lot for the suggestion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top