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



After numerous suggestions and great responses by several on the list the
call to the QGYOLSPL api is now working correctly. Please see below
snippets from several of the responses that aided in correcting the issue.


I very much appreciate all of the responders assistance.

Thanks,
Mike Garrison
Werner Enterprises, Inc.



CRPence <CRPbottle@xxxxxxxxx> wrote on 12/02/2011 04:48:33 PM:

With mention of filtering, a cursory review of the code <<snipped
from this reply>> shows the third parameter [which is OUTPUT] is using
the same uninitialized DS as the sixth parameter [which is INPUT] for
the filtering. Using the same storage for both an input and an output
parameter is by itself, very likely to lead to catastrophic errors.
Thus that is very likely that is the cause of the problem, and very
possibly causing the API to fail long before the API has even been able
to setup error code processing to inform by error code versus error
message.

Regards, Chuck


As Chuck noted I had the third parameter on the call of the api
referencing the wrong data structure. I changed it to the correct data
structure and I still received the same MCH1210 error from the API program
QGYOLSPL.


Stuart Rowe <rowestu@xxxxxxxxx> wrote on 12/02/2011 03:51:22 PM:

Mike,

It'd help a great deal if you could divulge the source statement number
to
which the error was sent, and/or that from which it originated. That's
one
of your best clues as to just exactly where the error is occurring. I
could not guess from your post whether your program is crashing or the
API
program is crashing (which would be odd).

This looks odd to me: Try just inz on the short integer.

D siDtaTyp 5i 0 inz( x'00' )


BTW probably would not cause this issue, but your error code structure
is
declared incorrectly. There's a single reserved blank between msgid and
data for format ERRC0100.

Stu



The error is being issued by the QGYOLSPL api program as described in the
subject. As Stu noted, I corrected the initialization of the siDtaTyp
variable and added the missing variable in the error code data structure.
After making these changes I still received the error.



CRPence <CRPbottle@xxxxxxxxx> wrote on 12/02/2011 04:48:33 PM:

From an old discussion found on the web, and an old APAR, the likely
origin is incorrect filtering; either by specification to the API, or by

the program which performs the filtering for the API, such that the
actual number of spooled files returned greatly exceeds what should have

been included by the selection.?



Based on Chuck's comments I reviewed my Filter Information data structure
and realized that at at some point I had deleted the data structure
subfields that describes how the spool file information should be
filtered. Once I added the ds_FilterInf subfields back to the code then
the api functioned correctly. The corrected code is as shown below. Just
a note that this is not a complete functioning program but is a subset of
the code just to demonstrate the error.


D API_OpnLstSplF pr extpgm( 'QGYOLSPL' )
D Receiver 65535a
D ReceiverLen 10i 0
D ListInfo 80a
D NbrOfRcdRtn 10i 0
D SortInfo 1024a
D FilterInfo 1024a
D QualJobName 26a
D FormatOfList 8a
D ErroCode 256a

*? Structures for Open List of Spooled Files API
D/include QSYSINC/QRPGLESRC,QGYOLSPL
D/include QSYSINC/QRPGLESRC,QGY
D/include QSYSINC/QRPGLESRC,QUSEC

* Variables for optional parameters and pointers
D v_RcvVar s 65535a
D v_RcvVarLen s 10i 0 inz(%size( v_RcvVar ))
D v_NbrRcdsRtn s 10i 0 inz( 50 )

D ds_SortInf ds 1024
D siNbrKeys 10i 0 inz
D siStrPos 10i 0 inz
D siFldLen 10i 0 inz
D siDtaTyp 5i 0 inz
D siSrtOrd 1a inz( x'00' )
D siRsv1 1a inz( x'00' )

D ds_FilterInf ds 1024
D fiNbrUsers 10i 0 inz( 1 )
D fiUsers 10a inz( '*ALL' )
D fiRsv1 2a inz
D fiNbrOutq 10i 0 inz( 1 )
D fiOutqNm 10a inz( '*ALL' )
D fiOutqLib 10a inz
D fiFormType 10a inz( '*ALL' )
D fiUserData 10a inz( '*ALL' )
D fiNbrSts 10i 0 inz( 1 )
D fiSplfSts 10a inz( '*ALL' )
D fiRsv2 2a inz
D fiNbrDvc 10i 0 inz( 1 )
D fiDvcNm 10a inz( '*ALL' )
D fiRsv3 2a inz

D v_QualJob s 26a inz
D v_ListSplfFmt s 8a inz( 'OSPL0100' )

* Errors data structure
D ds_ErrorCode ds 256
D ecErrPrv 10i 0 inz( 256 )
D ecErrAvl 10i 0 inz
D ecErrID 7a inz
D ecRsrvd 1a
D ecErrDta 132a

D ds_LstInf ds 80
D liTotRec 10i 0 inz
D liRecTrn 10i 0 inz
D liReqHdl 4a inz
D liRecLen 10i 0 inz
D liInfCmp 1a inz
D liCrtDtTm 13a inz
D liStsInd 1a inz
D liRsv1 1a inz
D liInfRtnLen 10i 0 inz
D liRecvd1 10i 0 inz
D liRsv2 40a

/free

API_OpnLstSplF( v_RcvVar : v_RcvVarLen : ds_LstInf : v_NbrRcdsRtn
: ds_SortInf : ds_FilterInf : v_QualJob : v_ListSplfFmt
: ds_ErrorCode ) ;

*inlr = *on ;
return ;

/end-free

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.