{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare subroutine forward_event, security_err_msg, Comm_RDS\r\ndeclare function company_comm, msg, security_check, post_event, rowexists\r\ndeclare function fieldcount, scroll_enable, rds_comm, rds_comm2, memberof\r\n$insert logical\r\n$insert security_rights_equ\r\n$insert rds_equ\r\n$insert msg_equates\r\n$insert prod_spec_equ\r\n$insert quote_spec_equ\r\n\r\nNewRecord = false$\r\nif rowexists( 'RDS', .rds_no->text ) then\r\n   ReadOk = true$\r\nend else\r\n   * user is trying to add new don't allow ( only create via schedule )\r\n   MsgInfo = ''\r\n   MsgInfo<mtext$> = 'Last Wafer - You can only create run data sheets from schedule.'\r\n   MsgInfo<micon$> = 'H'\r\n   Void = msg( '', MsgInfo )\t  \r\n   ReadOk = false$\r\n   .rds_no->text = ''\r\n   Void = post_event( CtrlEntId, 'CLEAR', False$, True$ )\r\nend\r\nif ReadOk then\r\n   if get_property( @window, '@NoRead' ) then\r\n       Void = set_property( @window, '@NoRead', 0 )\r\n   end else\r\n       * no qbf active do the read\r\n       * if it is active the read already took place\r\n       forward_event()\r\n   end\r\n   Void = set_property( @window, '@TotRej', ((.cust_rej_tot->text ) + (.lsl_rej_tot->text)) )          \r\n   Void = set_property( @window, '@NCRMustSave', false$ )\r\n   RejAcct = .reject_info->array\r\n   Void = set_property( @window, '@OrigRejAcct', RejAcct )   \r\n   RdsNo = .rds_no->text\r\n   .thick_all_label->text = xlate( 'RDS', RdsNo, 'THICK_MIN_TAR_MAX', 'X' )\r\n   .res_all_label->text   = xlate( 'RDS', RdsNo, 'RES_MIN_TAR_MAX', 'X' )\r\n   .con_all_label->text   = xlate( 'RDS', RdsNo, 'CON_MIN_TAR_MAX', 'X' )   \r\n   TMod = .mod_info->array\r\n   InMod = Tmod<1>\r\n   TMod<2> = oconv( InMod, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' )\r\n   .mod_info->array = TMod\r\n   DisFields = 'REACTOR/LOT_NUM/QUOTE_NO/CUST_INFO/STATUS/PO_WO_PARTNUM/LOT_NUM_VERIFY/'   \r\n   DisFields:= 'RUN_ORDER_NUM/WAFERS_SCHEDULED/OP_OUT/OP_OUT_NAME/UNLOAD_BUTTON/WAFERS_IN/'\r\n   DisFields:= 'OP_OUT_DATE/OP_OUT_TIME/LSL_REJ_TOT/CUST_REJ_TOT/PSN'\r\n   swap '/' with @rm:@window:'.' in DisFields\r\n   DisFields = @window:'.':DisFields\r\n   void = set_property( DisFields, 'ENABLED', 0 )\r\n   if memberof( @user4, 'ENGINEERING' ) or memberof( @user4, 'MASTER' ) then\r\n      .srpcfg_button->visible = 1   \r\n   end else\r\n      .srpcfg_button->visible = 0\r\n   end\r\n   if NewRecord else\r\n\t   if security_check( 'RDS', Edit$ ) else\r\n\t      * protect all fields\r\n\t      AllControls = utility( 'OBJECTLIST', @window, '' )\r\n\t      Acnt = fieldcount( AllControls, @fm )     \r\n\t      for i = 1 to Acnt         \r\n\t         ThisControl = AllControls<i>\r\n\t         if ThisControl[-6,6] = '_LABEL' or index( ThisControl, 'MENU', 1 ) or index( ThisControl, 'TEXT', 1 ) else\r\n\t            void = set_property( ThisControl, 'ENABLED', 0 )\r\n\t         end           \r\n\t      next i   \r\n          Void = scroll_enable()\t         \t      \r\n\t   end\r\n   end\r\n   Void = rds_comm2('SET_SRP_PROFILE')      \r\n   Void = rds_comm( \"READ_STORE\" )\r\n   Void = rds_comm2( \"HOLD_CHECK\" )\r\n   Void = rds_comm2( \"SUPPL_CHECK\" )  \r\n   \r\n   Comm_RDS('Refresh')   ;* Added 09/23/2004 JCH\r\nend\r\nreturn 0  "
        }
    }
}