Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Compare Time if it falls between 00:00 to 06:00

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Compare Time if it falls between 00:00 to 06:00
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 Moderator


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

PostPosted: Thu Aug 05, 2010 11:24 pm    Post subject:
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    Post subject: Reply to: Compare Time if it falls between 00:00 to 06:00
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 Moderator


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

PostPosted: Fri Aug 06, 2010 8:42 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us