× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It may not sound like the right application, but it is. Well, that is if
you use the IFS APIs. I would recommend you use the prototype that Sharon
so kindly contributed a short time ago. That one is exactly like mine
except that I don't rename it from IBM's name.

Still, I haven't seen an answer about negative return code while errno is
zero. OTOH, I have not looked at documentation for the RENAME API that
you're using.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Some folks are born fools, but the majority of us become so through
practice.



I looked at using the *STRING option but from the documentation it
didn't sound like the correct application.


Nope, that's not it. I still get a zero error number and 'There is
no error' text.

Don't the strings need to be null terminated? That's why I added the
null to the end.


They do need to be null terminated, but you can get RPG to do it for
you by coding OPTIONS(*STRING) on the prototype and coding the passed
parameter as a character value rather than a pointer.

Without OPTIONS(*STRING)

temp = %trim(name) + x'00';
proc(%addr(temp));

With OPTIONS(*STRING)

proc(%trim(name));

With OPTIONS(*STRING : *TRIM)

proc(name);



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.