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



This isn't a simple matter of knowing the prototype.   There is no copy
API (to my knowledge) you need to:

    1) Call the stat() (etc) API to determine which attributes of the file
        are to be maintained (such as permissions, ownership, code page/ccsid,
        create date, last modified date, etc)

    2) Call the open() API for both the input file & output file.  Setting
        the code page & permissions on the output file as appropriate

    3) run a loop that calls the read() & write() APIs to copy the actual
        data from one file to another.

    4) close both files

    5) Set any other attributes (such as change date, owner, etc) using
         the appropriate API.

So, it's not just one prototype you're looking for, but at least 5
prototypes, plus data structures and named constants.

Why can't you just use the CPY command with QCAPCMD, as other people
have suggested?


On Mon, 12 Aug 2002, Andy Youens wrote:

> Yes I am doing this from RPG so it is the correct list & I'm looking for
> the prototypes to perform this.
>
> Thanks for your help & assistance!
>
>
> -----Original Message-----
> From: rob@dekko.com [mailto:rob@dekko.com]
>
> While this is definitely not an RPG topic and you are on the wrong
> list...
>
> Why not just use the CPY command?  Is it because you are doing this in
> RPG and you like the error structures that come from the api's better
> than the error handling of system(), QCAPCMD or QCMDEXC?
>



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.