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 Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm


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