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



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
*-------------------------------------------------------------------------
* C Prototypes
*-------------------------------------------------------------------------
D Ropen PR * Extproc('_Ropen') open
D pRFile * Value Options( *String )
D pOptParm * Value Options( *String:*nopass)

D Rformat PR * Extproc('_Rformat')
D pRFile * Value Options( *String )
D pFmt * Value Options( *String )

D Rpgmdev PR 10i 0 Extproc('_Rpgmdev') pgm device
D pRFile * Value Options( *String )
D pDevice * Value Options( *String )

D Racquire PR 10i 0 Extproc('_Racquire') acquire new device
D pRFile * Value Options( *String )
D pDevice * Value Options( *String )

D Rclose PR 10i 0 Extproc('_Rclose') close
D pRFile * Value Options( *String )

D Rwrite PR * Extproc('_Rwrite') write
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value

D Rwrited PR * Extproc('_Rwrited') write sfl
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value
D rrn 10i 0 Value

D Rreadindv PR * Extproc('_Rreadindv') read dsp
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value
D opt 10i 0 Value options(*nopass)

D Rreadn PR * Extproc('_Rreadn') read next
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value
D opt 10i 0 Value options(*nopass)

D Rwrread PR * Extproc('_Rwrread') exfmt
D pRFile * Value Options( *String )
D pInpBuf * Value Options( *String )
D onpBufSize 10i 0 Value
D pOutBuf * Value Options( *String )
D outBufSize 10i 0 Value

D Rreadd PR * Extproc('_Rreadd') chain
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value
D opt 10i 0 Value ? __DFT __NO_LOCK
D rrn 10i 0 Value

D Rupdate PR * Extproc('_Rupdate') update
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value

D Rreadnc PR * Extproc('_Rreadnc') readc
D pRFile * Value Options( *String )
D pBuf * Value Options( *String )
D bufSize 10i 0 Value

D Ropnfbk PR * Extproc('_Ropnfbk') get open feedbackInf
D pRFile * Value Options( *String )

D Riofbk PR * Extproc('_Riofbk') get io feedback info
D pRFile * Value Options( *String )

D Rindara PR * Extproc('_Rindara')
D pRFile * Value Options( *String )
D pIndara * Value Options( *String )

D feof PR 10i 0 Extproc('feof') test eof ind
D pRFile * Value Options( *String )

D ferror PR 10i 0 Extproc('ferror') test error ind
D pRFile * Value Options( *String )

D signal PR Extproc('signal')
D sig 10i 0 Value
D pRhandler * ProcPtr value

D signalHandler PR
D sig 10i 0 Value

*-------------------------------------------------------------------------
* Global var
*-------------------------------------------------------------------------

**-------------------------------------------------------
* I/O Feedback Structure (returned by most Rreadx calls)
**-------------------------------------------------------
D RIOFB_T DS based(Template)
D align
D qualified
D key *
D sysparm *
D rrn 10U 0
D num_bytes...
D 10I 0
D blk_count...
D 5I 0
D blk_filled_by...
D 1A
D flags...
D 1A
D 20A

**-------------------------------------------------------
* "Record" file handle data type
**-------------------------------------------------------
D RFILE_T DS qualified based(Template)
D 16A
D in_buf *
D out_buf *
D 48A
D riofb likeds(RIOFB_T)
D 32A
D buf_length 10U 0
D 28A
D in_null_map *
D out_null_map *
D null_key_map *
D 48A
D min_length 10I 0
D null_map_len 5I 0
D null_key_map_len...
D 5I 0
D 8A

D pRFile s *
D pRvoid s *
D int s 10i 0
* QSYSINC/H RECIO
D c__DFT c x'0B000100'
D c__NO_LOCK c x'00000001'
D EOF c -1
* QSYSINC/H SIGNAL
D SIGIO c 9
D SIGINT c 4
D SIGALL c 10
D SIGTTIN c 21
D SIGTTOU c 22
D SIGXFSZ c 40

* QSYSINC/H XXFDBK _XXDEV_LST_T
d XXDEV_LST_T ds based(p_XXDEV_LST_T) qualified align
d pgm_dev_name 10
d reserved1xx 50
d dev_desc_name 10
d dev_classxx 1
d dev_type 1
d num_rows 5i 0
d num_columns 5i 0
d flags1xx 5u 0
d synch_level 1
d conversation_t 1
d reserved2xx 50

* QSYSINC/H XXFDBK _XXOPFB_T
d XXOPFB_T ds based(p_XXOPFB_T) qualified align
d odp_type 2
d file_name 10
d library_name 10
d spool_file_nam 10
d spool_lib_name 10
d spool_file_num 5i 0
d pgm_record_len 5i 0
d reserved1 2
d member_name 10
d reserved2 8
d file_type 5i 0
d reserved3 3
d rows 5i 0
d columns 5i 0
d num_records 10i 0
d access_type 2
d dup_key_indic 1
d src_file_indic 1
d reserved4 10
d reserved5 10
d vol_label_offs 5i 0
d max_blocked_re 5i 0
d overflow_lineN 5i 0
d blocked_rec_ic 5i 0
d reserved6 4
d flags 3u 0
d requester_dev_ 10
d file_open_coun 5i 0
d reserved7 2
d num_based_pf_m 5i 0
d flags2 3u 0
d reserved8 2
d max_rcd_length 5i 0
d ccsid 5u 0
d flags3 3u 0
d opfb_ext_offse 10i 0
d max_pgm_device 5i 0
d num_pgm_device 5i 0
d xXXDEV_LST_T likeds(XXDEV_LST_T) dim(250)

* QSYSINC/H XXFDBK _XXIOFB_T
d XXIOFB_T ds based(p_XXIOFB_T) qualified align
d file_dep_fb_of 5i 0
d write_count 10i 0
d read_count 10i 0
d write_read_cnt 10i 0
d other_io_count 10i 0
d reserved1io 1
d cur_operation 1
d rec_format 10
d dev_class 2
d dev_name 10
d lastIOrecLen 10i 0
d reserved2io 80
d num_recs_retri 5i 0
d lastIOrecLen2 5i 0
d reserved3io 2
d cur_blk_count 10i 0
d reserved4io 8

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.