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

This thread ...

Follow-Ups:
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.