{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function msg, end_window, fieldcount, utility, send_message, send_event\r\ndeclare subroutine rlist, record_lock, create_note, ErrMsg, Set_Property\r\n\r\n$insert logical\r\n$insert rlist_equates\r\n$insert msg_equates\r\n$insert react_servs_equ\r\n$insert REACTOR_PM_EQU\t\r\n$INSERT REACTOR_EQUATES\r\n\r\n\r\nRETURN 0\r\n\r\nVoid = utility( 'CURSOR', 'H' )\r\nSet_Property(@WINDOW:'.LIST_1','VISIBLE',0)\r\n\r\nOPEN 'REACTOR_PM' TO RPMTable ELSE\r\n\tErrMsg('Unable to open REACTOR_PM table...')\r\n\tRETURN 0\r\nEND\r\n\r\nEndDt = OConv(Date() + 60, 'D4/')\r\n\r\nStatement = 'SELECT REACTOR_PM WITH COMPLETE_DATE = \"\" AND WITH NEXT_DONE < ':QUOTE(EndDt)\r\nRList( Statement, target_activelist$, '', '', '' )\r\n\r\n\r\nReactNos = ''\r\nNextDueDts = ''\r\nServiceIDs = ''\r\n\r\nDone = 0\r\nLOOP\r\n\tREADNEXT RPMKey ELSE Done = 1\r\nUNTIL Done\r\n\tREAD RPMRec FROM RPMTable,RPMKey THEN\r\n\t\tReactNo\t\t= RPMRec<REACTOR_PM_REACTOR$>\r\n\t\tServiceID\t= RPMRec<REACTOR_PM_REACT_SERV_ID$>\r\n\t\tNextDueDt\t= RPMRec<REACTOR_PM_NEXT_DONE$>\r\n\t\t\r\n\t\tLOCATE ReactNo IN ReactNos BY 'AR' USING @FM SETTING RPos ELSE\r\n\t\t\tReactNos = INSERT(ReactNos,RPos,0,0,ReactNo)\r\n\t\tEND\r\n\t\t\r\n\t\tLOCATE NextDueDt IN NextDueDts<RPos> BY 'AR' USING @VM SETTING DPos ELSE\r\n\t\t\tNextDueDts = INSERT(NextDueDts,RPos,DPos,0,NextDueDt)\r\n\t\t\tServiceIDs = INSERT(ServiceIDs,RPos,DPos,0,ServiceID)\r\n\t\tEND\r\n\tEND\t;* End of RPMRec read\r\nREPEAT\r\n\r\n\r\n\r\nDisplay = ''\r\n\r\nReactCnt = COUNT(ReactNos,@FM) + (ReactNos NE '')\r\n\r\nPrevReactNo = ''\r\nFOR R = 1 TO ReactCnt\r\n\tReactNo = ReactNos<R>\r\n\t\r\n\tIF ReactNo NE PrevReactNo THEN\r\n\t\tReactRec\t= XLATE('REACTOR',ReactNo,'','X')\r\n\t\tReactType\t= OCONV(ReactRec<REACTOR_REACT_TYPE$>,'[REACT_TYPE_CONV]')\r\n\r\n\t\tReactDesc\t= ReactRec<REACTOR_REACT_DESC$>\r\n\t\tPrevReactNo = ReactNo\r\n\t\tIF PrevReactNo NE '' THEN\r\n\t\t\tDisplay<-1> = STR('-',100)\r\n\t\tEND\r\n\t\tDisplay<-1> = '1-1: React No ':ReactNo:' ':ReactType:' ':ReactDesc\r\n\tEND\r\n\t\r\n\tndCnt = COUNT(NextDueDts<R>,@VM) + (NextDueDts<R> NE '')\r\n\t\r\n\tFOR I = 1 TO ndCnt\r\n\t\tNextDueDt\t= OCONV(NextDueDts<R,I>,'D4/')\r\n\t\tServiceID \t= ServiceIDs<R,I>\r\n\t\tService\t\t= XLATE('REACT_SERVS',ServiceID,REACT_SERVS_DESCRIPTION$,'X' )\r\n\t\t\r\n\t\tDisplay<-1> = '2-2: Due On: ':NextDueDt:' ':ServiceID:' ':Service\r\n\tNEXT I\r\n\r\nNEXT R\r\nDEBUG\r\n\r\nopen 'CONFIG' to ConfigTable else\r\n   Void = msg( '', 'Unable to open CONFIG table...' )\r\n   return 0\r\nend\r\n\r\nrecord_lock( ConfigTable, 'REACTOR_TODO_LIST', 'REACTOR_TODO_LIST' )\r\nwrite '' on ConfigTable, 'REACTOR_TODO_LIST' else\r\n   Void = msg( '', 'Unable to write to CONFIG, REACTOR_TODO_LIST...' )\r\n   return 0\r\nend\r\n\r\n\r\nwrite Display on ConfigTable, 'REACTOR_TODO_LIST' else\r\n   Void = msg( '', 'Unable to write to CONFIG, REACTOR_TODO_LIST...' )\r\n   return 0\r\nend\r\n\r\nunlock ConfigTable, 'REACTOR_TODO_LIST' else\r\n   Void = msg( '', 'Unable to unlock CONFIG REACTOR_TODO_LIST...' )\r\n   return 0\r\nend\r\nVoid = send_event( @window, 'CREATE' )\r\nVoid = send_message( @window:'.LIST_1', 'EXPAND', 0, 0 )\r\n.list_1->visible = 1\r\nVoid = utility( 'CURSOR', 'A' )\r\nreturn 0\r\n\r\n\r\n"
        }
    }
}