Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, 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: 193
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: 26
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us