Customizing a Copybook to Retrieve a Single Record

tableBASE RESTConnector Interface requires a customized copybook.

The copybook should exactly match the data loaded into tableBASE table. The copybook should have standard header fields. The same can be found in your.prefix.cpycob(APISINGL) displayed in the Copybook Example.

01  WS-ROW-AREA.
  03  WS-ROW-HEADER.
*    API Common request - response area
        05  IN-API-KEY                     PIC X(9).
        05  IN-TABLE-NAME                  PIC X(8).
        05  IN-VTS-NAME                    PIC X(8).
        05  IN-OFFSET                      PIC S9(9) COMP.
        05  IN-LIMIT                       PIC S9(9) COMP.
        05  OUT-TOTAL-RECS                 PIC S9(8) COMP.
        05  OUT-RECS-THIS-CALL             PIC S9(8) COMP.
        05  OUT-REC-SIZE                   PIC S9(8) COMP.
        05  OUT-ERROR-CODE                 PIC S9(8) COMP.
        05  OUT-ERROR-SUB-CODE             PIC S9(8) COMP.
        05  OUT-RESPONSE-MESSAGE           PIC X(80).
        05  OUT-FILLER                     PIC X(67).
*     API Specific area
  03  WS-ROW-DATA

The fields related to actual data in the table’s copybook will need to be indented and listed beneath the WS-ROW-DATA field.