× 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 have a program that format messages. Currently the formatting process is
all in one program that uses a C module. Since the formatting can be used
by other processes, I want to make a formatting service program with a
module for each message type. The C module would be used within all the
modules. I am getting multiple definition errors when trying to create the
service program. Below is how the C module is described/used in the
existing program.

DToBCD PR
D 18P 0
DFromBCD PR
D 10
D BCDPacked S 18P 0 EXPORT
D BCDChar S 10 EXPORT

C CALLP ToBCD(BCDPacked)

Here is how the service program modules look:

/Copy *LIBL/QCPYSRC,PCS_Format (contains prototypes just as above)

D BCDPacked s 18P 0 Export
D BCDChar s 10 Export

P FMT0100 B Export

D FMT0100 PI 256A
D InputVar 264A Const


C CALLP ToBCD(BCDPacked)

P E

This is my first attempt at creating a service program from scratch. How
should the variables BCDPacked and BCDChar be described? The above works
when I have the one module but when I start adding other modules I get a
multiple definition error when I try to create service program. So that
means that the variables are global when described as above? Is there a
better way to do this?

Thanks.


Mark Garton
Information Systems
O'Reilly Auto Parts


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.