Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 37
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

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: 37
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

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: 37
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

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: 310
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
No new posts Hex Value - vb file replace old date ... premnath DFSORT/ICETOOL 10 Sat Oct 17, 2020 3:15 am
No new posts current batch plan jzhardy DB2 3 Sun Sep 13, 2020 11:04 am
No new posts Trying to add current date in place o... shub2204 DFSORT/ICETOOL 8 Wed Aug 12, 2020 4:14 pm
No new posts How to filter out certain records bas... manugeorge2004 JCL & VSAM 5 Wed Jun 17, 2020 10:05 pm
No new posts Timestamp in TCP/IP for Z/VSE JCL nithinkarthika JCL & VSAM 0 Sun Apr 26, 2020 5:16 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us