There was a time when there were no fancy compiler options
like DLL, RENT, LONGNAME etc., and even then C programs
had to be (and could be) ported to the mainframe, and that's the
time when I started that business, and #pragma map was my primary
option. As long as we are in the C world, everything is fine, because
every C source includes a header, which translates the long names
into short names (for the linker) by a large list of #pragma map
statements - but when other languages try to call us (be it COBOL,
FORTRAN, or PL/1), they use the short (8 char) uppercase names.
Our C routines are traditional load modules, PDSes, no GOFF or
other fancy stuff.
Of course, the parameter conventions had to be defined in such a
way that the other languages could cope with it.
Big fun :-)
and that approach is still valid today and used successfully at our site.
No need for more "modern" techniques - and we don't need no DLLs,
because we deployed a similar technique ourselves, long before IBM
did it. We don't want to migrate ... it works with "classical" load
modules.
Kind regards
Bernd
Am 10.08.2013 02:02, schrieb David Crayford:
Yes I'm familiar with #pragma map and I use it for CEEBINT LE user exits.
It may be preferable to COBOL programmer who prefer 8 char names because of
inertia but I personally would prefer to use mixed case long names.
On 10/08/2013, at 7:52 AM, Bernd Oppolzer <[email protected]> wrote:
Normally, if you compile C sources you got from "somewhere" on z/OS
using the more classical compiler options, this is no problem, unless you
have external function names that are longer than 8 characters and that
don't differ in their first 8 characters, and for such situations, #pragma map
is the perfect solution. For example:
#ifdef XML_PRAGMA
#pragma map (xml_alloc , "XMLXALLO")
#pragma map (xml_free , "XMLXFREE")
#pragma map (xml_realloc , "XMLXREAL")
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN