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

Compare Time if it falls between 00:00 to 06:00


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ballaswaroop

New User


Joined: 20 Sep 2005
Posts: 25

PostPosted: Thu Aug 05, 2010 8:21 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Aug 05, 2010 11:24 pm
Reply with quote

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
View user's profile Send private message
ballaswaroop

New User


Joined: 20 Sep 2005
Posts: 25

PostPosted: Fri Aug 06, 2010 2:31 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Aug 06, 2010 8:42 pm
Reply with quote

No. With COUNT you can set the RC to 12 (default) or 4 (RC4).
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 Compare only first records of the fil... SYNCSORT 7
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