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



Pascal,

signals are, as far as I can tell, unrelated to what you're doing.

Signals are usually used for asynchronous notifications, for example, your program might be running along processing things when another job wants to interrupt it and tell it to quit. A signal would be ideal here.

SIGIO is usually used in sockets programming when you want your program to be notified of data arriving on the socket, while it's doing something else.

There are a few cases in unix programming where signals are used for errors (those that are normally fatal) but, it's not the normal means of error handling -- and the _Ropen/_Rread/etc functions are not Unix functions, they are for IBM i only -- so it would not make sense for them to use signals for error handling.

Anyway...

There is a parameter to _Ropen() that controls whether programs are sent escape messages or not. Take a look at the 'rtncode' parameter, here:
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rtref/ropen.htm

Not 100% sure how it interacts with Rreadnc() since I've never used the recio functions with subfiles, personally.

-SK


On 1/7/2014 12:38 PM, Pascal Polverini wrote:
Hi Buck,

I get an escape message.
I/O error CPF5037 was detected in file MYDSPF(C G D F).

I have attached all the prototypes used for RPG (Rxxx_H.txt).

I have also tried to add a signal() on my code but I don't know if this is
relevant or coded properly. This (or the way it is coded) doesn't change
anything

Line added at the very beginning of the code:
signal(SIGIO : %paddr(SignalHandler));

Here the procedure:
P signalHandler b
D signalHandler pi
D sig 10i 0 Value
/free
dsply ('signalHandler called');
return;
/end-free
P signalHandler e

To test it, you simply need to run a READC without having any record
changed in your subfile (Normally a simple Enter on a SFL display to a pgm
that uses / checks for readc).

Pascal




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.