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