Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
sunojsm,
It's difficult to know what your data actually looks like since you only showed one record. Assuming that the quotes are actually in the record and you have four fields of 3 bytes, 5 bytes, 8 bytes and 5 bytes, you can use a DFSORT job like the following to do what you asked for:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Mane,
You show:
Code:
OUTREC FIELDS=(1:1,3,C' ', NO
5:4,5,C' ', NAME
11:9,8,C' ', DESIG
20:17,4,C' ', SAL
You don't need the C' ' (blank) after each field. When you specify a column (e.g. 5 after a field, DFSORT fills in blanks from the end of the last field up to but not including the column. 1:1,3,5: will put a blank in column 4, so you don't need the C' ' before 5:.
Also, the poster asked for headings NO, NAME, DESIG and SAL. You've put these in as remarks in the OUTREC statement. Remarks are recognized, but otherwise ignored. For headings, you need to use HEADERx. See my job above.
Tells that Copy from the input file INPUT1 to outfile OUT1 as mentioned in the DD statement using the Control statement CTL1. CTL1 will contains the conditions for copy.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Suno,
The control statements you show are for DFSORT's ICETOOL. You don't need to use ICETOOL to do what you want. The DFSORT job I showed you will do it. But if you want to use ICETOOL for some reason, the equivalent DFSORT/ICETOOL job would be:
Since 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: