Hi Barbars
Yeah, but this isn't an Open Access file - here's the code for the RPG -
CTL-OPT dftactgrp(*no) actgrp(*caller);
CTL-OPT option(*srcstmt : *nodebugio);
ctl-opt alwnull(*usrctl);
DCL-F titlesl1 disk(*EXT) USAGE(*INPUT) KEYED usropn
infds(tl1ds);
DCL-DS titlesI likerec(TITLESR : *input);
DCL-S msg CHAR(52);
dcl-s err ind;
dcl-s eof ind;
dcl-ds tl1ds;
fmsgid char(7) pos(46);
end-ds;
dcl-ds stat psds;
msgid char(7) pos(40);
msg1 char(40) pos(91);
msg2 char(40) pos(131);
end-ds;
//----------------------------//
// Procedure name: Test11R //
//----------------------------//
DCL-PR Test11R;
END-PR;
DCL-PI Test11R;
END-PI;
// Display description
dsply 'SETLL *START and READE with no key specified';
// Open the logical file TITLESL1
open titlesl1;
// SETLL *START
setll *start titlesl1;
// ReadE TITLESL1 with no key specified
reade(e) *key titlesl1 titlesI;
err = %error();
if not err;
eof = %eof(titlesl1);
if not eof;
msg = 'Title ID: ' + titlesI.TITLE_ID;
dsply msg;
msg = 'Pub ID : ' + titlesI.PUB_ID;
dsply msg;
msg = 'Pub Date: ' + %char(titlesI.PUBDATE);
dsply msg;
else;
dsply 'EOF';
endif;
else;
dsply 'ERROR';
if msgid <> *blanks;
msg = 'MSGID - ' + msgid;
dsply msg;
msg = 'MESSAGE - ' + msg1;
dsply msg;
if msg2 <> *blanks;
msg = ' ' + msg2;
dsply msg;
endif;
endif;
endif;
// Close the logical file TITLESL1
if %open(titlesl1);
close titlesl1;
endif;
*inlr = *on;
TABLESL1 is an LF over TABLES, which is like this -
CREATE TABLE TITLES (
TITLE_ID VARCHAR(6) NOT NULL ,
TITLE VARCHAR(80) NOT NULL ,
"TYPE" CHAR(12) NOT NULL DEFAULT 'UNDECIDED' ,
PUB_ID CHAR(4) DEFAULT NULL ,
PRICE DECIMAL(19, 4) DEFAULT NULL ,
ADVANCE DECIMAL(19, 4) DEFAULT NULL ,
ROYALTY INTEGER DEFAULT NULL ,
YTD_SALES INTEGER DEFAULT NULL ,
NOTES VARCHAR(200) DEFAULT NULL ,
PUBDATE TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP )
RCDFMT TITLESR
TITLESL1 is keyed by PUB_ID, PUBDATE DESC.
Cheers & much thanks
Vern
On 11/25/2015 2:18 PM, Barbara Morris wrote:
On 11/25/2015 8:01 AM, Vernon Hamberg wrote:
...
It appears that the program-status information has not been set yet when
using the error extender.
It also appears that there is not an I/O exception sent that triggers
the RNX1299.
Hi Vern, I have only ever seen this behaviour with Open Access files
when the handler communicates the error by setting the "status"
subfield in the handler parameter rather than by sending an exception.
In that case, since there is no exception, there is nothing to trigger
the exception handler sets the PSDS.
As an Amazon Associate we earn from qualifying purchases.