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
 

 

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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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