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




Hmm. You exceed 16Mb with the QUSLSPL API and QGYOLSPL returns MCH1210 when 65535 bytes are provided. Have you thought about converting your process to C?


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent: Friday, December 02, 2011 11:51 AM
To: RPG programming on the IBM i / System i
Subject: RE: MCH1210 error in QGYOLSPL api

Why? The QGYOLSPL api is just for that type of purpose (it's the backbone of WRKSPLF, etc.)



From: "Monnier, Gary" <Gary.Monnier@xxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>,
Date: 12/02/2011 01:49 PM
Subject: RE: MCH1210 error in QGYOLSPL api
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Mike,

If there are so many spooled files you are overflowing 16Mb, maybe you're
going at it in too forward a fashion. You may have to go through the
process of listing output queues and then use the QUSLSPL API for each
output queue. If a single output queue overflows a 16Mb user space you
may have to be even more granular.

Gary


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of mgarrison@xxxxxxxxxx
Sent: Friday, December 02, 2011 10:56 AM
To: RPG programming on the IBM i / System i
Subject: RE: MCH1210 error in QGYOLSPL api

Gary Monnier wrote on 12/02/2011 12:15:30 PM:

From: "Monnier, Gary" <Gary.Monnier@xxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date: 12/02/2011 12:19 PM
Subject: RE: MCH1210 error in QGYOLSPL api Sent by:
rpg400-l-bounces@xxxxxxxxxxxx

Have you tried replacing Receiver/ v_RcvVar (65535a) with a user
space? You may be overflowing the receiver size. What is
v_RcvVarLen's value?

Gary

Gary,

How would I do it to a user space? I was trying to get away from using a
user space because when I was using the QUSLSPL api I was receiving an
error because I was filling up the user space because we have so many
spool files.

When running the program in debug the value of v_RcvVarLen is 65535 before
the api is executed.

V_RCVVARLEN = 65535

Thanks,
Mike Garrison


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx
] On Behalf Of mgarrison@xxxxxxxxxx
Sent: Friday, December 02, 2011 9:26 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: MCH1210 error in QGYOLSPL api

I have the following program (subset of the actual program but this
will compile for demonstration purposes) using the QGYOLSPL api to
retrieve a list of the spool files on our systems. When I run the
program it is crashing with escape error message MCH1210 Receiver
value too small to hold result which is not listed in the
documentation for the QGYOLSPL api.
We are at v6r1.

Does anyone have any thoughts as to why I am receiving the error
message?
I have tried numerous things including copying from posted on the
net and without success I am now definitely into the WAG stage.

Thanks,
Mike Garrison
Werner Enterprises, Inc.


Program Source

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( x'00' )
D siSrtOrd 1a inz( x'00' )
D siRsv1 1a inz( x'00' )

D ds_FilterInf ds 1024

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

* Errors data structure
D ds_ErrorCode ds 256
D lsErrPrv 10i 0 inz( 256 )
D lsErrAvl 10i 0 inz
D lsErrID 7a inz
D lsErrDta 132a

D ds_LstSplfInf ds 80
D TotRec 10i 0 inz
D RecTrn 10i 0 inz
D ReqHdle 4a inz
D RecLen 10i 0 inz
D InfCmp 1a inz
D CrtDtTm 13a inz
D StsInd 1a inz
D Rsv1 1a inz
D InfRtnLen 10i 0 inz
D Rec1 10i 0 inz
D Rsv2 40a

/free

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

*inlr = *on ;
return ;

/end-free

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.