covert julian date in yyddd to current date in jcl



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

covert julian date in yyddd to current date in jcl

Postby rajupatil3553 » Mon Oct 10, 2016 12:29 pm

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
rajupatil3553
 
Posts: 2
Joined: Mon Oct 10, 2016 12:12 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Aki88 » Mon Oct 10, 2016 2:39 pm

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?
Aki88
 
Posts: 286
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 31 times
Been thanked: 23 times

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

Postby steve-myers » Mon Oct 10, 2016 3:58 pm

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.
steve-myers
Global moderator
 
Posts: 1796
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 173 times

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

Postby enrico-sorichetti » Mon Oct 10, 2016 4:04 pm

the issue of YYDDD format dates should have been solved about 17 years ago :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2519
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 120 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post