I needed syntax for a sort JCL in wich i want to move spaces to a particular field for another field
i have a file in which i have different fields like INPUT-ID,
COMPANY CODE,YEAR,ETC ETC
SO FOR INPUT ID-SOME VALUE I WANT SPACES TO BE MOVED TO COMPANY CODE
Consider a file with ten records WITH RECORD LENGTH 15
The field names of the file are COMPANY CODE;INPUT-ID,ACCOUNTING-DATE;LOCATION ETC.
NOW FOR INPUT-ID-82MP IN THIS PARTICULAR FILE I WANT SPACES TO BE MOVED TO COMPANY CODE.
outrec is used to reformat the record.
Suppose your record length is 80 bytes. and you want in new record format in the some field position with spaces.
if i want from postion 10 to 15 as spaces.
This is not the correct syntax for the OUTREC statement. Two of the many forms of the correct syntax would be:
OUTREC FIELDS=(1,9,10:6C' ',16,65)
6C' ' and 6X both mean 6 blanks.
But an easier way to do this is with DFSORT's OVERLAY feature like this:
With overlay, you only have to specify the data you want to change.
You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's OVERLAY function. Only DFSORT has this function, so if you don't have DFSORT, you won't be able to use it. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: