{
    "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 car_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 'CAR' to CARTable else\r\n   Void = msg( '', 'Unable to open CAR table...' )\r\n   return 0\r\nend\r\nToday = date()\r\nAWeekAndADayFromNow = oconv( date()+8, 'D2/' )\r\nStatement = 'SELECT CAR WITH CAR_INPLACE_DATE = \"\" AND WITH ANT_CAR_INPLACE_DATE <> \"\" AND WITH ANT_CAR_INPLACE_DATE < ':quote( AWeekAndADayFromNow )\r\nrlist( Statement, target_activelist$, '', '', '' )\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 CARRec from CARTable, Id else\r\n      Void = msg( '', 'Unable to read ':Id:' from CAR table.' )\r\n      return 0\r\n   end\r\n   AntInplaceDate = CARRec<car_ant_car_inplace_date$>\r\n   begin case\r\n      case AntInplaceDate = Today\r\n         NoteText = \"This CAR#\":Id:\" anticipated in place date is today \":oconv( Today, 'D2/' ):'...Please make sure this is in place, date and sign; or have the VP of Manufacturing push the anticipated in place date out.'\r\n\t\t NoteSubject = 'CAR#':Id:' in place TODAY Reminder'\r\n      case AntInplaceDate > Today\r\n         NoteText = \"This CAR#\":Id:\" anticipated in place date is \":oconv( AntInplaceDate, 'D2/' ):'...Please make sure this is in place, date and sign by this date; or have the VP of Manufacturing push the anticipated in place date out.'\r\n\t\t NoteSubject = 'CAR#':Id:' in place Reminder'\r\n      case AntInplaceDate < Today\r\n         NoteText = \"This CAR#\":Id:\" anticipated in place date was \":oconv( AntInplaceDate, 'D2/' ):'...Please make sure this is in place, date and sign; or have the VP of Manufacturing push the anticipated in place date out.'\r\n\t\t NoteSubject = 'CAR#':Id:' in place LATE Reminder'\r\n   end case\r\n   create_note( CARRec<car_resp_user_id$>, 'System', NoteSubject, NoteText, 'CAR', Id )\t        \t   \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"
        }
    }
}