I am modifing some code I found, and trying to add multiple 'or' statement. I have tried several different way to get the code to compile, but I always get errors. Can someone please tell me the proper syntax for the following statement below??
if Jobbstatus = 'MSGW' and SubShort = 'QBATCH' or +
Jobbstatus = 'MSGW' and SubShort = 'QPGMR' or +
Jobbstatus = 'MSGW' and SubShort = 'QPGMR1';
What I'm trying to test is, if Jobbstatus is MSGW, and if SubShort is any of the following subsystems, QBATCH, QPGMR, QPGMR1.
Also, how about if Jobbstatus was either 'MSGW' or 'RUN'? I have a second if statement, but it would be nice if I could test both MSGW and RUN along with the different subsystems as well. That would eliminate the need for 2 if statements.
if Jobbstatus = 'MSGW' or 'RUN' and SubShort = 'QBATCH' or +
SubShort = 'QPGMR' or +
SubShort = 'QPGMR1';
AS400 - 570
May 17, 2010 1:41 PM
May 19, 2010 2:53 PM