FRR example

Example: Use this example to help set up recovery for the latch manager.

IF init_complete=ON THEN             /* Is initialization complete?   */
DO
 IF updating_resource=ON THEN        /* Resource possibly updated?    */
   DO                                /* Note: If updating_resource    */
         .                           /* bit is on, the latch is held  */
         .
  < Repair Resource >                /* Code for restoring resource   */
         .
   END;
 IF latch_token ¬= 0  THEN           /* Is latch owned? (the latch    */
   DO                                /* could still be held, or the   */
         .                           /* request could still be queued)*/
     ISGLREL(latch_set_token,        /* Release the latch, if owned   */
             latch_token,            /* Use conditional release option*/
             ISGLREL_COND,           /* since latch may not be owned  */
             work_area,
             return_code);
         .
   END;
END;
< Continue recovery >                /* Continue as appropriate       */