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
 
Whether records get sorted when we use outrec or not

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

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Wed Sep 06, 2006 2:39 pm    Post subject: Whether records get sorted when we use outrec or not
Reply with quote

Hi ,

In one book , i read some thing like "INREC adds, deletes, or reformats fields before the records are sorted or merged

OUTREC adds, deletes, or reformats fields after the records are sorted or merged"

but when i am doing practice , i found that output records are not getting sorted in both the cases . I mean inrec as well as outrec .

if anyone help me whether records get sorted when we use outrec or not or is programmer responsibility to sort before use outrec .

Thanks&Regards

venkata .
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: Wed Sep 06, 2006 9:03 pm    Post subject:
Reply with quote

I'm not sure what you're asking. If you use a SORT statement, then the records are sorted regardless of whether or not you use INREC or OUTREC.

If you have:

Code:

   INREC FIELDS=(...)
   SORT FIELDS=(...)
   OUTREC FIELDS=(...)


1) the records are reformatted according to what you specify for the INREC fields.
2) the reformatted records are sorted according to what you specify for the SORT fields.
3) the sorted records are reformatted according to what you specify for the OUTREC fields.

If you specify a MERGE statement instead of a SORT statement, the records will be merged instead of sorted.

If you specify COPY instead of SORT, the records will be copied instead of sorted.

If that doesn't answer your question, then you'll need to explain more clearly what it is you're asking about.

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/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
VENKATA999
Warnings : 2

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Wed Sep 06, 2006 9:26 pm    Post subject: Re: Whether records get sorted when we use outrec or not
Reply with quote

Thanks a lot for answering my question. Can u please tell me when we should use inrec or outrec . How performance get improved if i go for inrec . In my example i am getting same output for both inrec & outrec .In the result the records are not in order in the both the options .

Please help me ........ ..

Thank you,
venkata.
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: Wed Sep 06, 2006 11:07 pm    Post subject:
Reply with quote

Quote:
Can u please tell me when we should use inrec or outrec.


If you need to reformat the records before sorting them, then use INREC. Keep in mind that SORT, SUM, OUTREC, etc operate on the records as changed by INREC. So when you specify INREC, you must set up your SORT fields to correspond to the reformatted INREC record.

If you need to reformat the records after sorting them, use OUTREC.

Quote:
How performance get improved if i go for inrec.


If you can significantly shorten the input records before sorting by using INREC, then you may see some performance gain. But, in general, you shouldn't use INREC just to try to improve performance.

Quote:
In my example i am getting same output for both inrec & outrec. In the result the records are not in order in the both the options.


What example? You haven't shown any control statements, any input records or any output records, so I don't know what you're doing or what result you're getting. I can't explain things based on reading your mind. You need to show me what you're talking about.

Quote:
Please help me


I'd be glad to, but you need to give me enough information so I can do that.
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts OUTREC OVERLAY different to INCREC ge... Joerg.Findeisen SYNCSORT 8 Fri Apr 27, 2018 2:11 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

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