×
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.
I'm passing a struct that contains fields of various datatypes, including
packed decimal, from a RPG program to a C++ srvpgm. The issue is that the
decimal fields are received on the C++ side as zoned decimal, not as packed
decimal. I haven't found anything in the Programmer's guide explaining this
behaviour.
Here's the RPG prototype:
d functionA pr 10i 0 extproc(*CWIDEN: 'functionA__+
d FP30FRDDTAD_ONLHDRA_ONLHDRA_both_t')
d headerrec likeds(headerrec) const
Here's the C++ prototype:
int functionA (FRDDTAD_ONLHDRA_ONLHDRA_both_t *prec);
The struct on the C++ side corresponds to a database file record and has
been created with GENCSRC, i.e the decimal members are of the _DecimalT type
and should work fine with packed decimal data.
For testing purposes I created another C++ srvpgm that was passed 2 parms, a
packed decimal and a char array by reference from RPG. That worked. So
there's something with packed decimal inside a datastructure that I don't
know about. Any ideas on what that is?
Many thanks,
Erik
As an Amazon Associate we earn from qualifying purchases.
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.