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

Can we use 2 include stmts in a sort


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

New User


Joined: 21 Mar 2007
Posts: 26
Location: kerala

PostPosted: Fri Mar 23, 2007 12:58 pm
Reply with quote

hi,

Code:


//SORT1 JOB NOTIFY=&SYSUID                       
//S1 EXEC PGM=SORT                               
//SYSPRINT DD SYSOUT=*                           
//SYSOUT DD SYSOUT=*                             
//SORTIN DD DSN=ESCUB11.SARATH.FE11,DISP=SHR     
//SORTOUT DD DSN=ESCUB11.SARATH.FEOUT,DISP=SHR   
//SYSIN DD *                                     
        SORT FIELDS=(1,10,CH,A)                   
        SUM FIELDS=NONE                           
                                                 
        INCLUDE COND=(1,2,CH,EQ,C'SA')           
        INCLUDE COND=(13,2,CH,EQ,C'AB')           
/*                                               
//                                               


cam we use 2 include stmts in a sort
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Mar 23, 2007 1:32 pm
Reply with quote

Only one Include statement is allowed. You can use either OR or AND for more than one condition like


INCLUDE COND=(1,2,CH,EQ,C'SA',OR,
13,2,CH,EQ,C'AB')


INCLUDE COND=(1,2,CH,EQ,C'SA',AND,
13,2,CH,EQ,C'AB')
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 23, 2007 1:32 pm
Reply with quote

I know you can use multiple conditions, but they need to be in the same include cond= statement seperated by an "or".
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: Fri Mar 23, 2007 9:14 pm
Reply with quote

achu,

You can only have one INCLUDE statement, but you can also have an OUTFIL statement with an INCLUDE operand:

Code:

    INCLUDE COND=(1,2,CH,EQ,C'SA') 
    SORT FIELDS=(1,10,CH,A)                   
    SUM FIELDS=NONE           
    OUTFIL INCLUDE=(13,2,CH,EQ,C'AB') 


However, note that the INCLUDE statement removes records before SORT and SUM whereas the OUTFIL statement removes records after SORT and SUM. So this might or might not do what you want. And as mentioned by others, an INCLUDE statement with AND or OR might do what you want.

If that doesn't help, then tell us what you're trying to do and show an example of your input records and what you want for output.
Back to top
View user's profile Send private message
achusarath

New User


Joined: 21 Mar 2007
Posts: 26
Location: kerala

PostPosted: Mon Mar 26, 2007 12:17 pm
Reply with quote

HI SIR,

thank u
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top