This is not working. I am getting an Error.
I am putting down the error message here.
END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW
RECORD TYPE IS F - DATA STARTS IN POSITION 1
END OF FIELD BEYOND MAXIMUM RECORD LENGTH
END OF DFSORT
Look at the BOLD portion above. I think that I need to move the output into an temp variable first and then into the OUT dataset.
I need to see your complete DFSMSG messages. However I am guessing that you don't have the latest PTF which supports INREC processing with SPLICE. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free).
One way to verify that you have the PTF is
Look at the ICE201I message in DFSMSG . If you see a zero then your version does not support INREC processing with splice.
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
If you have the latest PTF then the message would have an E
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
if you don't have the latest PTF then use the following DFSORT JCL