×
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.
Thanks Scott,
Although I still don't understand why the programs that are bound by copy would have to be recompiled. Wouldn't they continue to use the older version of the procedure? Then again, I don't know why the manager would not want to recompile all the programs using that procedure.
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Scott Klement
Envoyé : jeudi 17 décembre 2009 16:38
À : RPG programming on the IBM i / System i
Objet : Re: EXTPROC(*CL) and V6R1
Hi David,
A compiler takes your source code and generates machine code. The phrase EXTPROC(*CL) on a prototype tells the compiler to generate different machine code than you'd have if you didn't use EXTPROC(*CL).
You have to recompile everything in order for the system to generate the new machine code.
The issue is that IBM i 6.1 changed the way parameters are passed under the covers at machine level. They put code in there to preserve backward compatibility -- but the problem was, RPG and CL pass 1-byte return values differently from one another. This would cause the call to fail if there's a 1-byte return value. Using EXTPROC(*CL) tells RPG to use CL's calling convention, which solves the problem.
Prior to the underlying machine changes in 6.1, you could workaround this problem another way... you could code the return value as a 2-byte return value in CL. This no longer works at 6.1. So the only fix is to change the procedure to Extproc(*CL) This unfortunately changes the machine code that RPG compiles, and therefore, any existing routines (including RPG routines) that call that procedure will need to also be recompiled so that they also use the new calling convention.
David FOXWELL wrote:
Hello all,
Just received from management this extract of an IBM memo :
If a single version of the CL program must be able to run on multiple
releases that include V6R1 and a previous release, then the source of
the RPG procedure being called also requires a change. Change the RPG source by adding the EXTPROC(*CL) keyword to the prototype (PR) and procedure interface (PI).
Any RPG programs or modules that call the changed RPG procedure must be recompiled.
Manager asks why it would be necessary to recompile all callers, as in our shop they are all bound by copy. Does the memo assume that the prototype modified is the prototype of a service program subprocedure?
Anyone know where I can find the original memo on the web?
Thanks.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.