×
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.
On 02-Jun-2016 18:34 -0500, Vinay Gavankar wrote:
I am an occasional COBOL user, and was wondering how I would go
about trapping an error returned by the QSNDDTAQ API called from a
COBOL program.
No mention whether the code is OPM or ILE; though perhaps implied by
some later reference vs explicitly noted, e.g. reference to the ON
EXCEPTION clause?
We want to trap the condition when Data Queue is full (CPF950A) and
go in a DLYW before trying again.
I think calling a CL program from the COBOL to call the API, instead
of calling the API directly might work, but I have been told to
check if it is possible to do without adding a new CL program call.
I tried ON EXCEPTION clause, but that seems to trap only errors on
the CALL command (program not found, parameter mismatch etc), so does
not work in this case.
Any suggestions, guidance will be greatly appreciated.
FWiW, coding\compiling and then registering at run-time an ILE
Condition Handler is likely to be what is needed to intercept the
exception; i.e. if not deferred to another program[ming language], e.g.
to a CL program.
IBM i -> IBM i 7.1 -> Programming -> Programming languages -> COBOL ->
ILE COBOL Programmer's Guide -> ILE COBOL Programming Considerations ->
_ILE COBOL Error and Exception Handling_
[
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzase/sc092540464.htm#errhnd]
Perhaps there is value in providing simplified sample code that
includes the failing invocation [along with compiling instructions plus
any setup such as creating and filling the queue]; as well, the version
with the ON EXCEPTION coded.? That would allow a reader [with the
compiler(s)] to compile and test the run-time effects, or make
modifications\additions that show how the desired delay might be coded.
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.