As an example they all have header as shown below,
Code:
------------------MEDICARE REPORT----------------------------------
PART A ------------------------------ EXECUTION DATE: 07/09/16
-------------------------------------------------------------------------
My requirement is, I will have to update EXECUTION DATE in all files with a day minus. i.e it should now become 06/09/16. Its just one time request.
I wanted to achieve this using DFSORT not through COBOL program. Can some one help me on how the sort card should be like?
Since I have 20 files to be changed (at later point of time it can be more), Can I execute SORT on all 20 files in one step instead of executing same sort for 20 times?
Please let me know if you require more details.
Code'd for you.
What have you tried so far ? I am sure you did not do research and just looking for readymade solution. look here is the latest topic for your interest and think how you can modify to fit what you want.
Please make a use of code tags when required.
ibmmainframes.com/viewtopic.php?t=65374&highlight=
I know that I can use DATE1-1 and replace the execution date.
However I wanted to know if I can convert the execution date (DD/MM/YY. Please note that my format is not DD/MM/CCYY) to Julian date (using TOJUL) and perform -1 on that and convert that back to DD/MM/YY.
I didn't find any clue in the link you provided.
Unless you know, never comment. We are here asking for help. If you can, please do. If not, Thank You.
1. People here may answer and ask questions and advise as they want as your are the one who has a problem and seeking help not us. So don't
ever teach me/anyone here to how and what they ask and comment.
2. look at your initial post what have you asked and then you change your mind and asking how the date conversion works or possible for what you want so you got to learn how to post the question in right manner by telling what has been tried and what you can't do by yourself than correcting later.
3.If you don't know how to identify the second record and reformat the Date of what you have to what DFSORT accepts and then perform the basic math and then reformat back to what you want in the final output then do some research on INREC,PARSE,OUTREC, OVERLAY BUILD functions of DFSORT.
4. As per me one step solution is not achievable but then you need to change the input dataset dynamically hence the expectation was you get that hint from the link that is shared but you did not get it.
5.Date conversion , see if you can find what you need here
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You state that the formats are the same and it is a once-off, so very simple:
Code:
COPY COPY
INREC IFTHEN=(WHEN=(identify uniquely the lines you want to change),
OVERLAY=(columnnumberofsevenindate:C'6')
You can concatenate all the inputs, but remember you will just get one output unless you include code to identify the different outputs and have one OUTFIL for each report.
If you don't mind the output all being in one file, go with concatenation. From what you have said, it will work.
Please,never do that to someone who is helping you.
tested sample and modify per what you need because you poorly stated the requirement( Missing the offsets which is most important if you wanted handy solution),
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
You can make use of the Y2W(mmddyy) or Y2T(yymdd) formats which takes care of the CC part during a date arithmetic with 6 byte date fields.
Here is the results from a sample test.
Like Bill suggested, you can simply hard-code the date if this is a one-time activity and forget about the calculation. Also I'd use ICETOOL as Pandora suggested to put it in one step if you have 20 or more input AND output files.