Since the item is numeric with no type specified, RPG defaults to Packed, not Signed. Pass instead 0x0000000f (4 bytes) and I believe the called pgm will be happy.

"Jevgeni Astanovski" <Jevgeni.Astanovski@xxxxxxxxxxxx> wrote:

Hi all,
Too bad not being familiar also with RPG...

I'm trying to call an RPG program from my ILE/C program.
RPG program parameters are described in the manual, there are plenty of
parameters, that are described like this:
@ETK A(4)
@ETN S(7,0)
I understand, that @ETK is char(4). @ETN seems to be SIGNED(7,0) so
from the C point of view effectively also char(7).
When I call the program filling @ETN with 7 zeroes (the parameter is
marked as "not used" in the manual) I get a decimal error MCH1202.
I ask the manufacturer - what is the type of the parameter?
He answers: 7 0
He even sent me a source, below is a row from it:
62000 C PARM @ETN
7 0
But frankly speaking it tells me close to nothing.

Can anyone tell me, is it decimal(7,0) or char(7)?

This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

Sent from my Galaxy tablet phone with with K-9 Mail. Please excuse my brevity.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by 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].