Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PCML API QYASPOL CPF24B4

130 views
Skip to first unread message

henrik....@googlemail.com

unread,
Nov 15, 2007, 6:45:37 AM11/15/07
to
Hello Forum

I have a problem with running this api on y v5r3 box. Always I try to
run this I get the well known CPF24B4. Here is my pcml doc.


<pcml version="1.0">

<program name="qyaspol" path="/QSYS.lib/QGY.lib/qyaspol.pgm">
<data name="receiver" type="char" length="800" usage="output" />
<data name="receiverlength" type="int" length="4" usage="inputoutput"
init="800" />
<data name="listinfo" type="char" length="80" usage="output" />
<data name="nbrrcd" type="int" length="4" usage="input" init="100" />
<data name="nbrfilter" type="int" length="4" usage="input" init="1" />
<data name="filter" type="struct" struct="filter" usage="input" />
<data name="format" type="char" length="8" usage="input"
init="YASP0100" />
<data name="errorCode" type="int" length="4" usage="output" />
</program>

<struct name="filter">
<data name="size" type="char" length="8" init=" 14" />
<data name="key" type="char" length="8" init=" 1" />
<data name="datasize" type="char" length="8" init=" 2" />
<data name="data" type="char" length="2" init=" 1" />
</struct>

I'm very new in programming with apis. ;-)

Greetz Henrik


Jonathan Ball

unread,
Nov 15, 2007, 12:45:02 PM11/15/07
to

Try these changes:

1. Specify a structure for the YASP0100 format and use
it for
the "receiver" parameter:

<struct name="yasp0100">
<data name="aspNum" type="int" length="4" />
<data name="rsrcName" type="char" length="10" />
<data name="devDesc" type="char" length="10" />
<data name="version" type="int" length="4" />
<data name="aspUsage" type="int" length="4" />
<data name="aspStatus" type="int" length="4" />
<data name="dbName" type="char" length="18" />
</struct>

2. Specify this structure for the 'listinfo' parameter:

<struct name="listInfo">
<data name="totalRcds" type="int" length="4" />
<data name="rcdsReturned" type="int" length="4" />
<data name="rqsHandle" type="byte" length="4" />
<data name="rcdLength" type="int" length="4" />
<data name="infoComplete" type="char" length="1" />
<data name="dateCreated" type="char" length="7" />
<data name="timeCreated" type="char" length="6" />
<data name="listStatus" type="char" length="1" />
<data type="byte" length="1" />
<data name="lengthOfInfo" type="int" length="4" />
<data name="firstRecord" type="int" length="4" />
<data type="byte" length="40" />
</struct>

3. Change the usage on the 'receiverlength' parameter
to 'input'.

4. Change the program call line parameters:

<program name="qyaspol"
path="/QSYS.lib/QGY.lib/qyaspol.pgm"

parseorder="listInfo receiver">
<data name="receiver" type="struct" struct="yasp0100"
usage="output"
count="listInfo.rcdsReturned"
outputsize="receiverLength" />


<data name="receiverlength" type="int" length="4"

usage="input" init="800" />
<data name="listInfo" type="struct" struct="listInfo"

CRPence

unread,
Nov 15, 2007, 1:00:02 PM11/15/07
to
It would seem that the 4-byte errorCode is actually Input, and that
it should pass a binary zero. As output, it requires at least an 8-byte
declaration. See Table 1. Format ERRC0100 for the error code parameter at:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apiref/errorcodeformat.htm

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer

Jonathan Ball wrote:
> <<SNIP>>


> 4. Change the program call line parameters:
>

> <<SNIP>>

Jonathan Ball

unread,
Nov 15, 2007, 1:15:20 PM11/15/07
to
CRPence wrote:
> It would seem that the 4-byte errorCode is actually Input, and that it
> should pass a binary zero. As output, it requires at least an 8-byte
> declaration. See Table 1. Format ERRC0100 for the error code parameter at:
>
> http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apiref/errorcodeformat.htm

Yes. I copied that from the original post and didn't
catch it.

henrik....@googlemail.com

unread,
Nov 19, 2007, 9:41:15 AM11/19/07
to
On 15 Nov., 19:15, Jonathan Ball <jonb...@whitehouse.not> wrote:
> CRPence wrote:
> > It would seem that the 4-byte errorCode is actually Input, and that it
> > should pass a binary zero. As output, it requires at least an 8-byte
> > declaration. See Table 1. Format ERRC0100 for the error code parameter at:
>
> >http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic...

