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?