Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Passing System date through SYSIN card

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
kaushikmitra

New User


Joined: 11 Apr 2008
Posts: 23
Location: MONTEREY

PostPosted: Thu Jun 26, 2008 5:50 am    Post subject: Passing System date through SYSIN card
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
References
PostPosted: Thu Jun 26, 2008 5:50 am    Post subject: Re: Passing System date through SYSIN card Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3081
Location: Charlotte,NC USA

PostPosted: Thu Jun 26, 2008 5:58 am    Post subject: Re: Passing System date through SYSIN card
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: 124
Location: india

PostPosted: Thu Jun 26, 2008 6:00 am    Post subject:
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: 23
Location: MONTEREY

PostPosted: Thu Jun 26, 2008 10:15 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1