FILE A and FILE B . Here the data in column 36 to 40 is same in both the files for all the rows. I have to compare both the files column # 36 - 40
if it is same ,i have to pick the data from column # 45 to 50 from FILE A and write to same position i.e. 45 to 50 in FILEB .
The Smart DFSORT Trick mentioned is a general approach for creating three different output files. While it can be adapted to othe situations, some people on this list seem to think it's the solution for every matching problem - it isn't. Simpler solutions are possible for some situations.
If you can adapt the trick yourself - fine. If you need more help, show an example of the records in each input file (relevant fields only) and what you expect for output. Give the RECFM and LRECL of your input files. If FileA can have duplicates within it, show that in your example. If FileB can have duplicate within it, show that in your example.
My Case : i have one file which have only one record at a time... from that record line i want 32 to 39 bytes which is a date in MMDDYYYY format...using below code(considered up till now)
but the thing is i want to write this date in output file as MM-DD-YYYY
Now please suggest how could i place the '-' (hypens) in 3rd and 6th positions...