Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
INREC and OUTREC together in SORT

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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Dec 01, 2014 12:29 pm    Post subject: INREC and OUTREC together in SORT
Reply with quote

Hi All,

This query is in continuation to my previous query.

I was using the sort card suggested earlier, which was working well till now.
Code:
 //SYSIN DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1:1,4,5:5,26,31:C'ABC',34:31)
/*


Now I got additional requirement on the top of existing one, Which is to replace the CRLF character with SPACES.

I got the desired output with the following control card.

Code:
//SYSIN DD *
  SORT FIELDS=COPY
  INREC FINDREP=(INOUT=(X'0D25',C'  '))
  OUTREC FIELDS=(1:1,4,5:5,26,31:C'ABC',34:31)
/*


Now, I'm getting a doubt, using INREC and OUTREC together is a good idea? Is it a good practice? Is there any better way to get it done ?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Dec 01, 2014 1:31 pm    Post subject: Reply to: INREC and OUTREC together in SORT
Reply with quote

Since you ignored all my advice in the last topic, there's not much point in my commenting, is there? :-)

For other readers, it probably makes little difference in a COPY/MERGE operation or in a SORT where the action in the OUTREC is not dependent on the result of the INREC. Sometimes it is convenient to just use an OUTREC rather than rearrange (using IFTHEN) the INREC. Test for large volumes of records.
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us