View previous topic :: View next topic
|
Author |
Message |
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
Hi,
I have to fetch current timestamp in JCL so as to filter out records which have BEGIN-TIMESTAMP greater than the current timestamp.
I am currently using DATE4 function in INCLUDE COND, but DATE4 doesnt provide the complete timestamp, it only gives the current date + time (hh:mm:ss) i.e., 19 bytes. I want whole 26 bytes of current timestamp for comparison. Is there any alternative ?
Code: |
INCLUDE COND=(7,19,CH,GT,DATE4)
|
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you outline the business reason for your processing? |
|
Back to top |
|
|
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
I want to filter only those records from the file whose begin timestamp is greater than or equal to the current timestamp i.e., those records which will be active in future. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No, that's just restating what you have already said.
I'm sure the business requirement says nothing like that.
You will end up with a step which cannot be re-run (will produce different output) and which can't be run twice. If this is a once-off, OK, but then what would be the reason for the cut-off point being "when the SORT gets the timestamp"? |
|
Back to top |
|
|
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
Actually the requirement is to filter out only the active records which includes future dated records. So the future dated records might have begin timestamp in nano sceonds(full 26 bytes), so if we filter only with 19 bytes timestamp we might miss the future records.
Please let us know if you have any alternative Thanks! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, I've had a couple of shots at it, but leaving it now.
DFSORT has DATE5 which does what you want.
SyncSort does not. Suggest you find "something" to write a timestamp to a file, then get back to what to do with it. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
DATE5 has 26 bytes.
DATE4 timestamp:
ccyy-mm-dd-hh.mm.ss
DATE5 timestamp:
ccyy-mm-dd-hh.mm.ss.nnnnnn |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
But TS has SyncSort, and SyncSort doesn't have DATE5, as I've already said. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
What if your SORT job runs different time everyday(due to some reasons..may be beacuse of CPU unavaliablity..Dependency on other jobs..in case of abends).
Are you sure your filtering condition would give you the required output? |
|
Back to top |
|
|
|