View previous topic :: View next topic
|
Author |
Message |
dudenithy
New User
Joined: 02 Mar 2012 Posts: 48 Location: India
|
|
|
|
Hi All,
I have the field of packed decimal S9(7) comp-3 which will have the creation time (ex: 121703 HHMMSS) in the Input file. My requirement is to fetch the records which are created in last 3 hours (current job run time - 3 hours).
I tried searching the manual and also in forum, and couldn't find any. I can use TIME1P but cannot subtract hours in that (as we do for DATE2P-3 which gives last 3 days records).
Could you please help? Thanks. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Check SYMNAMES
Gives you the time and do a difference and see if the difference of hours is greater than OR equal to 3
Then pick those records |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You show 12 digits and a field which can only contain seven. How does that work? |
|
Back to top |
|
|
dudenithy
New User
Joined: 02 Mar 2012 Posts: 48 Location: India
|
|
|
|
Thanks Pandora, I will try this.
@Bill, I think we had some misunderstanding. It is a 4 byte field since 9(7) Comp-3, and it will contains the values in HHMMSS format; ex: 145802 (Hex format: 0145802C). |
|
Back to top |
|
|
dudenithy
New User
Joined: 02 Mar 2012 Posts: 48 Location: India
|
|
|
|
In Btw, so is there no function available in DFSORT to TIME function (current time - n hrs/min/sec time) similar to DATE2P function (current date - n days) ? |
|
Back to top |
|
|
|