View previous topic :: View next topic
|
Author |
Message |
avelayudhan
New User
Joined: 30 Nov 2005 Posts: 26
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
avelayudhan
New User
Joined: 30 Nov 2005 Posts: 26
|
|
|
|
Superk..
That will work..thanks a lot. |
|
Back to top |
|
|
avelayudhan
New User
Joined: 30 Nov 2005 Posts: 26
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
avelayudhan
New User
Joined: 30 Nov 2005 Posts: 26
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|