× 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.



Hi Rick,

d Rename pr 10i 0 ExtProc('rename')
d OldFile * Value
d NewFile * Value

Okay, so Simon was exactly right in his guess about what you were doing wrong... Excellent intuition, Simon!

I am curious about your assertion that the rename function maps
differently depending on how the program is compiled. I did spend
time in the C Run-time Library Functions manual yesterday before
posting but I don't remember seeing anything about changing the
behavior based on the compile. I'll check again.

Here's a link to the Information Center page:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/renamefs.htm

the very first words on the page:

The rename() function can be defined to be either
Qp0lRenameUnlink() or Qp0lRenameKeep(), depending upon the
definitions of the _POSIX_SOURCE and _POSIX1_SOURCE macros . . .


Would I be better off using the API?

You _are_ using the API! (Or trying to.) What did you think you were calling?!

Anyway, it appears Sharon has already posted a prototype you can use... so your problem should be solved... But, FWIW, here's what I have coded in my IFSIO_H copy book:

/if defined(RENAMEUNLINK)
D rename PR 10I 0 ExtProc('Qp0lRenameUnlink')
D old * Value options(*string)
D new * Value options(*string)
/else
D rename PR 10I 0 ExtProc('Qp0lRenameKeep')
D old * Value options(*string)
D new * Value options(*string)
/endif

You can get the whole copy book with all of the IFS API definitions here:
http://www.scottklement.com/presentations/IfsSources.zip

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.