|
a) Caught that right after I sent it. :-) b) You're right on the dow vs dou. Thanks. c) I like the %status in case I decide to use the subprocedure on more than a do loop. Hair bit more informational in that case. I'd like to see the SELECT statement with the flexibility of sql's CASE statement. In sql I can do: select field1, case When TotAmt <= 100 Then 'Small' When TotAmt <= 500 Then 'Medium' Else 'Large' End As SaleSize >From Sale or Select field1, case TotAmt When <= 100 Then 'Small' When <= 500 Then 'Medium' Else 'Large' End As SaleSize >From Sale That way I don't have to execute a subprocedure potentially multiple times, or store the return into a work variable. Translated to rpg: Select; When ReadLoopProc()=00012; // this error occurred // Then do this When ReadLoopProc()=00000; // ok // Then do the other Other; // Handle unknown error EndSl; Becomes: Case ReadLoopProc(); When 00012; // this error occurred // Then do this When 00000; // ok // Then do the other Other; // Handle unknown error EndCase; Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.