11 lines
2.0 KiB
JSON
11 lines
2.0 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, fieldcount\r\n$insert lsl_users_equ\r\n$insert msg_equates\r\n\r\nopen 'DICT.QUARTZ_TC_LOG' to DictQTCLogTable else\r\n Void = msg( '', 'Unable to open DICT.QUARTZ_TC_LOG...' )\r\n return 0\r\nend\r\nSearchStr = ''\r\nEntryDateFrom = .entry_date_from->text\r\nEntryDateThru = .entry_date_thru->text\r\n\r\nReactors = .reactors->array\r\nswap @vm:@vm with '' in Reactors\r\nif Reactors[-1,1] = @vm then Reactors[-1,1] = ''\r\n\r\nif EntryDateFrom and EntryDateThru then\r\n SearchStr<-1> = 'ENTRY_DATE':@vm:EntryDateFrom:'...':EntryDateThru\r\nend else\r\n\tif EntryDateFrom then\r\n\t SearchStr<-1> = 'ENTRY_DATE':@vm:'>=':EntryDateFrom\r\n\tend\r\n\tif EntryDateThru then\r\n\t SearchStr<-1> = 'ENTRY_DATE':@vm:'<=':EntryDateThru\r\n\tend\r\nend\r\nif Reactors <> '' then\r\n SearchStr<-1> = 'REACTOR':@vm:Reactors\r\nend\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, 'QUARTZ_TC_LOG', DictQTCLogTable, Keys, '', Flag )\r\n if Flag <> 0 then\r\n Void = msg( '', 'Error while extracting QUARTZ_TC_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, 'QUARTZ_TC_LOG', 'REACTOR':@fm:'#ENTRY_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"
|
|
}
|
|
}
|
|
} |