5 pts.
 ILE Program won’t compile
Hi, I'm just starting to get into ILE and i've created a Module with a with a Prototype, Procedure and Procedure-Interface definition. The problem is program from where i am trying to call the procedure. I won't compile. I get the error "The name or indicator is not defined." There some where in the calling program that i should be defining the Prototype? Here is the source to my Module: H NOMAIN ************************************************************************* * Pgm Name: NEX100M SRCLIB: SPLPGM * * * ************************************************************************* DRtAdj24 PR 24 Dwrk24a 24 VALUE PRtAdj24 B EXPORT ************************************************************************** ** RtAdj24 - Right adjust information coming in to a 24 byte field. ************************************************************************** DRtAdj24 PI 24 Dwrk24a 24 VALUE Dwrk24b s 24 D#strpos s 2 0 Dr01 s 2s 0 Dr02 s 2s 0 c ' ' scan wrk24a r02 c eval r01 = r02 -1 c if r01 = *zeros c eval r01 = 1 c endif c eval #strpos = %SIZE(wrk24a) - r01 c RETURN %SUBST(wrk24b:#strpos+1:r01) = wrk24a * C *PSSR BEGSR C RETURN *blanks C ENDSR * PRtAdj24 E Here is the source from the program calling the procedure: c* c From_Num BEGSR c eval s = j - I * *** To Right Justify wrk24a into tlfrnb c eval wrk24a = %subst(f1:I:S) c eval wrk24b = Rtadj24(wrk24a) c move wrk24b tlfrnb c* c EndSR

Software/Hardware used:
ASKED: April 28, 2006  4:45 PM
UPDATED: December 6, 2009  10:58 AM

Answer Wiki:
Your error usually comes for me when I forget to include the service program containing the procedure th program uses. I forget to put it in the binding directory. ======================================================= Yes, the calling module needs the same prototype in order to compile. The prototype (the PR specs) can be in the global area of the module or inside any procedures in the module that make the call. It doesn't matter if the target procedure is in a service program or in another module bound into the same program. The compiler needs the prototype to compile both the calling and the called modules. Tom
Last Wiki Answer Submitted:  December 6, 2009  10:58 am  by  TimRac   25 pts.
All Answer Wiki Contributors:  TimRac   25 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,
How do i add the service program containing the procedure to the binding directory?

 5 pts.

 

To get the program to recognize a procedure in a service program:

1. Make sure your service program is compiled.
2. Create a binding directory and then work with the binding directory (WRKBNDDIR) to add the service program to the bindig directory. Enter a 9 to work with the binding directory and then F6 to add the service program. (Make sure you enter *SRVPGM qand not *MODULE).
At the top of your program using the procedure in the service program, enter an “H” spec containing
BINDIR(‘YOURBNDDIR’).
3. You may also need an export file.

 25 pts.