View previous topic :: View next topic
|
Author |
Message |
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Hi,
Could you please help me in sorting a file with length 766 and put filler to make the LRECL as 1190.I wrote a sort card as below
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(2,13,737,2,1175x)
|
The above SORT CARD made the LRECL as 1190 but did not copy the contents of the record.Only data in first 15 columns got written to a new sorted file.
Could anyone help to copy the entire content of file1 to file2 with the above requirement. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What does the fine manual say about the OUTREC statement.
You are taking 13 bytes from pos 2 and two bytes from pos 737 of the input, and then filling with blanks. Your output is what I would expect from that statement. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the outrec fields say
copy 13 bytes from pos 2
copy 02 bytes from pos 737
followed by 1175 spaces
hence the results are correct.
Gerry |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Expat,
I didn't try to steal your thunder, your answer wasn't posted when I replied.
Gerry |
|
Back to top |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Thanks expat,I got it |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
gcicchet wrote: |
Hi Expat,
I didn't try to steal your thunder, your answer wasn't posted when I replied.
Gerry |
No probs,
I have also fallen foul of the time delayed already responded response syndrome anomily |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
ajay_udl,
Well, people told you what was wrong with the control statements you used, but they didn't tell you the best way to do what you want to do which would be:
Code: |
OPTION COPY
INREC OVERLAY=(1190:X)
|
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:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|