BROWSE Input File Line 000
Command ===>
********************************* Top of Data ****************
1 2 3 4
5....0....5....0....5....0....5....0....5
<RESOURCES>>XXXX !..AAA.A.......
<RESOURCES>>XXXX !..AAA.AAB.... .......
AAAAAAAAAAAAAFFFF
AAAAAAAAAAAAAFFFF
Command ===>
********************************* Top of Data ****************
1 2 3 4
5....0....5....0....5....0....5....0....5
<RESOURCES>>XXXX !..AAA.A.......
<RESOURCES>>XXXX !..AAA.AAB.... .......
AAAAAAAAAAAAAFFFF
AAAAAAAAAAAAAFFFF
We can receive different combinations and the sort should be able to check the no AAAAAAAAAAAAA and the char 'FFFF'.
And also all the time we need to have the Resources. The Resources are always fixed. The AAAAAAAAAAAAA and FFFF can keep on varying.
So this what I did
SORT FIELDS=COPY
OUTFIL FNAMES=FFFF,
INCLUDE=(((5,13,CH,EQ,C'AAAAAAAAAAAAA'),
OR,(5,13,CH,EQ,C'TTTTTTTTTTTTT')),AND,
((18,4,CH,EQ,C'FFFF')),OR,
((18,4,CH,EQ,C'XXXX')))
/*
OUTFIL FNAMES=FFFF,
INCLUDE=(((5,13,CH,EQ,C'AAAAAAAAAAAAA'),
OR,(5,13,CH,EQ,C'TTTTTTTTTTTTT')),AND,
((18,4,CH,EQ,C'FFFF')),OR,
((18,4,CH,EQ,C'XXXX')))
/*
But with the above sort I can manage to get resources (ie <Resources>>XXXX) no AAAAAAAAAAAAAFFFF in the output file.
And when I use the sort below I get only AAAAAAAAAAAAAFFFF in the output no <RESOURCES>>XXXX.
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=FFFF,
INCLUDE=(((5,13,CH,EQ,C'AAAAAAAAAAAAA'),
OR,(5,13,CH,EQ,C'TTTTTTTTTTTTT'),
OR,(7,9,CH,EQ,C'RESOURCES')),AND,
((18,4,CH,EQ,C'FFFF')),OR,
((18,4,CH,EQ,C'XXXX')))
/*
SORT FIELDS=COPY
OUTFIL FNAMES=FFFF,
INCLUDE=(((5,13,CH,EQ,C'AAAAAAAAAAAAA'),
OR,(5,13,CH,EQ,C'TTTTTTTTTTTTT'),
OR,(7,9,CH,EQ,C'RESOURCES')),AND,
((18,4,CH,EQ,C'FFFF')),OR,
((18,4,CH,EQ,C'XXXX')))
/*
Please let me know how to get both of them in the same file.