{ "header": { "version": 1, "type": "record" }, "body": { "record1": { "<1>": "declare function msg, end_window, fieldcount\r\ndeclare subroutine rlist, record_lock\r\n$insert logical\r\n$insert rlist_equates\r\n$insert msg_equates\r\n$insert rds_equ\r\n$insert schedule_equ\r\n$insert schedule_srl_equ\r\n\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 'SCHEDULE' to SchedTable else\r\n Void = msg( '', 'Unable to open SCHEDULE table...' )\r\n return 0\r\nend\r\nStatement = 'SELECT SCHEDULE WITH STATUS = \"O\"'\r\nrlist( Statement, target_activelist$, '', '', '' )\r\n@rn.counter = 0\r\nEof = false$\r\nToday = date()\r\nOnePercent = iconv( @reccount*.01, 'MD0' )\r\nloop\r\n readnext Id else Eof = true$\r\nuntil Eof\r\n read SchedRec from SchedTable, Id else\r\n Void = msg( '', 'Unable to read ':Id:' from SCHEDULE table.' )\r\n return 0\r\n end\r\n Update = false$\r\n Quantity = xlate( 'SCHEDULE', Id, 'QUANTITY', 'X' )\r\n if Quantity then ;* wafers shipped\r\n ShipSum = sum( SchedRec ) + sum( SchedRec ) + sum( SchedRec )\r\n if ShipSum = Quantity then ;* all shipped\r\n Update = true$\r\n end\r\n end else ;* setup or srp charge\r\n if SchedRec then\r\n Update = true$\r\n end\r\n end\r\n if Update then\r\n record_lock( SchedTable, 'Schedule', Id )\r\n\t SchedRec = 'C'\r\n\t SchedRec = Today\r\n\t write SchedRec on SchedTable, Id else\r\n\t Void = msg( '', 'Unable to write ':Id:' on schedule table.' )\r\n\t return 0\r\n\t end\r\n\t unlock SchedTable, Id else\r\n\t Void = msg( '', 'Unable to unlock ':Id:' in schedule table.' )\r\n\t return 0\r\n\t end\r\n end\r\n if mod( @rn.counter, OnePercent ) else\r\n 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\r\n" } } }