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



There are a couple other ways to "humanly" find out what the ERRNO means:

1. Put CPE in front of the ERRNO and use DSPMSGD, as here -

DSPMSGD CPE3025

2. Look in a member of QSYSINC/QRPGLESRC named ERRNO (I think) - or in QSYSINC/H - not sure when ERRNO made it into QRPGLESRC there, maybe 6.1, thanks to Barbara

Cheers
Vern

On 10/26/2016 5:59 PM, Buck Calabro wrote:
On 26 October 2016 at 18:33, D Freinkel (a4g)
<DFreinkel@xxxxxxxxxxxxxxxxx> wrote:
The return code is 3025.
Assuming you're using the C functions to open the file, there is a
variable that the C documentation will call ERRNO. Knowing that name
is actually useful, because you can search the web for ERRNO 3025 and
find web sites like
https://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/unix14.htm

3025 is the classic 'No path or directory'. We RPG programmers tend
to ignore blanks, but they are quite important to the C functions.
there is a big difference between these two things:

dcl-s file1 char(64); inz('thisfile');
dcl-s file2 varchar(64); inz('thisfile');

fp = open(file1); // 3025
fp = open(file2); // opens

This is because file1 is actually 'thisfile' followed by a bunch of
blanks, and blanks -- even trailing blanks -- are legal in file names.
So when IBM i tries to find 'file1
' it probably can't.

I like variable length fields for this purpose. If you have to get
the file name off a display or other block mode record, consider
%trimr() to get it into the variable length field.
--buck


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