ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RPG array look up using SQL

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

  • RPG array look up using SQL

    In an embedded RPGLE program, can an array be used in an SQL Where or Having clause? (Does SQL support use of host variables within an Arrary?)

    Background.
    I pass a 50 element array of 2 character values to an RPG/LE program for filtering of a large data file.

    D ExclStr 2A OverLay(xRcvParms:1) Dim(50)

    I want to use SQL to filter the file excluding all records that match a value within the exclusion array (ExclStr).

    Anything like the RGP LookUp in SQL?

    If not, I can can a create a temporary table on the fly in QTemp - one record for each element.

    If there is a SQL method for host variable array processing, help will be appreciated.
    EMSS

  • #2
    Re: RPG array look up using SQL

    Refer to this example posted by mjhaston.

    Predictions are usually difficult, especially about the future. ~Yogi Berra

    Vertical Software Systems
    VSS.biz

    Comment


    • #3
      Re: RPG array look up using SQL

      That explains it all!

      Thanks so very much!!!
      EMSS

      Comment

      Working...
      X