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
 

 

Current Timestamp in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
frozenblood
Warnings : 1

New User


Joined: 16 Oct 2012
Posts: 34
Location: INDIA

PostPosted: Wed Apr 03, 2013 2:49 pm    Post subject: Current Timestamp in JCL
Reply with quote

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Apr 03, 2013 3:23 pm    Post subject: Reply to: Current Timestamp in JCL
Reply with quote

Can you outline the business reason for your processing?
Back to top
View user's profile Send private message
frozenblood
Warnings : 1

New User


Joined: 16 Oct 2012
Posts: 34
Location: INDIA

PostPosted: Wed Apr 03, 2013 3:45 pm    Post subject: Reply to: Current Timestamp in JCL
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Apr 03, 2013 4:12 pm    Post subject: Reply to: Current Timestamp in JCL
Reply with quote

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
View user's profile Send private message
frozenblood
Warnings : 1

New User


Joined: 16 Oct 2012
Posts: 34
Location: INDIA

PostPosted: Wed Apr 03, 2013 4:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Apr 03, 2013 4:40 pm    Post subject: Reply to: Current Timestamp in JCL
Reply with quote

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
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Wed Apr 03, 2013 5:01 pm    Post subject:
Reply with quote

DATE5 has 26 bytes.

DATE4 timestamp:
ccyy-mm-dd-hh.mm.ss

DATE5 timestamp:
ccyy-mm-dd-hh.mm.ss.nnnnnn
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Apr 03, 2013 5:37 pm    Post subject: Reply to: Current Timestamp in JCL
Reply with quote

But TS has SyncSort, and SyncSort doesn't have DATE5, as I've already said.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Apr 03, 2013 5:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Convert Timestamp Value mrdinesh DFSORT/ICETOOL 7 Thu May 05, 2016 6:01 pm
No new posts Retrieve current year or month using ... vnktrrd DFSORT/ICETOOL 15 Tue Mar 15, 2016 4:14 pm
No new posts Comparing timestamp in Synscort l.nethaji SYNCSORT 13 Wed Jan 20, 2016 4:47 pm


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