Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us