View previous topic :: View next topic
|
Author |
Message |
ballaswaroop
New User
Joined: 20 Sep 2005 Posts: 25
|
|
|
|
Hi,
I have requirement where in we need
a) First get the current system time.
b) Check if the time is between 00:00 to 06:00.
c) If the time doesn't fall between the specified range set a return-code of 12.
Using ICEMAN I am able to get SYSTEM time
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(TIME1,80X)
/*
But not sure how to compare if it falls between 00:00 to 06:00 using Sort or any other utilities. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I believe this DFSORT/ICETOOL job will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//SYMNAMES DD *
HHMM,S'&LHHMMSS'
/*
//SYMNOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
0000 0600
/*
//TOOLIN DD *
COUNT FROM(IN) EMPTY USING(CTL1)
/*
//CTL1CNTL DD *
INCLUDE COND=(1,4,CH,LE,HHMM,AND,6,4,CH,GE,HHMM)
/*
|
|
|
Back to top |
|
|
ballaswaroop
New User
Joined: 20 Sep 2005 Posts: 25
|
|
|
|
Thank You Frank it works fine.
Is it possible to set the RC to 5 instead of 12 if the compare condition does not meets ? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
No. With COUNT you can set the RC to 12 (default) or 4 (RC4). |
|
Back to top |
|
|
|