>
> Yes. I copied that from the original post and didn't
> catch it.

Thanks for the quick answer, but. I changed he specification to this,
but it doesn't work. It's a mystery.

<pcml version="1.0">

<struct name="filter">
<data name="size" type="char" length="4"
init="14" />
<data name="key" type="char" length="4"
init="1" />
<data name="datasize" type="char" length="4"
init="2" />
<data name="data" type="char" length="4"
init="1" />
</struct>

<struct name="error">
<data name="bytesin" type="int" length="4"
init="64" />
<data name="bytesout" type="int" length="4"
init="0" />
<data name="exception" type="char" length="7"
init=" " />
<data name="reserved" type="char" length="1"
init=" " />
<data name="exceptiondata" type="char" length="80"
init=" " />
</struct>

<struct name="yasp0100">
<data name="aspNum" type="int" length="4" />
<data name="rsrcName" type="char" length="10" />
<data name="devDesc" type="char" length="10" />
<data name="version" type="int" length="4" />
<data name="aspUsage" type="int" length="4" />
<data name="aspStatus" type="int" length="4" />
<data name="dbName" type="char" length="18" />
</struct>

<struct name="listInfo">


<data name="totalRcds" type="int" length="4" />
<data name="rcdsReturned" type="int" length="4" />
<data name="rqsHandle" type="byte" length="4" />
<data name="rcdLength" type="int" length="4" />
<data name="infoComplete" type="char" length="1" />
<data name="dateCreated" type="char" length="7" />
<data name="timeCreated" type="char" length="6" />
<data name="listStatus" type="char" length="1" />
<data type="byte" length="1" />
<data name="lengthOfInfo" type="int" length="4" />
<data name="firstRecord" type="int" length="4" />
<data type="byte" length="40" />
</struct>

<program name="qyaspol" path="/QSYS.lib/QGY.lib/qyaspol.pgm"


parseorder="listInfo receiver">
<data name="receiver" type="struct"
struct="yasp0100" usage="output" count="listInfo.rcdsReturned"

outputsize="receiverlength" />


<data name="receiverlength" type="int"
length="4" usage="input" init="800" />
<data name="listInfo" type="struct"
struct="listInfo" usage="output" />

<data name="nbrrcd" type="int"
length="4" usage="input" init="100" />
<data name="nbrfilter" type="int"
length="4" usage="input" init="1" />
<data name="filter" type="struct"
struct="filter" usage="input" />
<data name="format" type="char"
length="8" usage="input" init="YASP0100" />

<data name="errorCode" type="int"
length="4" usage="output" />
</program>


</pcml>

Is there any additional debug data except the
"Trace.setTracePCMLOn(true);" to gather to get to the root?

CRPence

unread,
Nov 19, 2007, 10:24:50 AM11/19/07
to
In the given, the parameter for the error code is still shown as
passing the same 4-byte "output" without an initialization to binary
zero; i.e. the new struct "error" is not used -- not to imply that I
agree with the attempt to declare that structure "error", if only for
its failure to initialize something called /reserved/, to binary zero.

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer

henrik....@googlemail.com wrote:
> <<SNIP>>


> <program name="qyaspol" path="/QSYS.lib/QGY.lib/qyaspol.pgm"

> <<SNIP>>

henrik....@googlemail.com

unread,
Nov 19, 2007, 10:41:02 AM11/19/07
to
On 19 Nov., 16:24, CRPence <crpe...@vnet.ibm.com> wrote:
> In the given, the parameter for the error code is still shown as
> passing the same 4-byte "output" without an initialization to binary
> zero; i.e. the new struct "error" is not used -- not to imply that I
> agree with the attempt to declare that structure "error", if only for
> its failure to initialize something called /reserved/, to binary zero.
>

I changed the error element to input initialised with zero and deleted
the error struct.

Now it looks like this:

<pcml version="1.0">

<struct name="filter">
<data name="size" type="char" length="4"
init="14" />
<data name="key" type="char" length="4"
init="1" />
<data name="datasize" type="char" length="4"
init="2" />
<data name="data" type="char" length="4"
init="1" />
</struct>

<struct name="yasp0100">


<data name="aspNum" type="int" length="4" />
<data name="rsrcName" type="char" length="10" />
<data name="devDesc" type="char" length="10" />
<data name="version" type="int" length="4" />
<data name="aspUsage" type="int" length="4" />
<data name="aspStatus" type="int" length="4" />
<data name="dbName" type="char" length="18" />
</struct>

