11 lines
2.4 KiB
JSON
11 lines
2.4 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare subroutine btree.extract, update_index, rlist, end_dialog\r\ndeclare function msg, key_sort, utility, ex_vm_rem\r\n$insert lsl_users_equ\r\n$insert msg_equates\r\n\r\nopen 'DICT.SRP_INCOMING_LOG' to DictSRPIncomingLogTable else\r\n Void = msg( '', 'Unable to open DICT.SRP_INCOMING_LOG...' )\r\n return 0\r\nend\r\n\r\nSearchStr = ''\r\nDateFrom = .date_from->text\r\nDateThru = .date_thru->text\r\nSRPWaferType = ex_vm_rem( .SRPLogWaferType->text )\r\nconvert @fm to @vm in SRPWaferType; *text property will be fm delimited if >1 chosen\r\nCustomerIDs = ex_vm_rem( .customer_info->array<1> ) \r\nEngineerIDs = ex_vm_rem( .engineers->array<1> )\r\n\r\nswap @vm:@vm with '' in CustomerIDs\r\nif CustomerIDs[-1,1] = @vm then CustomerIDs[-1,1] = ''\r\nif CustomerIDs then\r\n SearchStr<-1> = 'CUST_ID':@vm:CustomerIDs\r\nend\r\n\r\nswap @vm:@vm with '' in EngineerIDs\r\nif EngineerIDs[-1,1] = @vm then EngineerIDs[-1,1] = ''\r\nif EngineerIDs then\r\n SearchStr<-1> = 'ENG_SIG':@vm:EngineerIDs\r\nend\r\n\r\nif DateFrom and DateThru then\r\n SearchStr<-1> = 'DATE':@vm:DateFrom:'...':DateThru\r\nend else\r\n\tif DateFrom then\r\n\t SearchStr<-1> = 'DATE':@vm:'>=':DateFrom\r\n\tend\r\n\tif DateThru then\r\n\t SearchStr<-1> = 'DATE':@vm:'<=':DateThru\r\n\tend\r\nend\r\n\r\nif SRPWaferType then\r\n\tSearchStr<-1> = 'WAFER_TYPE':@vm:SRPWaferType\r\nend\r\n\r\nif SearchStr then\r\n SearchStr := @fm\r\n Void = utility( 'CURSOR', 'H' )\r\n * do a btree.extract\r\n btree.extract( SearchStr, 'SRP_INCOMING_LOG', DictSRPIncomingLogTable, Keys, '', Flag )\r\n if Flag <> 0 then\r\n Void = msg( '', 'Error while extracting SRP Incoming Log records...' )\r\n return 0\r\n end\r\n if Keys then\r\n convert @vm to @fm in Keys\r\n Keys = key_sort( Keys, 'SRP_INCOMING_LOG', '#DATE', 1 )\r\n end_dialog( @window, Keys )\r\n end else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'No records found meeting your criteria...' \r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\n end\r\n Void = utility( 'CURSOR', 'A' )\r\nend else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You have not entered any search criteria...' \r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\nend\r\nreturn 0\r\n\r\n"
|
|
}
|
|
}
|
|
} |