Re: What is wrong?



qgenesist@xxxxxxxxxxx wrote:
On Jan 24, 12:29 am, "Hau...@xxxxxxxxxxxxxxx" <Hau...@xxxxxxxxxxxxxxx>
wrote:
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

Birgitta,

I have lusted after your SQL skills for many years, I had hoped you
would answer some of this.

I am on 540 and it does compile, but I will make the corrections. I
am making some poor decisions now, because I don't understand (and
they are not intuitively obvious) what the mechanics of this are, for
example, I wrote a pretty big program that created a table and a eva
index (whatever) and then read the index using RPG, and everything
compiled and I get 4101 at runtime. What good is that?

To the others, you will see that NOMAIN is commented as is one thing
in the proto.

Get rid of your begin procedure and end procedure statements.


the call stack is in some statement in the program
(past the pep) that correlates to nothing, and is prior (must be some
sort of prolog code to the begin proc statement) I cant get at it.

I do appreciate the help.
.



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)