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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


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