<struct name="listInfo" outputsize="128">


<data name="totalRcds" type="int" length="4" />
<data name="rcdsReturned" type="int" length="4" />
<data name="rqsHandle" type="byte" length="4" />
<data name="rcdLength" type="int" length="4" />
<data name="infoComplete" type="char" length="1" />
<data name="dateCreated" type="char" length="7" />
<data name="timeCreated" type="char" length="6" />
<data name="listStatus" type="char" length="1" />
<data type="byte" length="1" />
<data name="lengthOfInfo" type="int" length="4" />
<data name="firstRecord" type="int" length="4" />
<data type="byte" length="40" />
</struct>

<program name="qyaspol" path="/QSYS.lib/QGY.lib/qyaspol.pgm"


parseorder="listInfo receiver">
<data name="receiver" type="struct"
struct="yasp0100" usage="output" count="listInfo.rcdsReturned"
outputsize="receiverlength" />

<data name="receiverlength" type="int"
length="4" usage="input" init="16384" />


<data name="listInfo" type="struct"
struct="listInfo" usage="output" />
<data name="nbrrcd" type="int"
length="4" usage="input" init="100" />
<data name="nbrfilter" type="int"
length="4" usage="input" init="1" />
<data name="filter" type="struct"
struct="filter" usage="input" />
<data name="format" type="char"
length="8" usage="input" init="YASP0100" />

<data name="errorCode" type="int"

length="4" usage="input" init="0"/>
</program>


</pcml>

Same error.

Jonathan Ball

unread,
Nov 19, 2007, 10:45:44 AM11/19/07
to

Try changing the last parameter to this:

<data name="errorCode" type="int" length="4"

usage="input" init="0" />

henrik....@googlemail.com

unread,
Nov 19, 2007, 10:57:37 AM11/19/07
to
> Try changing the last parameter to this:
>
> <data name="errorCode" type="int" length="4"
> usage="input" init="0" />- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Its already changed to this. Same result.

CRPence

unread,
Nov 19, 2007, 11:18:46 AM11/19/07
to
The filter is not correct according to the API doc. The following
would seem to be more appropriate, where -1 is used to list; or a
positive integer to get information about that specified ASP number.

<struct name="filter">
<data name="size" type="int" length="4" init="16" />
<data name="key" type="int" length="4" init="1" />
<data name="datasize" type="int" length="4" init="4" />
<data name="data" type="int" length="4" init="-1" />
</struct>

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer

henrik....@googlemail.com wrote:
> <<SNIP>>


> <struct name="filter">
> <data name="size" type="char" length="4" init="14" />
> <data name="key" type="char" length="4" init="1" />
> <data name="datasize" type="char" length="4" init="2" />
> <data name="data" type="char" length="4" init="1" />
> </struct>

> <<SNIP>>

henrik....@googlemail.com

unread,
Nov 19, 2007, 11:34:32 AM11/19/07
to
On 19 Nov., 17:18, CRPence <crpe...@vnet.ibm.com> wrote:
> The filter is not correct according to the API doc. The following
> would seem to be more appropriate, where -1 is used to list; or a
> positive integer to get information about that specified ASP number.
>
> <struct name="filter">
> <data name="size" type="int" length="4" init="16" />
> <data name="key" type="int" length="4" init="1" />
> <data name="datasize" type="int" length="4" init="4" />
> <data name="data" type="int" length="4" init="-1" />
> </struct>
>
> Regards, Chuck

Thanks a lot but same error. Here is the trace data:

