Joined: 31 Oct 2006 Posts: 972 Location: Richmond, Virginia
Well, this is certainly a wide open question.
Are you asking:
1. Can I just do it in JCL (even though a million posts have pounded into our heads that JCL merely runs programs and connects them to data)?
2. Even thought I list COBOL in my profile, how do I compare/manipulate a simple date field, and how do I determine the current date in COBOL?
3. How do I read and then rewrite a record (in, say, COBOL)?
4. Is there some other program to use; e.g., sort? But you poisted this in the JCL forum.
Other possibilities I'm sure.
Please be very specific - what is holding you up here on a beginner programming task?
What is the source of your date/time on your file header, and the source of the date/time you want to compare it to.
I always strongly suggest using a business date, unless you have a really specific reason not to (for instance, processing system data rather than business data). Reason being, if you ever want to do a re-run, or any testing up the cycle, you are creating a problem for yourself if you use a system date.
As Ph... Phill has said, we need more information. Try to describe your requirement as exactly as you can.
if the date & time is with in past 7 days keep as it is,
else change it to current date & time.
My requirement was, i have an input file. In that there is a date field in header ( MMDDYYYY format).
I want to compare that date with the currrent date, if it is <7 days i want to set the return code of the job as 8 , else 0.
just take a decision..
nobody likes to waste time on a wishy washy description of the requirement