On Thu, 4 Dec 2008 16:16:34 -0500, Lizette Koehler <[EMAIL PROTECTED]> wrote:
>I would probably add a &LENGTH variable to account that the string length for testing my change if you second field is longer or shorter than expected. It might help to add WRITE statements to see what things look like when checking out IF tests. > >SET &LL = &LENGTH(&field) > >IF &SUBSTR(25:&LL,&STR(&LIST) EQ &STR(&field) THEN DO Sorry, Lizette, but that won't work. &SUBSTR expects start:end, not start:length. So perhaps IF &SUBSTR(25:25+&LL, ...) > >Let me know if this is the logic you are trying to set up > >IF the record length is longer than 35 characters > Then Check to see what field is supplied in list (like SPECIAL or OPERATIONS) >Otherwise ... > I'll also take this opportunity to point out that the OP's approach works for users who have SPECIAL or OPERATIONS, but not for users who have both, since he's looking only at the value starting in position 25. And really, I'd do this kind of thing in REXX, not CLIST. It's not safe to look at hard-coded positions in RACF command output, and REXX is much better at non-positional parsing of data. Even then you can have problems, because we do not consider the command output to be a programming interface, and it can change unexpectedly, but it's safer to use REXX. -- Walt Farrell, CISSP IBM STSM, z/OS Security Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html