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