Fetch a row and replace it

*
*     FETCH A ROW, UPDATE AND REPLACE IT IN THE TABLE
*     IF NOT FOUND, INSERT A NEW INITIALIZED ROW IN THE TABLE
*
      MOVE 'FK'                       TO xxxx-COMMAND.
      CALL 'TBLBASE' USING            TB-PARM
                                      xxxx-COMMAND-AREA
                                      xxxx-ROW-AREA
                                      xxxx-KEY-AREA.
      IF xxxx-FOUND = 'Y'
         MOVE 'RC'                    TO xxxx-COMMAND
      ELSE
         MOVE 'IC'                    TO xxxx-COMMAND.
      CALL 'TBLBASE' USING            TB-PARM
                                      xxxx-COMMAND-AREA
                                      xxxx-ROW-AREA.