Toolbox for Java - Open Source Software, JTOpen 5.3, codebase 5722-JC1
V5R4M0.4
Mo Nov 19 17:31:01:343 CET 2007 Writing data -- Offset: 0 Length: 4
Name: "qyaspol.receiverlength" Byte data: 00004000 Thread[main,
5,main]
Mo Nov 19 17:31:01:359 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.receiverlength
Mo Nov 19 17:31:01:359 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:359 CET 2007 0 :
00004000
*.. . *
Mo Nov 19 17:31:01:359 CET 2007 Writing data -- Offset: 0 Length: 4
Name: "qyaspol.nbrrcd" Byte data: 00000064 Thread[main,5,main]
Mo Nov 19 17:31:01:375 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.nbrrcd
Mo Nov 19 17:31:01:375 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:375 CET 2007 0 :
00000064
*.... *
Mo Nov 19 17:31:01:375 CET 2007 Writing data -- Offset: 0 Length: 4
Name: "qyaspol.nbrfilter" Byte data: 00000001 Thread[main,5,main]
Mo Nov 19 17:31:01:375 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.nbrfilter
Mo Nov 19 17:31:01:375 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:375 CET 2007 0 :
00000001
*.... *
Mo Nov 19 17:31:01:390 CET 2007 Writing data -- Offset: 0 Length: 4
Name: "qyaspol.filter.size" Byte data: F1F64040 Thread[main,5,main]
Mo Nov 19 17:31:01:390 CET 2007 Writing data -- Offset: 4 Length: 4
Name: "qyaspol.filter.key" Byte data: F1404040 Thread[main,5,main]
Mo Nov 19 17:31:01:390 CET 2007 Writing data -- Offset: 8 Length: 4
Name: "qyaspol.filter.datasize" Byte data: F4404040 Thread[main,
5,main]
Mo Nov 19 17:31:01:390 CET 2007 Writing data -- Offset: c Length: 4
Name: "qyaspol.filter.data" Byte data: 60F14040 Thread[main,5,main]
Mo Nov 19 17:31:01:406 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.filter
Mo Nov 19 17:31:01:406 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:406 CET 2007 0 : F1F64040 F1404040 F4404040
60F14040 *16 1 4
-1 *
Mo Nov 19 17:31:01:406 CET 2007 Writing data -- Offset: 0 Length: 8
Name: "qyaspol.format" Byte data: E8C1E2D7F0F1F0F0 Thread[main,
5,main]
Mo Nov 19 17:31:01:406 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.format
Mo Nov 19 17:31:01:406 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:406 CET 2007 0 : E8C1E2D7
F0F1F0F0
*YASP0100 *
Mo Nov 19 17:31:01:406 CET 2007 Writing data -- Offset: 0 Length: 4
Name: "qyaspol.errorCode" Byte data: 00000000 Thread[main,5,main]
Mo Nov 19 17:31:01:406 CET 2007 /QSYS.lib/QGY.lib/qyaspol.pgm
qyaspol.errorCode
Mo Nov 19 17:31:01:406 CET 2007 Offset : 0....... 4....... 8.......
C....... 0....... 4....... 8....... C....... 0...4...8...C...
0...4...8...C...
Mo Nov 19 17:31:01:406 CET 2007 0 :
00000000
*.... *
CPF24B4 - Schwerwiegender Fehler beim Adressieren der
Parameterliste.
** Call to QYASPOL failed. See messages above **

CRPence

unread,
Nov 19, 2007, 12:22:47 PM11/19/07
to
That trace seems to show the filter data is still [declared and thus
processed as] character data instead of bin-4:

qyaspol.filter


Offset
: 0....... 4....... 8....... C.......

: F1F64040 F1404040 F4404040 60F14040 *16 1 4 -1 *

Perhaps only the /init/ were changed, and not the /type/ ?

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer

henrik....@googlemail.com wrote:
> On 19 Nov., 17:18, CRPence <crpe...@vnet.ibm.com> wrote:
>> The filter is not correct according to the API doc. The following
>> would seem to be more appropriate, where -1 is used to list; or a
>> positive integer to get information about that specified ASP number.
>>
>> <struct name="filter">
>> <data name="size" type="int" length="4" init="16" />
>> <data name="key" type="int" length="4" init="1" />
>> <data name="datasize" type="int" length="4" init="4" />
>> <data name="data" type="int" length="4" init="-1" />
>> </struct>
>>
>> Regards, Chuck
>
> Thanks a lot but same error. Here is the trace data:
>

> <<SNIP>>

henrik....@googlemail.com

unread,
Nov 19, 2007, 2:51:59 PM11/19/07
to
On 19 Nov., 18:22, CRPence <crpe...@vnet.ibm.com> wrote:
> That trace seems to show the filter data is still [declared and thus
> processed as] character data instead of bin-4:
>
> qyaspol.filter
> Offset
> : 0....... 4....... 8....... C.......
> : F1F64040 F1404040 F4404040 60F14040 *16 1 4 -1 *
>
> Perhaps only the /init/ were changed, and not the /type/ ?
>


Oh yes! Great! I was working since a week on this issue. Thanks a
lot.

Regards Henrik

0 new messages