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



Joe Pluta wrote:
Hi Joe,

"The program name that the ILE C/C++ program calls must be in uppercase. You
can use the #pragma map directive to map an internal identifier longer than
10 characters to an OS/400-compliant object name (10 characters or less) in
your program."

It's confusing. Very poorly worded, very terse, and not well explained. However, all of the following statements (at least, if taken out of context) are true:

a) The prototype referenced by #pragma linkage must be 10 chars or less, uppercase (if #pragma map is not used.)

b) #pragma map lets you exceed 10 characters in the prototype name.

c) #pragma map must map to an OS/400-compliant object name.

d) OS/400-compliant object names are 10 characters long (or less).

The problem is that it's misleading. It makes you think that the 2nd parameter of #pragma map must be 10 or less, but it doesn't explicitly say that.

> Says pretty clearly it must be an uppercase object name of ten
> characters or less, which led me to believe that fully qualified
> wouldn't work.  This wouldn't be the first time two IBM documents
> didn't agree.

The same (or nearly the same) problem appears on the page for #pragma linkage:
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/ilcrefer54.htm

   "program_name
      Specifies the name of an external program. The external name
      must be specified in uppercase characters and be no longer
      than 10 characters in length, unless the #pragma map directive
      is specified to meet OS/400 program naming conventions.
      However, if the name specified in #pragma map is too long, it
      will be truncated to 255 characters during #pragma linkage
      processing."

Then, to make matters more confusing, you have the page that I originally quoted:
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/ilcrefer55.htm

This one does say that library-qualified external program names are supported, but doesn't expand upon that at all. Instead it tells you to see the linkage page for more information, which of course tells you that you're limited to 10 characters.

It's very confusing. I have no trouble understanding why you made the mistake.


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.