|
Normally I would alternate case on a PI. However I plan on using this with SQL UDF's and they are so picky. Returning null instead of a dummy value would allow me to select testchar, coalasce(stripemail(testchar), 'oh crud') from myfile But as I now see that's just moving the replacing of the dummy character from the RPG to the SQL. Still, there may be other things I want to do versus coalasce. Buck, Since I am using this in a UDF I am not interested in an additional parameter for in/out processing. Can be done, but really complicates where I use it. I understand what you are saying about the C method. However doesn't system() export a separate variable? Rob Berendt -- "All creatures will make merry... under pain of death." -Ming the Merciless (Flash Gordon) Barbara Morris <bmorris@xxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 01/14/2004 05:30 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To rpg400-l@xxxxxxxxxxxx cc Fax to Subject Re: How to return null on a PI rob@xxxxxxxxx wrote: > > P STRIPEMAIL B export > D STRIPEMAIL PI like(EmailAddress) > D SourceString 512a const > If EmailAddress is a pointer, you can return *NULL (so I guess it's not a pointer :). If it's a varying string, you could return ''. If you mean something like an ALWNULL field, you can't. You could define a named constant with your prototype with a value that is nonsense for your procedure. D STRIPEMAIL_NULL c 'x' caller: ret = STRIPEMAIL (string) if ret = STRIPEMAIL_NULL ... Stripe Mail? (Ya, I know, Strip Email). _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.