BikerDude
0 pts. | Apr 20 2005 9:32AM GMT
thanks for the help. It’s working now with the test program. So now I want to use the GETNUM() procedure in a production program,. My pgm is an RPG (free format) standalone pgm compiled using CRTBNDRPG. Will I need to create a module for it then recompile it with CRTPGM once I insert the /copy statement and modify the source code to access the GETNUM() pgm?
thanks again
astradyne
370 pts. | Apr 23 2005 8:52PM GMT
Hi
In your production program you only need the /COPY to bring in the procedure prototypes (that way the compiler knows how to link to the procedure) and a statement to run the procedure.
You compile the production program in two stages. The first is to create the module (CRTRPGMOD) and the second is to then create the ILE program (CRTPGM) at which point you have to bind in the service program.
The CRTBNDRPG effectively does a CRTRPGMOD and CRTPGM at the same time. The difference is that if you want to bind more than one module or a service program then you have to use a binding directory. Using the two stage approach gives you more flexibility.
All the best
Jonathan






