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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


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