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
 

 

Data and time variable in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ozgurseyrek

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Thu Jul 15, 2010 12:00 pm    Post subject: Data and time variable in JCL
Reply with quote

Hi,
I want to use system date and System time as a variable, just like that sample. I think that is very simple and major usage for other operating systems and programing languages, but I couldn't find anything for that at mainframe and JCL.

Code:
//PGM1     EXEC  PGM=MYPGM     
//SYSOUT   DD    SYSOUT=*     
//SYSPRINT DD    SYSOUT=*     
//SYSIN    DD    *             
  &&SYSDATE                   
  &&SYSTIME                   
/*                             
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 15, 2010 12:11 pm    Post subject:
Reply with quote

Your best bet would be to either use the scheduler variables available at your site or perhaps to write a small REXX to extract date and time and put them into a dataset for use by subsequent programs.
Back to top
View user's profile Send private message
ozgurseyrek

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Thu Jul 15, 2010 12:20 pm    Post subject:
Reply with quote

I can't use scheduler variables for that purpose because I will use that variabe several times in a JCL. Scheduler will put the same values for all variables...

I used SORT step for that just below. but it means extra steps..

Code:
//SORTST1  EXEC  PGM=SORT                         
//SYSOUT   DD    SYSOUT=*                         
//SYSPRINT DD    SYSOUT=*                         
//SORTIN   DD    *                                 
STRT TIME :                                       
//SORTOUT  DD    DSN=TEST.FILE1.XXX,               
//             DISP=(,CATLG,DELETE),               
//             SPACE=(CYL,(1,1)),RECFM=FB,LRECL=80
//SYSIN    DD    *                                 
  SORT FIELDS=(COPY)                               
  OUTREC FIELDS=(1,13,DATE1,X,TIME1,42X)           
/*                                                 


thanks...
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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