ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SQLRPGLE - Calls *MODULE, returns SQL result set

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQLRPGLE - Calls *MODULE, returns SQL result set

    Can an SQLRPGLE *PGM call an external *MODULE and execute an SQL statement that returns a result set (or even better, just an open cursor), WITHOUT the use of an SQL stored procedure object? I'm trying to eliminate the extra object.

  • #2
    Sorry, I'm not following you.

    a) You can't call a *MODULE. A module object is only a building block used to create a program or service program. The code in a module is not executable by itself. I'm not sure that this distinction really matters, though... I'll just assume you really meant either subprocedure or program.

    b) When you run the CREATE PROCEDURE statement to create a stored procedure from an "external" program (such as an RPG program) it doesn't create any objects. Objects would be created if you used CREATE PROCEDURE on SQL code, but not on an HLL... so I'm not sure that I understand the "extra object" you're trying to eliminate.

    Comment


    • #3
      Excuse me Scott. I can see how that was confusing. I totally meant can an sqlrpgle *pgm call another sqlrpgle *pgm and return an open cursor or SQL result set without the use of an *proc object in between?

      Comment

      Working...
      X