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



Hi, Mark,
I have no problems with C prototypes for the program, I want to call. I simply do not have this prototype!
I only have a plain text description of the fields:
@ETK A(4)
@ETN S(7,0)

What I cannot understand is if the second parameter (@ETN) must be passed as char * or decimal(7,0) *.

Dennis thinks, that it should be pointer to decimal(7,0).
Going to try this.


-----Original Message-----
From: c400-l-bounces+jevgeni.astanovski=sampopank.ee@xxxxxxxxxxxx [mailto:c400-l-bounces+jevgeni.astanovski=sampopank.ee@xxxxxxxxxxxx] On Behalf Of Mark S. Waterbury
Sent: 7. märts 2011. a. 16:21
To: C programming iSeries / AS400
Subject: Re: [C400-L] Calling RPG program from C

Jevgeni:

The IBM _WebSphere Development Studio ILE C C++ Programmers Guide_
(SC09-2712) contains a whole chapter (Chapter 25. Working with
Multi-Language Applications) that covers these topics in detail, with
many examples,.etc., and see also "Chapter 26: Using Packed Decimal Data
in a C program".

If you are still having problems, post the C prototype for the program
you are trying to call, and also the lines of C code where you are
attempting to invoke it, so others can try to offer specific suggestions.

I hope that helps,

Mark S. Waterbury

On 3/7/2011 8:44 AM, Jevgeni Astanovski 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)?

TIA,
Jevgeni

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.