cieron
New User
Joined: 04 Mar 2009 Posts: 5 Location: Warsaw
|
|
|
|
Hi,
Is it possible to set include condition for CH field without case sensitivity? Requirement is also not to change data during records filtering in SORT.
I'll tried to do this with using INREC, but I registered that INCLUDE is executed before INREC clause. INREC also changed my output data...
I have no idea how to do this and of course I do not know if such comparission is even possible.
Let's following example show what i need:
As a source I have dataset:
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ
My "incorrect" sort condition is:
INCLUDE COND=(1,3,CH,EQ,C'ABC')
As an output I want get something like this:
Abcdef
aBcdef
ABCrrr
abcKDJ |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here are two different ways to do this with DFSORT:
Using ALTSEQ and AQ
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
ALTSEQ CODE=(81C1,82C2,83C3)
OUTFIL INCLUDE=(1,3,AQ,EQ,C'ABC')
/*
|
Using TRAN=LTOU
Code: |
//S2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
Abcdef
aBcdef
Bvsdjh
ABCrrr
sdhjhfu
abcKDJ
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(81:1,3,TRAN=LTOU)
OUTFIL INCLUDE=(81,3,CH,EQ,C'ABC'),BUILD=(1,80)
/*
|
|
|