On 10/08/2013 9:53 AM, Bernd Oppolzer wrote:
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.
I'm not being critical of your design. #pragma map is a fine idea. It's
just personal preference that I prefer
long descriptive names. I also like the consistency that all the
functions will have the same name irrespective
of the programming language. 8 character names just don't do it for me.
I have the same issue with member
names which is why I prefer UNIX file systems.
Our C routines are traditional load modules, PDSes, no GOFF or
other fancy stuff.
IIRC, GOFF doesn't require PDS/E. Thank god for that, the C prelinker is
not my idea of fun.
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
<bernd.oppol...@t-online.de> 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN