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



Jeff, take a look at the docs for open() - when the return code is -1, there is a variable called errno that has another number in it. These are listed at the bottom of the documentation. You can find these also in a source member ERRNO in QSYSINC/H. You might want to make constants in a /copy member for the values you expect to encounter.

There are system messages with more info - CPExxxx where xxxx is the value of errno can be displayed. (Learned this on this list!) E.g., for errno=3009

Message ID . . . . . . . . . :   CPE3009
Message file . . . . . . . . :   QCPFMSG
  Library  . . . . . . . . . :     QSYS

Message . . . . :   File is not opened for write operations.
Cause . . . . . :   You tried to update a file that has not been opened for
  write operations.
Recovery  . . . :   Open the file to allow writes and try your operation
  again.

HTH
Vern

At 04:56 PM 7/11/2005, you wrote:

I am using the IFS IO API's and am having a problem creating a file in an RPG IV program.
I am getting back a -1 in the File Descriptor when using the OPEN.
My file name is \root\ifsreports\JEFF\corbtch.xls, Open_Flag is O_CREAT + O_WRONLY + O_CODEPAGE, Mode_Flag is S_IWUSR + S_IRUSR + S_IRGRP + S_IROTH.
Is there any way to determine what it does not like?




Jeff Young
Sr. Programmer Analyst
Dynax Solutions, Inc.
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3

IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3











---------------------------------
Yahoo! Mail
 Stay connected, organized, and protected. Take the tour
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.