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



>Have you checked 'errno' after the first open() ?

Ah!  No I have not.  That may be the answer!  But would it have anything in
'errno' if the open() operation returned zero which tells me it was a
successful open?

Aaron Bartell



-----Original Message-----
From: Nicolay, Paul [mailto:paul_nicolay@merck.com]
Sent: Wednesday, March 20, 2002 9:17 AM
To: 'rpg400-l@midrange.com'
Subject: RE: Accessing data in IFS


Aaron,

Have you checked 'errno' after the first open() ?

Kind regards,
Paul

-----Original Message-----
From: Bartell, Aaron L. (TC) [mailto:ALBartell@taylorcorp.com]
Sent: 20 March, 2002 16:10
To: rpg400-l@midrange.com
Subject: RE: Accessing data in IFS


There is a programmer in my shop working on a program that opens a file in
the IFS to read in a template for an email.  Now remember, this file already
exists and is about 2k.  We are having very weird results to say the least.
When we call it interactively, the first time it returns a file descriptor
of 0.  The second time we call the program it returns a file descriptor of 3
and we get the desired output.

Any ideas?  I should mention that the open api is wrapped in a module.  The
module contains the code that came from "Who knew you could do that with
RPG. . ." for the open(), read(), write(), and close().

So right now to fix the problem she calls the #Open procedure twice which in
essence is calling the open() api four times(open, close, open; open, close,
open).

It is almost like it can't find the file the first time, but the second time
it finds it just fine.

Aaron Bartell
_______________________________________________
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.


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