If it returned a positive number, that means there is no error. You
should only check for error if it returns negative value (I think).
See this link
http://www.cplusplus.com/reference/clibrary/cstdio/fputs.html
<Rick.Chevalier@xxxxxxxxxxxxxxx> wrote in message
news:<mailman.3831.1226440231.13295.rpg400-l@xxxxxxxxxxxx>...
The return code is 22 which is the number of bytes written.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Tuesday, November 11, 2008 1:30 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Error 3450: Descriptor is not valid on write to IFS
Just curious to know what the value of rtncd is after executing the
ifsput? I notice that you are retrieving the error without checking to
see if the return code is ok or not. As far as I know the error code
does not get reset between api calls. You should only lookup the error
code when api indicated that there is an error.
<Rick.Chevalier@xxxxxxxxxxxxxxx> wrote in message
news:<mailman.3719.1226420035.13295.rpg400-l@xxxxxxxxxxxx>...
I am writing a program to output information to the IFS. The first step
is to copy static data from an existing IFS file into the new one.
After that add the dynamic data. So far I just have the piece to copy
the static data.
The code was cloned from an existing production program and is used
anywhere we want to access the IFS from RPG. The code looks the same in
both programs. I'm missing something though. I have searched the
archives and InfoCenter but haven't seen anything yet that doesn't look
right. In one of the archive posts Scott Klement asked about the file
description changing before the write. The descriptor does change
between the first open and the second open of the output file but not
between that point and the write. The files involved only exist for the
process I am building so someone else modifying them is not a concern at
this point.
The program code can be seen here
http://code.midrange.com/11f767043f.html. Any help would be greatly
appreciated.
Rick Chevalier
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.
----------
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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.