Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort outrec fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Mar 22, 2011 3:46 pm    Post subject: sort outrec fields
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 22, 2011 5:56 pm    Post subject:
Reply with quote

Input file is FB / VB
The LRECL of the input file is ..........
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Mar 22, 2011 7:02 pm    Post subject:
Reply with quote

Input file is FB and LRECL is 5000
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Mar 22, 2011 7:15 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 22, 2011 7:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Mar 22, 2011 11:38 pm    Post subject:
Reply with quote

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:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Fri Mar 25, 2011 12:50 pm    Post subject:
Reply with quote

Thanks Frank
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us