DB inquiry processing

 0 Replies
 0 Subscribed to this topic
 43 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member
    I want to retrieve a record off the TAEMPSERV and the TASERVICE files. I have populated the set keys (840-FIND-TESSET1). This is my first exposure to custom 4GL code. Does an 860-FIND-INDEX must proceed a find next routine? I would appreciate any feedback or suggestions with this issue. Thank you in advance.

    Here is my custom code:

    INITIALIZE DB-TES-OBJ-ID.
    MOVE LPMST-TEM-COMPANY TO DB-COMPANY.
    MOVE LPMST-TEM-EMPLOYEE TO DB-EMPLOYEE.
    PERFORM 840-FIND-TESSET1.
    IF (TAEMPSERV-NOTFOUND)
    OR (TES-SERVICE-STATUS = 9)
    OR (TES-TR-DATE > PRO-PER-END-DATE)
    OR (TES-TR-DATE < PRO-PER-END-DATE - 13)
    GO TO 3010-NEXT-TSV
    ELSE
    MOVE TES-COMPANY TO DB-COMPANY
    MOVE TES-SERVICE-CODE TO DB-SERVICE-CODE
    MOVE LPMST-SERV-CLS TO DB-SERVICE-CLASS
    PERFORM 840-FIND-TSVSET1
    IF (TASERVICE-NOTFOUND)
    OR (TSV-SERVICE-CLASS NOT = TSV-SERVICE-CODE)
    GO TO 3020-NEXT-TES
    ELSE
    COMPUTE LPC-ACR-HOURS = LPC-ACR-HOURS + TES-HOURS
    END-IF
    END-IF.