pass timestamp from jcl to cobol



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

Re: pass timestamp from jcl to cobol

Postby iaccbond » Mon Jan 04, 2016 2:15 pm

my solution is not the solution which is required, i still need job start timestamp in my pgm


its a temporary solution not a standard solution
iaccbond
 
Posts: 10
Joined: Wed Dec 30, 2015 12:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Re: pass timestamp from jcl to cobol

 

Re: pass timestamp from jcl to cobol

Postby NicC » Mon Jan 04, 2016 2:52 pm

What do you mean by "standard" solution? "Standard" as per your shop? If so then how are we, who do not work there, expected to know the answer? Otherwise there is no such thing as a "standard" solution. Most places will use a business date dataset to get the date to be used and will use the ACCEPT TIME, or similar for other languages. If you really need the job start time then you create your own program that will step through th control blocks for your job as stated above. Or you could have a small program at the very start of your job, before any housekeeping, which will get the current time and store it.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: pass timestamp from jcl to cobol

Postby BillyBoyo » Mon Jan 04, 2016 6:21 pm

Which takes you back to the Control Blocks, as mentioned earlier. If this is for Production, that means write it in Assembler, because IBM supplies updated Assembler macros when the Control Blocks change, and provides no standard structures for other languages.

The chances that you actually need the "timestamp" of the JOB are small. You have to provide a reason why running that SORT step as the first one in the JOB does not give everything that is needed for the requirement.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: pass timestamp from jcl to cobol

Postby Aki88 » Mon Jan 04, 2016 6:23 pm

Fwiw, its really curious that the time-stamp passed by the SORT step (which is not the actual job start-time) is not causing any problems to the COBOL program, which would mean that there is no mechanism coded in the program itself to validate the time-stamp which is input to it.

In an after-thought, Nicc's earlier question is actually relevant here: 'Why do you need the job start time?' if you're not validating it in any way in the COBOL; else the time-stamp passed by the SORT step would not have sufficed.


<Edit: Sorry Billy didn't see you'd already posted>
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: pass timestamp from jcl to cobol

Postby Akatsukami » Tue Jan 05, 2016 5:08 am

FTR, my assumption that the date and time in the JCT are BCD was wrong. The time is a 3-byte binary of centiseconds since midnight. The date, OTOH, is a packed-decimal ordinal date, but with with the century coded as excess-19.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: pass timestamp from jcl to cobol

Postby NicC » Tue Jan 05, 2016 3:29 pm

Whatever. It cannot be done by JCL. Locking. If further assistance is required then a new topic can bestarted under the appropriate programming language or utility.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post