PL/1 Syntax problem

Question: I am writing a PL/1 program for OS z/90 . I want to write something like this using 'IN'.

IF user_name IN ('ABC','XYZ') THEN DO;
....
....
END;

I am geting compiler error and the keyword THEN is not getting recognised by compiler. Please give me the correct syntax
anonymous

Answer:

SELECT (user_name)
   WHEN ('ABC','XYZ') DO;
  ...
  ...
  END;
  OTHERWISE;
END;

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate