|
In my test, I can see the subfile, exit, select a subfile-row and get the
detail screen but it crashes when there is no (or no more) subfile changed
record.
Another issue I encounter is in the write Subfile when the number or rows
reaches the SFLSIZ limit: I/O error CPF5003.
Here the RPG code I am using:
d RIOFB ds likeds(RIOFB_T) based(pRIOFB)
D pRvoid s *
D pRFile s *
D myPointer s *
/free
if operation = 'OPEN';
myPointer = Ropen('MYLIB/MYDSPF':'rr+');
...
elseif operation = 'WRITE';
if isSFL;
pRvoid = Rformat(myPointer:'MYSFL');
pRFile = Rwrited(myPointer:myOutputBuffer
:myOutputBufferLen
:myRrn);
else;
...
endif;
...
elseif operation = 'READC';
pRvoid = Rformat(myPointer:'MYSFL');
monitor;
pRIOFB = Rreadnc(myPointer:myInputBuffer
:myInputBufferLen);
on-error;
myEof = '1';
endmon;
// RIOFB.num_bytes = -1 means EOF
if RIOFB.num_bytes = myInputBufferLen;
myRrn = RIOFB.rrn;
else;
myEof = '1';
endif;
...
- When some subfile row are changed it works OK but when there is no (or
not anymore) subfile row changed Rreadnc throws an I/O error CPF5037
despite the monitor instruction.
- When the number of rows (myRrn) is greater than SFLSIZ (describe in
theSFLCTL)
Rwrited throws an I/O error CPF5003.
As an Amazon Associate we earn from qualifying purchases.
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.