Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us