View previous topic :: View next topic
|
Author |
Message |
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
I want to format such that my output file contains from 23rd character of input file. In my case I will not be knowing the input file length. I am giving a fixed length of 5000 to my output file. I am getting syntax error as I am not giving the length. I want everything from 23rd character from input file. How can we do it in sort ?
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1:23,)
$
ICE007A E SYNTAX ERROR
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Input file is FB / VB
The LRECL of the input file is .......... |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Input file is FB and LRECL is 5000 |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
lokeshwar_manoharan wrote: |
In my case I will not be knowing the input file length. |
lokeshwar_manoharan wrote: |
Input file is FB and LRECL is 5000 |
Conflicting statements. Which is it? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
If the input file is FB with LRECL 5000, and you want to lose the first 22 bytes from the copied version of the file, then how many bytes will you actually copy, and therefor be able to accurately calculate the LRECL of the output file. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
lokeshwar_manoharan,
The correct syntax for the OUTREC statement you're trying to use is:
Code: |
OUTREC FIELDS=(1:23,m)
|
YOU have to replace m with the length of the input field you want.
If your input file has RECFM=FB and LRECL=5000, and you want to copy from position 23 to the end of the input record, the OUTREC statement would be:
Code: |
OUTREC FIELDS=(1:23,4978)
|
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:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080 |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Thanks Frank |
|
Back to top |
|
|
|