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

Include condition in DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bamohan

New User


Joined: 29 Jan 2007
Posts: 33
Location: chennai

PostPosted: Tue Mar 03, 2009 7:14 pm
Reply with quote

If we have include condition in DFSORT. How the sort will function whether it first sort the records and then fetch the row based on the include condition or will it do in vice-versa..
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: Tue Mar 03, 2009 7:21 pm
Reply with quote

If the include is working on the input, before the actual sort, less records will be actually sorted resulting in less cpu resources being used.
If the include is working on the output then all records will be sorted.
Back to top
View user's profile Send private message
bamohan

New User


Joined: 29 Jan 2007
Posts: 33
Location: chennai

PostPosted: Tue Mar 03, 2009 7:37 pm
Reply with quote

Sorry.. Still I'm not clear.. See I have this sort code in My JCL

SORT FILEDS=(1,9,CH,A)
INCLUDE COND=(1,3,CH,EQ,C'AAA')

Here, Whether the sorting will performed first or the records are fetched based on the include condition and then sort will be perfomed ?
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: Tue Mar 03, 2009 7:44 pm
Reply with quote

According the Fine Manual:
The INCLUDE control statement differs from the INCLUDE parameter of the OUTFIL statement in the following ways:
The INCLUDE statement applies to all input records; the INCLUDE parameter applies only to the OUTFIL input records for its OUTFIL group.

Your INCLUDE looks to me to be the statement form rather than the parameter form.
The include acts before the sort, not after......
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 03, 2009 9:48 pm
Reply with quote

bamohan,

Check this link which explains in detail the flow of DFSORT

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/1.5.4?DT=20060615185603
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Mar 03, 2009 10:14 pm
Reply with quote

Code:

   SORT FIELDS=(1,9,CH,A)
   INCLUDE COND=(1,3,CH,EQ,C'AAA')


Since you're using an INCLUDE statement, it will be processed before sorting. The order in which you specify the statements does not matter.

If you want the INCLUDE to be processed after sorting, you can use an OUTFIL statement with an INCLUDE operand:

Code:

   SORT FIELDS=(1,9,CH,A)
   OUTFIL INCLUDE=(1,3,CH,EQ,C'AAA')
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top