×
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.
Barbara,
I looked at using the *STRING option but from the documentation it didn't sound like the correct application.
Rick
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Tuesday, June 22, 2010 4:56 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: C rename returns -1 but error text says no error exists
Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
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);
--
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
As an Amazon Associate we earn from qualifying purchases.