> The input contains '0102' and '0205' records and simple statement with
only one type show expected output.

Radoslaw,

The given conditions should work , however you should realize that IRRDB00
output is record format V and the length of the record is stored in RDW. So
a 0102 record with  authority USE can only have a length of 26 , but you
are checking the AUTH field for a length of 7 bytes. In such cases VLSCMP
parm will be useful, however it would pad binary zeroes for short records,
which would make the 28,7,CH,BE,C'USE' as true as there are binary zeroes
after the word USE and when compared against spaces it would be a true
condition and will be included in the output. So to handle such scenario,
just do the compare on 3 bytes

I also added comments to the control cards so that it is easy to understand

//SYSIN    DD *
  OPTION COPY,VLSCMP
  INCLUDE COND=((05,4,CH,EQ,C'0205',AND,        $ USCON_RECORD_TYPE
                (83,3,CH,EQ,C'YES',OR,          $ USCON_GRP_ADSP
                 88,3,CH,EQ,C'YES',OR,          $ USCON_GRP_SPECIAL
                 93,3,CH,EQ,C'YES',OR,          $ USCON_GRP_OPER
                 98,3,CH,EQ,C'YES')),OR,        $ USCON_REVOKE
                (05,4,CH,EQ,C'0102',AND,        $ GPMEM_RECORD_TYPE
                 28,3,CH,NE,C'USE'))            $ GPMEM_AUTH
/*
This should give produce the right results

Ideally I would have used DFSORT symbols for all the fields and that way it
is easy to follow. Something like this

//SYMNOUT  DD SYSOUT=*
//SYMNAMES DD *
RDW,1,4,BI
USCON_RECORD_TYPE,5,4,CH
USCON_GRP_ADSP,83,3,CH
USCON_GRP_SPECIAL,88,3,CH
USCON_GRP_OPER,93,3,CH
USCON_REVOKE,98,3,CH
GPMEM_RECORD_TYPE,5,4,CH
GPMEM_AUTH,28,3,CH
/*

//SYSIN    DD *
  OPTION COPY,VLSCMP
  INCLUDE COND=((USCON_RECORD_TYPE,EQ,C'0205',AND,
                (USCON_GRP_ADSP,EQ,C'YES',OR,
                 USCON_GRP_SPECIAL,EQ,C'YES',OR,
                 USCON_GRP_OPER,EQ,C'YES',OR,
                 USCON_REVOKE,EQ,C'YES')),OR,
                (GPMEM_RECORD_TYPE,EQ,C'0102',AND,
                 GPMEM_AUTH,NE,C'USE'))
/*

Thanks
Kolusu
DFSORT Development
IBM Corporation



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to