Yes, you can use DFSORT's INREC or OUTREC statement to do that.
If the VB input record looked like this (rrrr is the RDW):
and you wanted the VB output record to look like this:
you could use these DFSORT statements:
It isn't clear what positions your fields are actually in. If you need more specific help, please give the starting position and length of each field (COL-1, COL-2 and COL-3) and indicate whether or not there are other fields after those three.
You're getting the "wrong" answer because you're giving the "wrong" information. In all your previous posts, you said the input file has RECFM=VB. But based on your latest post where you use RECFM=FB for SORTOUT, and on the output you say you got with your INREC statement, it appears that your input file has RECFM=FB. Also, your previous descriptions of your fields do NOT match the data you are now showing.
Based on your latest post, this would be the DFSORT job you need:
I am trying to move first 2 bytes of data to 10-11 position similarly
data from 3-11 position data should be moved to first two bytes. and am
trying below sort card - not sure what mistake I made - it says OVERLAPPING has occured
You got the overlapping message because you have overlapping fields. 12,82 copies input positions 12-93 to output positions 1-82. Then you have 1: which is less than 83 so you get the overlapping message.
Why are you using 12,82? Why are you using 9,2 and 1,9? Why are you using LRECL=82? None of this corresponds to what you said you want to do, and what you said you want to do doesn't make sense anyway.
The only thing that does make sense is your input/output record example. It shows that you want to move input positions 3-11 to output positions 1-9 and input positions 1-2 to output positions 10-11. To do that, you would use these DFSORT control statements:
This will give you an output LRECL of 11.
I don't know what your input LRECL is or whether you want to copy the remaining characters (12-?) to the output records. If, for example, your input file has LRECL=80 and you want to copy the remaing characters to the output records, you would use: