I once worked in a shop where all the SMS routines were written with nested IF-THEN-ELSE Logic - the person who'd worked there before I came on board didn't believe in using SELECT-WHEN's. Talk about a nightmare to maintain! I finally re-wrote it all using SELECT-WHEN's which I personally find to be much more modular and much easier to maintain & modify. I find carefully placed WRITE statements to be essential in eliminating the kind of confusion demonstrated in the problem which generated this thread.
ddk Remember that NAVIQUEST is your friend. /////////////////////// Scott, I do not find them cumbersome or hard to read. Quite the opposite. I also indent two spaces, line up Dos and ENDs (and they are on lines by themselves), and line up WHENs and OTHERWISEs. Almost 20 years ago, when I started writing ACS routines, I employed these stylistic tricks because they enabled *ME* to read and understand my coding better. Now, I do it out of habit, I'm sure. Still...I find the style very useful. See below (I hope it comes out readable): /*--------------------------------------------------------------------*/ /* CHECK TO SEE WHETHER THE STORCLAS PASSED TO THE ROUTINE IS A */ /* RESTRICTED STORCLAS AND IF THE USER IS AUTHORIZED TO SET IT. IF */ /* NOT, EXIT THE ROUTINE WITH A CONDITION CODE OF 8. */ /* */ /* LOGIC SEQUENCE - 2 */ /*--------------------------------------------------------------------*/ WHEN (&STORCLAS ¬='' && &STORCLAS = &RESTRICT && &USER ¬= &SPECUSR) DO WRITE 'THE STORAGE CLASS (' &STORCLAS ') THAT YOU' WRITE 'SPECIFIED IS RESTRICTED' EXIT CODE(8) END I have absolutely no issues with SELECT WHEN logic and try and avoid IF THEN ELSE statements in favor of SELECT WHEN in most cases. Bob ************************************************************************************** This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof. Thank you. ************************************************************************************** ---------------------------------------------------------------------- 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