I need to validate the hh.mm.ss and
- convert the Seconds, if its over 59 and increment it the minutes to 1 validate
- check minutes, if its over 59, then increment the hour by 1 and convert the rest as Minute
1) Do you need an advise on the sequence of operations to produce your result? Or
2) Do you need your job to be done by someone else, and you were provided with a ready-to-copy-and-paste working code?
P.S.
From my primary school days I remember: the required process is called "rounding the time value"
P.P.S.
Do you need also to update the date value after your hours value becomes 24 or more? Such as:
12/31/2024-23.59.59.999999 -> 01/01/2025-00.00.00.000000
Joined: 30 Apr 2020 Posts: 15 Location: United States
sergeyken wrote:
Please, clarify you post:
1) Do you need an advise on the sequence of operations to produce your result? Or
2) Do you need your job to be done by someone else, and you were provided with a ready-to-copy-and-paste working code?
P.S.
From my primary school days I remember: the required process is called "rounding the time value"
P.P.S.
Do you need also to update the date value after your hours value becomes 24 or more? Such as:
12/31/2024-23.59.59.999999 -> 01/01/2025-00.00.00.000000
Hi
I tried using the below approach using MOD but i'm getting error using MOD
1) Do you need an advise on the sequence of operations to produce your result? Or
2) Do you need your job to be done by someone else, and you were provided with a ready-to-copy-and-paste working code?
P.S.
From my primary school days I remember: the required process is called "rounding the time value"
P.P.S.
Do you need also to update the date value after your hours value becomes 24 or more? Such as:
12/31/2024-23.59.59.999999 -> 01/01/2025-00.00.00.000000
Hi
I tried using the below approach using MOD but i'm getting error using MOD
Joined: 30 Apr 2020 Posts: 15 Location: United States
sergeyken wrote:
andy12 wrote:
sergeyken wrote:
Please, clarify you post:
1) Do you need an advise on the sequence of operations to produce your result? Or
2) Do you need your job to be done by someone else, and you were provided with a ready-to-copy-and-paste working code?
P.S.
From my primary school days I remember: the required process is called "rounding the time value"
P.P.S.
Do you need also to update the date value after your hours value becomes 24 or more? Such as:
12/31/2024-23.59.59.999999 -> 01/01/2025-00.00.00.000000
Hi
I tried using the below approach using MOD but i'm getting error using MOD
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(81:7,4,1,2,4,2, MM/DD/YYYY->YYYYMMDD
28:C'<-',X,1,26)), copy original timestamp
IFTHEN=(WHEN=(21,6,ZD,GE,+500000), add one second
OVERLAY=(18:18,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(21,6,ZD,GE,+0), reset fractions of second
OVERLAY=(21:C'000000'),
HIT=NEXT),
IFTHEN=(WHEN=(18,2,ZD,GE,+60), add one minute
OVERLAY=(18:18,2,ZD,SUB,+60,TO=ZDF,LENGTH=2,
15:15,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(15,2,ZD,GE,+60), add one hour
OVERLAY=(15:15,2,ZD,SUB,+60,TO=ZDF,LENGTH=2,
12:12,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(12,2,ZD,GE,+24), add one day
OVERLAY=(12:12,2,ZD,SUB,+24,TO=ZDF,LENGTH=2,
1:81,8,Y4T,ADDDAYS,+1,TOGREG=Y4W(/)))
SORT FIELDS=COPY
OUTREC BUILD=(1,80)
END
//*
Joined: 30 Apr 2020 Posts: 15 Location: United States
sergeyken wrote:
Code:
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(81:7,4,1,2,4,2, MM/DD/YYYY->YYYYMMDD
28:C'<-',X,1,26)), copy original timestamp
IFTHEN=(WHEN=(21,6,ZD,GE,+500000), add one second
OVERLAY=(18:18,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(21,6,ZD,GE,+0), reset fractions of second
OVERLAY=(21:C'000000'),
HIT=NEXT),
IFTHEN=(WHEN=(18,2,ZD,GE,+60), add one minute
OVERLAY=(18:18,2,ZD,SUB,+60,TO=ZDF,LENGTH=2,
15:15,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(15,2,ZD,GE,+60), add one hour
OVERLAY=(15:15,2,ZD,SUB,+60,TO=ZDF,LENGTH=2,
12:12,2,ZD,ADD,+1,TO=ZDF,LENGTH=2),
HIT=NEXT),
IFTHEN=(WHEN=(12,2,ZD,GE,+24), add one day
OVERLAY=(12:12,2,ZD,SUB,+24,TO=ZDF,LENGTH=2,
1:81,8,Y4T,ADDDAYS,+1,TOGREG=Y4W(/)))
SORT FIELDS=COPY
OUTREC BUILD=(1,80)
END
//*