ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Opnqry

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

  • Opnqry

    Hi ,

    In a CL, open query has been done with the key feilds(more than 1) other the actual key fields defined in the PF ..
    now in the COBOL (which is called from the CL ) Externally described key has been defined in the select clause of the file..
    we want do the dynamic read based keys listed in the OPNQRY
    .. it doesn't work this way ....

    how can we define mutliple keys in the select cause ..
    also depending on the selectionn criteria the key fields might vary in the CL OPNQRY ..

    Please help me to resolve this ...

    thanks in advance ..

  • #2
    Re: Opnqry

    Although I have never attempted to try this myself, you might want to read about the ALTERNATE RECORD KEY phrase:

    "The ALTERNATE RECORD KEY clause specifies the data item within the record that is an alternate record key for an indexed file. These alternate keys allow the ILE COBOL program to access the file using a different logical ordering of the file records....."

    Its described in the WebSphere Development Studio: ILE COBOL Reference manual located here:



    Terry

    Comment

    Working...
    X