DFSORT will do this. I have done this with both fixed/variable length records.
See the DFSORT write-ups: ftp://ftp.software.ibm.com/storage/dfsort/mvs/sortbynd.pdf ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf Search for 'reformat' in both -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Ron Thomas Sent: Tuesday, October 15, 2013 2:28 PM To: [email protected] Subject: DFSORT (File Reformat) Hello We have a input file of length 80 bytes, in this file from the 3'rd position the 4 byte data is defined as a array of 19 occurence. The last 2 bytes is of character data. We need to reformat this file, there is a chance that data may occure only say 10 times. Here we need to put "0" in front of the data only if data is present in the layout from position 3. No need to put any data in front if there is no file data for e.g say in position "51" e.g INPUT FILE :- XX123478965456 OUTPUT FILE : XX012340789605456 Pls let me know how this to be done using SORT ? No issume if the length of the file is modified by this process Thanks Ron T ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
