I am having a Problem. I am reading a file & from File getting Date & one more field.Problem is:
1.Let say Date is 8/Sep/2008 then it is coming as 9/8/2008 & if Date is say 10/Sep/2008 then coming as 9/10/2008 & If Date is 12/Oct/2008
then date is appearing as 10/12/2008.
My Requirement:
I want to reformat the Date as MM/DD/YYYY i.e. If Month is Sept then it should appear as 09, if date is 8 should appear as 08. If Date is coming as 12/10/2008 then this should not be disturbed. My Constraint is I don't have to write COBOL Pgm. I am Using SORT not able to get the desired result.
2. Having one field, if it is having value as single digit then say '2' need to Reformat this to '02'. If value is 10 then this should not be disturbed. Field Length is 2 & I am getting said Record from File.
For the above stated problems I am writing the Record to Other File & before writing i want to Format the File.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Which sort product is used on your system?
If you are not sure, run any sort and the product information will be at/near the top of the informational output.
If your system uses DFSORT, this topic will be moved to the DFSORT part of the forum. If some other sort (i.e. Syncsort), it will remain in this part of the forum.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
I think your input file needs lil reformatting.
Yes, that is what was requested. . .
Please re-read the original post.
One-digit month or day values need to be made two-digit so that all of the dates (m/dd/yyyy, mm/d/yyyy, m/d/yyyy) are 10 bytes long mm/dd/yyyy in the output.