|
View previous topic :: View next topic
|
| Author |
Message |
achusarath
New User
.jpg)
Joined: 21 Mar 2007 Posts: 26 Location: kerala
|
|
|
|
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 |
|
 |
murmohk1
Senior Member
.jpg)
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
| 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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
 |
achusarath
New User
.jpg)
Joined: 21 Mar 2007 Posts: 26 Location: kerala
|
|
|
|
HI SIR,
thank u |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|