UDB V8.1.3 on XP. While trying out SQLj procedures, I just 'compile'
my stored procedure code (by command sqlj program-name.sqlj) and run
it. That's it. So, how and when is db2profc and all the other commands
needed? The stored procedure seems to run without executing these
commands as well. In fact, I experience no difference between methods
of preparing JDBC or SQLj procedures other than the fact that JDBC
procedures are compiled with 'javac' command (as opposed to 'sqlj'
command for SQLj procedures.

UDB V8.1.3 on XP. While trying out SQLj procedures, I just 'compile' my stored procedure code (by command sqlj program-name.sqlj) and run it. That's it. So, how and when is db2profc and all the other commands needed? The stored procedure seems to run without executing these commands as well. In fact, I experience no difference between methods of preparing JDBC or SQLj procedures other than the fact that JDBC procedures are compiled with 'javac' command (as opposed to 'sqlj' command for SQLj procedures.

What am I missing.

TIA Raquel.

Trying to remember way back with my teeny brain, but I believe that if
you don't run db2profc to customize the generated serialized profiles
that the sqlj command produces, you're effectively running your stored
procedure as a JDBC stored procedure.

db2profc is the command that actually creates and binds the static
packages in the database, theoretically increasing the execution of any
SQL in your SQLJ procedure. Otherwise everything reverts back to being
dynamically prepared and executed.

I /think/ that's what you're missing. But I reserve the right to be wrong :)