Unconfigured Ad Widget

Unconfigured Ad Widget Module


Announcement Module
No announcement yet.

Rpg sql insert into qtemp table

Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rpg sql insert into qtemp table

    I have a CL program that does an OVRDBF on an existing table in my libary to Qtemp, with overscope set to the activation group and then calls an RPG procedure which is bound to the CL. In debug mode, I can see the overrides are still valid and the activation group is active.

    I want to do an insert into a table of one record/one field. When the SQL Insert attempts to execute it throws an SQL 42704 (table undefined) as though it cannot find the Qtemp table.

    Obviously I am doing something wrong here. Do I need to specify the table as *USROPN and actually open the table in the RPG for the override to be in effect?

  • #2
    Make sure RPG procedure runs in same activation group as that of CL. if CL is of soure type CLP and RPG source is of type RPGLE then RPGLE program would not see the override.


    • #3
      Actually it was much simpler . .

      I was using a named activation group, and its a CLLE and RPGLE program. I have not worked with CLs much for a couple years. This turned out to be one of those "duh" things, where I forgot to put in the CRTDUPOBJ into Qtemp command after doing the override, but thanks for your response.