Page 1 of 1

covert julian date in yyddd to current date in jcl

PostPosted: Mon Oct 10, 2016 12:29 pm
by rajupatil3553
Hi All,

I am generating a monthly report on 1st of every month. In this report I want to exclude the transactions created on 1st of month and prior day should serve as the cutoff date.
Input dataset date format is Julian'YYDDD'.

Input: dataset with julian date format at position 375 and length 5
output: Convert the above julian date to current system date and if transaction creation date = prior to current system date write to outfile1
else for transaction created on current system date write to outfile2

Re: How to convert julian date 'YYDDD" to current system dat

PostPosted: Mon Oct 10, 2016 2:39 pm
by Aki88
rajupatil3553 wrote:.... I am generating a monthly report on 1st of every month. in this report I want to exclude the transactions created on 1st of month and prior day should serve as the cutoff date.
Input file date format is Julian'YYDDD'.

input to JCL:input file with julian date format on position 375 and length 5
output: Convert the above julian date to current system date and if transaction creation date = prior to current system date write to outfile1
else for transaction created on current system date write to outfile2


Write a simple COBOL program to achieve this; not much of code is required to do this task, and logically (code-wise) it'd be way simpler to understand when compared to an equivalent *SORT card for your code maintenance team.

Also, the query is confusing at best. There is a YYDDD format date in the input DS at 'x' position; now you want to convert THIS YYDDD format date to current system date- what will be the format of current system date?
Why not simply over-write the date with current system date?

Then there is the bit about transaction creation date, what is its column position?
If you're going to do the comparison against the current system date, why are you converting the original date to 'current system date' in the earlier point?

Why not do this check and segregation at the source itself where this transaction DS is being created?

Re: covert julian date in yyddd to current date in jcl

PostPosted: Mon Oct 10, 2016 3:58 pm
by steve-myers
First of all, dates formatted as yyddd or cyyddd are not "Julian" dates. A true "Julian" date conforms to a calendar created in the Roman empire. For many years IBM incorrectly called dates expressed as yyddd or cyyddd "Julian" dates. IBM has been purging this term from their documentation, though it is still sometimes encountered. DO NOT use this improper term.

Second. DO NOT post the same topic in multiple forums and places. You are not likely to obtain a response.

Third. JCL cannot manipulate data in any form. JCL cannot perform the task you want. Period. End of story.

Re: covert julian date in yyddd to current date in jcl

PostPosted: Mon Oct 10, 2016 4:04 pm
by enrico-sorichetti
the issue of YYDDD format dates should have been solved about 17 years ago :mrgreen: