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
 

 

How to obtain system TIME inside JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Wed Feb 21, 2007 12:27 am    Post subject: How to obtain system TIME inside JCL
Reply with quote

Hi,

Anyone know how to obtain TIME inside JCL? I want to check time when a JCL started executing and if the time is past some predetermine time, I want the remaining steps not to be executed.

Appreciate your help.

Anand
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Feb 21, 2007 2:34 am    Post subject: Re: How to get time in JCL?
Reply with quote

Would this work? It would alter the step RC if the current time is less than or greater than/equal to 1500 (3:00 PM):

Code:

//ICETOOL1 EXEC PGM=ICETOOL                               
//IN       DD   *                                         
                                                         
/*                                                       
//T1       DD   UNIT=VIO,DISP=(,PASS)                     
//DFSMSG   DD   SYSOUT=*                                 
//TOOLMSG  DD   SYSOUT=*                                 
//TOOLIN   DD   *                                         
COPY FROM(IN) USING(CTL1)                                 
COUNT FROM(T1) EMPTY                                     
/*                                                       
//CTL1CNTL DD   *                                         
  INREC BUILD=(1:TIMENS=(24))                             
  OUTFIL FNAMES=T1,INCLUDE=(1,4,CH,GE,C'1500')           
/*                                                       
//*                                                       
Back to top
View user's profile Send private message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Wed Feb 21, 2007 8:56 pm    Post subject: Re: How to obtain system TIME inside JCL
Reply with quote

Superk..

That will work..thanks a lot.
Back to top
View user's profile Send private message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Tue Feb 27, 2007 12:48 am    Post subject: Re: How to obtain system TIME inside JCL
Reply with quote

Superk,

Hmmm..this worked well in z/OS but not in OS/390.

In z/OS, it showing..
CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 10:3

in OS/390 it shwing..

Code:

ICE000I 0 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 03:44 ON SAT FEB 24, 2007 -
            INREC BUILD=(1:TIMENS=(24))
                  $
ICE104A 0 INVALID INREC OR OUTREC STATEMENT OPERAND


Any help?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Feb 27, 2007 3:01 am    Post subject:
Reply with quote

The syntax error for BUILD on DFSORT R14 indicates you do not have DFSORT R14 PTF UQ95213 installed. That PTF has been available since Dec, 2004. Ask your System Programmer to install DFSORT R14 PTF UK90006 (April, 2006). That will get you all of the latest DFSORT function.

In the meantime, you can use FIELDS instead of BUILD.
Back to top
View user's profile Send private message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Wed Mar 14, 2007 6:59 pm    Post subject: Re: How to obtain system TIME inside JCL
Reply with quote

Frank,

Would you be more specific please? I tried to replace it with FIELDS, but did not work. Appreciate if you could modify the previsouly shown JCL with the changes requried and post it here.

Thanks a lot..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Mar 14, 2007 9:00 pm    Post subject:
Reply with quote

I guess you need the Dec, 2004 PTF to use TIMENS=(24) in INREC as well. Anyway, using the "wayback machine", I found a combination that will work without the Dec, 2004 PTF. You should be able to use this job:

Code:

//S1 EXEC PGM=SORT                           
//SYSOUT    DD SYSOUT=*                       
//SORTIN DD *                                 
//SORTOUT DD SYSOUT=*                         
//SYSIN    DD  *                             
  OPTION COPY                                 
  OUTFIL REMOVECC,HEADER1=(1:TIMENS=(24))     
/*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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