IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort: Does INREC forces a "pass of data"?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Mar 31, 2010 4:34 pm
Reply with quote

Hi,

I'm little unsure about the "passes of data" in sort-applictions. How do we count the number of passes happened on data fora given sort-card?

Question like
  • Does INREC forces a pass?
  • Does SUM FIELDS forces a pass?
keep on poping...where can I look for an explanation on this. I've Manuals, however, not very sure what to look for... icon_redface.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 31, 2010 4:47 pm
Reply with quote

/sillyness on

Quote:
poping
which letter should be doubled ?
if You double the wrong one the outcome might be unpleasant icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Mar 31, 2010 5:12 pm
Reply with quote

LOL...I give up... icon_lol.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 31, 2010 5:17 pm
Reply with quote

icon_lol.gif

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT and will be moved to the correct forum by one of the moderators. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Mar 31, 2010 5:22 pm
Reply with quote

icon_lol.gif

I got the messages of type WERxxxx, shown below:
Code:
WER276B  SYSDIAG= 112731, 1970889, 1970889, 2337705                 
WER164B  6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER164B     128K BYTES RESERVE REQUESTED, 6,124K BYTES USED         
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                     
looks like I'm using SyncSort but question falls under general-category so representatives from DFSort are also welcome...icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Mar 31, 2010 5:29 pm
Reply with quote

I always thought the data drives the number of passes, not the parameters. Each pass can sort a certain part of the file, depending upon the number of work files and the sizes of the records and files involved. If you manage to sort 25% of the file in each pass, then it would take 4 passes. But I haven't studied sort algorithms in more years than I care to think about!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 31, 2010 7:46 pm
Reply with quote

Anuj Dhawan wrote:
  • Does INREC forces a pass?
  • Does SUM FIELDS forces a pass?
Inrec acts upon the data as it is first read by sort.
Sum works on the data (more or less) as it is finally written out (intermediate summing would increase efficiency).
If I recall some old knowledge, sort reads the data and splits the unsorted data into multiple sorted strings of data in memory.
As memory is exausted by these strings sort will write some (all?) out to its work disk space.
When all input is read, sort will merge the disk and memory strings to a final sorted output stream.
I do not know if sort merges as it splits or merges as it outputs.
I am sure that with enough memory and data that is close to the final sequence, sort will need only one pass.

DFSORT Processing
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 31, 2010 8:57 pm
Reply with quote

Hello,

Somewhat over-simplified, but:

A "basic" sort, copy, or merge should take only 1 pass of the data.

When various CTLn sets of control statements, each one will require a pass of some or all of the data for that process.

INREC and other functions will increase cpu usage.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 31, 2010 11:03 pm
Reply with quote

dick scherrer wrote:
Somewhat over-simplified, but:
DOS/VSE 360/40 parapharsed from my PSR's explaination....
Quote:
A "basic" sort, copy, or merge should take only 1 pass of the data.
I aggre with the merge & copy but not so much with the sort (define "basic" vs normal)...
Quote:
When various CTLn sets of control statements, each one will require a pass of some or all of the data for that process.
I'm not so sure that all will require an additional pass...
Quote:
INREC and other functions will increase cpu usage.
But some time can be gained by eliminating some of the input records or shortening the sorted record length...
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Apr 01, 2010 3:55 pm
Reply with quote

Thank you CG - that link explains quite enough about what I was looking for.

I used to think that INREC works as a "mapping window" on data and does not really require a "pass of data"... icon_neutral.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 01, 2010 8:16 pm
Reply with quote

Hi Anuj,

Quote:
I used to think that INREC works as a "mapping window" on data and does not really require a "pass of data"...
Hopefully, you still think this. . .

INREC allows processing on the data (before sorting) but does not (typically? - i can't think of a reason for an extra pass, but if there is a reason, someone will mention this icon_smile.gif ) require an additonal pass of the data.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top