case should only matter in QOpenSys.

On Sat, Jan 24, 2026 at 8:32 PM Roger Harman <roger.harman@xxxxxxxxxxx>
wrote:

I hadn't caught the case difference. Certainly could be the problem.

I'd be curious what the errno return code was.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark
Waterbury via RPG400-L
Sent: Saturday, January 24, 2026 4:51 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Mark Waterbury <mark.s.waterbury@xxxxxxxxxxxxx>
Subject: Re: What the beep is wrong with this?

Hi, Jon,
In one case, you have .../Bob/... in the path, but in the other case (the
SQL with the table function) you have .../bob/... in the path.
Could that be it?
Mark
On Saturday, January 24, 2026 at 07:07:24 PM EST, Jon Paris <
jon.paris@xxxxxxxxxxxxxx> wrote:

I'm playing with Bob and asked him (it?) to create an RPG program to read
an IFS file.

I'm familiar with all of the required APIs (or thought I was) - but the
Bob program will not open the file and I'm danged if I can see why. Here's
an extract of the code which demonstrates the issue.

Ctl-Opt DftActGrp(*No);

// C API Prototypes - renamed to avoid opcode conflicts
Dcl-Pr openFile Int(10) ExtProc('open');
*N Pointer Value Options(*String);
*N Int(10) Value;
*N Uns(10) Value Options(*NoPass);
*N Uns(10) Value Options(*NoPass);
End-Pr;

// Constants for open()
Dcl-C O_RDONLY 1;
Dcl-C O_TEXTDATA 16777216;

// Variables
Dcl-S FilePath Varchar(256) Inz('/home/PARIS/Bob/Test.csv');
Dcl-S FileDesc Int(10);

// Open the IFS file
FileDesc = openFile(FilePath: O_RDONLY + O_TEXTDATA );

If FileDesc < 0;
Dsply 'Error opening file';
Else;
Dsply 'File Open';
EndIf;

*InLr = *On;

The file opens just fine if I use SQL ( SELECT * FROM
TABLE(QSYS2.IFS_READ(PATH_NAME => '/home/paris/bob/Test.csv'))

So I don't think it is a permissions problem (and yes I have checked that
tooj. It has to be something dumb and I just can't see it.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.