Accessing DB-FIRST-NAME-UC; DB-LAST-NAME-UC

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Robert
Veteran Member
Posts: 82
Veteran Member

    Gurus:

    I generated my program using pgmdef.  The system code is PR.
    When I painted, I see the EMPLOYEE table as a relation.

    I want to read the EMPLOYEE table using EMPSET6.
    When I move to DB-FIRST-NAME-UC and/or DB-LAST-NAME-UC the compiler throws the error

    Operand DB-FIRST-NAME-UC not declared.

    Other PR applications are using this working storage variable, e.g. PR33.

     

    Randall
    Veteran Member
    Posts: 44
    Veteran Member
      Hi Robert,

      We don't use PR, so I don't have the reference in front me. However, I'm guessing that DB-FIRST-NAME-UC is specific to a library that PR33 is using for its functions. Once you use a function from a library, it will automatically include the reference within your program. I would assume PR33 is using a library that accepts either inputs or outputs with that variable name.

      Hope this helps,
      Randall
      Robert
      Veteran Member
      Posts: 82
      Veteran Member

        Randall, I thought about that, so I added an API call based on an index, but the compiler is throwing the error.
        Then it was decided to add an index to EMPLOYEE. I did just that, based on COMPANY & FICA-NBR.
        Funny thing, when I moved to DB-FICA-NBR, the compile worked...but now I am being told that the index is invalid.