IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to obtain system TIME inside JCL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed Feb 21, 2007 2:34 am
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
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
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 Developer


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

PostPosted: Tue Feb 27, 2007 3:01 am
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
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 Developer


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

PostPosted: Wed Mar 14, 2007 9:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top