Can we compare time fields in sort card of jcl



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Can we compare time fields in sort card of jcl

Postby deva_048 » Wed May 22, 2013 7:49 pm

Hi,

Input file contains

SSSSSSSSSSSSSSS
JobA  00:31
JobB  00:51
Job time information listed above.


I need to validate the jobA time is greater than 02:00 means output file should look like below format

SSSSSSSSSSSSSSS
JOBA 00:31
JOBB 00:51
Jobs are in progress


Is it possible??

Thanks..
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Can we compare time fields in sort card of jcl

Postby Pandora-Box » Wed May 22, 2013 8:03 pm

But JOBA is not greater than 02:00 ?

Please explain
User avatar
Pandora-Box
 
Posts: 65
Joined: Fri Feb 10, 2012 8:30 pm
Location: Mars
Has thanked: 3 times
Been thanked: 6 times

Re: Can we compare time fields in sort card of jcl

Postby BillyBoyo » Wed May 22, 2013 8:06 pm

Yes. Always with times, you'll inevitably need the date as well, if anything can ever occur around midnight.

In the bland instance that you have, there is no problem with comparing "00:31" or "00:51" to "02:00", you just do it is CHaracter fields. Because the ":" is in a fixed position in all cases and because the characters decrease in significance right-to-left, it'll work - until you cross midnight.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Can we compare time fields in sort card of jcl

Postby deva_048 » Wed May 22, 2013 8:29 pm

If it is not greater than 02:00 output file should be in below format

SSSSSSSSSSSSSSS
JOBA 00:31
JOBB 00:51
Jobs completed

Billy, can you explain me in the code..
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Can we compare time fields in sort card of jcl

Postby BillyBoyo » Wed May 22, 2013 8:43 pm

Where are you getting the time from?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Can we compare time fields in sort card of jcl

Postby deva_048 » Wed May 22, 2013 8:59 pm

JESMSGLG info will be extracted into i/p dataset
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Can we compare time fields in sort card of jcl

Postby BillyBoyo » Wed May 22, 2013 9:51 pm

:-)

I mean, the "02:00", which is presumably not a "static" value, but one you want to change?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Can we compare time fields in sort card of jcl

Postby deva_048 » Thu May 23, 2013 7:08 am

02:00 is a constant value. We need to validate the input with this time 02:00 or whatever the time we are given it need to validate with input.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Can we compare time fields in sort card of jcl

Postby BillyBoyo » Thu May 23, 2013 11:50 am

OK, we'll perhaps need more detail about exactly what you want, but:

Define the time-to-compare-to as a symbol, on the SYMNAMES DD statement. Include a SYMNOUT DD statement so that you get a listing of the "normalised" symbols.


//SYMNAMES DD *
TIME-TO-COMPARE-TO,C'02:00'
//SYMOUNT DD SYSOUT=*


  INREC IFTHEN=(WHEN=(10,5,CH,LT,TIME-TO-COMPARE-TO),
              OVERLAY=(40:C'BANANA'))


This is just to show the comparison. Expect it to appear in unexpected places.

To get the information from the detail line to the final line, again it will need GROUP and PUSH. But we need more information.

Is it just two jobs, always, involved, or what?

If one is complete and the other not, what do you want?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post