Re: What is wrong?



On Jan 24, 12:23 pm, "Hau...@xxxxxxxxxxxxxxx" <Hau...@xxxxxxxxxxxxxxx>
wrote:
You try to generate the module with CRTRPGMOD?

No; CRTSQLRPGI with OBJTYPE(*PGM), using opt 14 from PDM. The compile
succeeded using the code I posted, and the program ran successfully.
Note that the program main procedure has no prototype or interface,
and the call to the program passes no parameter. The main procedure
calls the original poster's internal procedure using the prototype.



This won't work. If you want to create a module with embedded SQL, you
have to use CRTSQLRPGI (the same command as for a program).
If you use PDM with option 14 a program is generated and option 15
will generate a module, with the same command. Only the object type in
the compile command is either set to *MODULE or *PGM.

The precompiler comments out the SQL statements and replaces them with
API calls. After either CRTRPGMOD or CRTBNDRPG is called to generate a
module or program from the newly generated source.

Birgitta

.



Relevant Pages

  • Re: Wrong Job Description
    ... When I try and compile a test program RPGLE, I get an error stating ... If you are compiling using PDM, check the job description that it uses ...
    (comp.sys.ibm.as400.misc)
  • Re: My simple "framework"
    ... drop it into a project, run PDM against it, compile the resulting html code ... INTO a chm file, ... What is PDM? ...
    (microsoft.public.fox.programmer.exchange)