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

Specify the number of records in the INCLUDE statement


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

New User


Joined: 25 Mar 2008
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2008 8:56 pm
Reply with quote

Hi,
can anyone tell how to specify the number of records in the INCLUDE statement.
i need only one record satisfying the below condition

SORT FIELDS =(1,33,CH,A,34,4,UFF, A,38,21,CH,A,63,88,CH,A)
INCLUDE COND=(1,1,CH,EQ,C' T4’)
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 Apr 02, 2008 9:36 pm
Reply with quote

How about the stop after parameter?
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: Wed Apr 02, 2008 9:38 pm
Reply with quote

Your INCLUDE statement should be:

Code:

   INCLUDE COND=(1,2,CH,EQ,C'T2')


so the length of the field (2) matches the length of the constant.

It's not clear what you want to do.

Do you want only one record in the output file (the first record that has 'T4' in positions 1-2)? If so, you can use:

Code:

   OPTION STOPAFT=1


to only get that record in the output file. (Of course, if that's the case, then I have to wonder why you're doing a sort for only one record rather than a copy).

Or do you want the output file to have only one record with 'T4' in 1-2, and all of the other records that don't have 'T4' in 1-2?

Please clarify what you want. An example of input and output would help. Also what is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
vinodkrs

New User


Joined: 25 Mar 2008
Posts: 10
Location: india

PostPosted: Thu Apr 03, 2008 10:41 am
Reply with quote

Sorry for the error, the length of the field is 2.
I can do this by copy option. Thanks a lot.

Regards,
Vinod
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top