{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function msg, end_window\r\ndeclare subroutine rlist, record_lock, create_note\r\n$insert logical\r\n$insert rlist_equates\r\n$insert msg_equates\r\n$insert icar_equ\r\n\r\nCurrentSize = .gasbar->size\r\nNewSize = CurrentSize\r\nNewSize<3> = 0\r\n.gasbar->size = NewSize\r\n.gasbar->visible = 1\r\nopen 'ICAR' to ICARTable else\r\n   Void = msg( '', 'Unable to open ICAR table...' )\r\n   return 0\r\nend\r\nToday = date()\r\nStatement = 'SELECT ICAR WITH STATUS = \"O\" AND WITH RESP_SUPERVISOR_SIG = \"\"'\r\nrlist( Statement, target_activelist$, '', '', '' )\r\nToday = date()\r\n@rn.counter = 0\r\nEof = false$\r\nOnePercent = iconv( @reccount*.01, 'MD0' )\r\nloop\r\n   readnext Id else Eof = true$\r\nuntil Eof\r\n   read ICARRec from ICARTable, Id else\r\n      Void = msg( '', 'Unable to read ':Id:' from ICAR table.' )\r\n      return 0\r\n   end\r\n   IssueDate = ICARRec<icar_issue_date$>\r\n   NumOfDays = Today - IssueDate\r\n   if ( NumOfDays ) > 6 then\r\n      RespSup = ICARRec<ICAR_RESP_SUPERVISOR_ID$>\r\n      NoteText = \"This ICAR#\":Id:\" needs to be signed off by you as the responsible supervisor.  It was issued on \":oconv( IssueDate, 'D2/' ):'...which has been ':NumOfDays:' days. Please be sure to sign this soon.'\r\n      NoteSubject = 'ICAR#':Id:' LATE signature reminder'\r\n      create_note( RespSup, 'System', NoteSubject, NoteText, 'ICAR', Id )\t        \t   \r\n   end\r\n   if mod( @rn.counter, OnePercent ) else\r\n\t   NewWidth = CurrentSize<3> * @rn.counter/@reccount\r\n\t   .percent_complete->text = oconv(iconv( @rn.counter/@reccount*100, 'MD0' ), 'MD0' ):'%'\r\n\t   NewSize<3> = NewWidth\r\n\t   .gasbar->redraw = 0\r\n\t   .gasbar->size = NewSize\r\n\t   .gasbar->redraw = 1\r\n   end\r\nrepeat\r\nif @rn.counter > 0 and @reccount > 0 then\r\n\tNewWidth = CurrentSize<3> * @rn.counter/@reccount\r\n\t.percent_complete->text = oconv(iconv( @rn.counter/@reccount*100, 'MD0' ), 'MD0' ):'%'\r\n\tNewSize<3> = NewWidth\r\n\t.gasbar->redraw = 0\r\n\t.gasbar->size = NewSize\r\n\t.gasbar->redraw = 1\r\nend\r\nreturn 1"
        }
    }
}