Re: What is wrong?



Hi,

I assume your problem is not embedded SQL, but the ILE concepts.

Is there a main procedure in your program, that calls this procedure?
If not I cannot imagine how you got your program compiled.
If yes, you have to call the program and not the procedure from
outside to debug.
Your procedure is not exported, that means it can only be called from
the main procedure or an other procedure that is located in the same
souce.
If the procedure is not called from within your source, it will never
be called.
Procedures cannot be called directly from a command line, i.e. they
must be called from a program's main procedure or a procedure located
in either a service program or a module that is bound to a program.

Yet an other comment!

Obviously you are not yet on release V5R4.
In V5R4 only a single SET OPTION-Statement is allowed.
If several SET OPTION statements are coded your programm/module won't
compile.

To prevent future compile errors, just change the SET OPTION-
Statements as follows:

C/EXEC SQL
C+ Set Option Commit = *NONE, CloSQLCsr = *ENDMOD
C/END-Exec

BTW CloSQLCsr is not a good solution, at least not if your programm is
called repeatedly from the same job. With *ENDMOD the ODP (open data
path) get deleted as soon as the module ends. The next time the
program/procedure gets called the complete optimization must be
performed, which is the most time consuming part of executing an SQL
statement. If *ENDACTGRP is specified, the ODP stays open after the
second execution (in the same activation group), i.e. for all
subsequent calls no optimization will be performed, but only the data
in the OPD actualized.

Birgitta
.



Relevant Pages

  • Re: What is wrong?
    ... I assume your problem is not embedded SQL, ... In V5R4 only a single SET OPTION-Statement is allowed. ... To prevent future compile errors, ... second execution, ...
    (comp.sys.ibm.as400.misc)
  • Re: What is wrong?
    ... I assume your problem is not embedded SQL, ... In V5R4 only a single SET OPTION-Statement is allowed. ... To prevent future compile errors, ... second execution, ...
    (comp.sys.ibm.as400.misc)
  • Re: object databases
    ... No I never heard of SQLJ as I don't program in Java. ... SQLJ checks your SQL statements against the db. ... The compile time check is not mandatory. ... So you use an object oriented language, ...
    (comp.object)
  • Re: Setup of 2005 Dev edition Client Components fails
    ... And try SQL Server setup ... to compile: C:\Program Files\Microsoft SQL ... Microsoft SQL Server 2005 Tools -- Install started. ...
    (microsoft.public.sqlserver.clients)
  • Re: Setup of 2005 Dev edition Client Components fails
    ... to compile: C:\Program Files\Microsoft SQL ... Microsoft SQL Server 2005 Tools -- Install started. ... Then I installed the developer edition 10 different times. ...
    (microsoft.public.sqlserver.clients)