|
That's not the value of ERRNO. Here's some code I use to get this value.
If you pass that value to strerr, you'll get a meaningful message for
the error.
Matt
D@__errno PR * ExtProc('__errno')
Dstrerror PR * ExtProc('strerror')
D errnum 10I 0 value
Derrno PR 10I 0
/free
Fp = open(%addr(File): Oflag);
If (Fp < 0);
SomeField = %str(strerror(errno));
EndIf;
/end-free
*//////////////////////////////////////////////////////////////*
* (errno) return Unix error number as an integer. *
*//////////////////////////////////////////////////////////////*
Perrno B
*--------------------------------------------------------------*
Derrno PI 10I 0
Dp_errno S *
Dretval S 10I 0 based(p_errno)
C eval p_errno = @__errno
C return retval
Perrno E
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Smith, Mike
Sent: Wednesday, May 31, 2006 2:32 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Reading from IFS
After executing this
C Eval Fp = open(%addr(File): Oflag)
C If Fp < 0
FP = -1
Michael Smith
iSeries.mySeries.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck
Sent: Wednesday, May 31, 2006 2:11 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Reading from IFS
File /pfflr/tstprf.txt will open, but File /pdfflr/snapiiiwf.txt will not.
What is the value of ERRNO? That will tell a lot. Also,look in the job log to see if there is a message regarding authority or the like. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.