What is the difference between Inrec fields and outrec?
What is the difference between Inrec fields and outrec?
Hi,
What is the difference between Inrec fields and outrec fields? I know that INREC is processed before the SORT is done and OUTREC is after SORTing? But is there any reference using which we can understand which verb will be accessed first among many verbs of DFsort.
Hope my question is clear...
What is the difference between Inrec fields and outrec fields? I know that INREC is processed before the SORT is done and OUTREC is after SORTing? But is there any reference using which we can understand which verb will be accessed first among many verbs of DFsort.
Hope my question is clear...
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: What is the difference between Inrec fields and outrec?
See if this link helps. If not, I think you need to make your question clearer.
-
- Registered Member
- Posts: 14
- Joined: Tue May 27, 2014 8:45 pm
- Contact:
Re: What is the difference between Inrec fields and outrec?
INREC reformats records on the way into a sort. OUTREC (and OUTFIL OUTREC) reformats them on the way out.
General guidance:
1) If you're going to cut down the record length do it on the INREC - if at all possible.
2) You can use INREC with e.g PARSE and IFTHEN to reformat records so that sort fields are in fixed positions. This might be handy for certain types of data - such as CSV.
General guidance:
1) If you're going to cut down the record length do it on the INREC - if at all possible.
2) You can use INREC with e.g PARSE and IFTHEN to reformat records so that sort fields are in fixed positions. This might be handy for certain types of data - such as CSV.
Martin Packer
Principal Systems Investigator, IBM
Principal Systems Investigator, IBM
Re: What is the difference between Inrec fields and outrec?
All these "reformats" are done temporarily right and is this the reason we include the WORK-FILES in SORT?MartinPacker wrote:INREC reformats records on the way into a sort. OUTREC (and OUTFIL OUTREC) reformats them on the way out.
- enrico-sorichetti
- Global Moderator
- Posts: 847
- Joined: Wed Sep 11, 2013 3:57 pm
Re: What is the difference between Inrec fields and outrec?
NOPE, the work file are needed due to the architecture of the sort algorithmAll these "reformats" are done temporarily right and is this the reason we include the WORK-FILES in SORT?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: What is the difference between Inrec fields and outrec?
Reformatting is only temporary if you make it so, by unwinding it later in the code. You make temporary changes because you need some intermediate value for your task.
If all changes were temporary, there would be no point in running the step.
If there is a SORT and changes have been made in INREC, then the data will be on the sort-work files (if sort-work is needed for the sort), but that is because it is how the sorting of data works, not anything to do with any changes made (or not).
If all changes were temporary, there would be no point in running the step.
If there is a SORT and changes have been made in INREC, then the data will be on the sort-work files (if sort-work is needed for the sort), but that is because it is how the sorting of data works, not anything to do with any changes made (or not).
Re: What is the difference between Inrec fields and outrec?
Thanks!
But many a times I don't supply the SORTWK files in the job but that still works, if they are needed why don't we get en error/
But many a times I don't supply the SORTWK files in the job but that still works, if they are needed why don't we get en error/
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: What is the difference between Inrec fields and outrec?
Either the amount of data is too small to require work-files or, more likely, you are using DFSORT's dynamic allocation of work datasets which, generally, is the best way to do it. Dynamic allocation is overridden if SORTWKn files are present in the step, which you may want for large datasets with many records of similar size and a few of a greatly different size.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute