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
 

 

Include condition in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Include condition in DFSORT
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: 2150
Location: At my coffee table

PostPosted: Tue Mar 03, 2009 7:21 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Mar 03, 2009 7:44 pm    Post subject:
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    Post subject: Reply to: Include condition in DFSORT
Reply with quote

bamohan,

Check this link which explains in detail the flow of DFSORT

http://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 Moderator


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

PostPosted: Tue Mar 03, 2009 10:14 pm    Post subject:
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    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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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