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



Scott

The cpy option looks the best option, I was after advice as to whether I
was missing the obvious as there are UNIX api's to perform most other
IFS functions.

Regards

Andy Youens
FormaServe Systems

T: 01908 319566
F: 01908 316000
M: 07770 380276

E: mailto:Andy@FormaServe.Co.Uk
W: www.FormaServe.Co.Uk



-----Original Message-----
From: Scott Klement [mailto:klemscot@klements.com]
Sent: 12 August 2002 18:14
To: rpg400-l@midrange.com
Subject: RE: Copy IFS File



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?
>

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@midrange.com To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.