Get the System Date Using JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Get the System Date Using JCL

Postby ramrajgk » Sun Sep 27, 2015 3:07 pm

Hi,

I have requirement below:-

I have one file, in this file all records holds the date. Suppose the current year gets changed from 2015 to 2016, it should not allow the 2015 records. Date comparison must happen between the record date year and system date year.

Instead of sorting the file on year basis, i need to compare the record dates against the system date. Can you please help me on this.
ramrajgk
 
Posts: 6
Joined: Sat Sep 05, 2015 9:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Get the System Date Using JCL

Postby prino » Mon Sep 28, 2015 12:18 am

Bad, bad, bad design! What happens if this job is rerun with the 2015 data on 2016-01-01, because it fell over on 2015-12-31?

Never ever use the system date for jobs like this. NEVER!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Get the System Date Using JCL

Postby NicC » Wed Oct 07, 2015 7:11 pm

Can't be done "Using JCL". So, what utility were you thinking of?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post