11 lines
2.4 KiB
JSON
11 lines
2.4 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare function fieldcount, msg, next_key, start_window\r\n$insert reactor_log_equ\r\n$insert logical\r\n$insert msg_equates\r\n\r\nReactors = .reactors->text\r\nRcnt = fieldcount( Reactors, @fm )\r\nif ( Rcnt > 0 ) and ( .notes->text <> '' ) then\r\n\topen 'REACTOR_LOG' to RLTable else\r\n\t Void = msg( '', 'Unable to open REACTOR_LOG...' )\r\n\t return 0\r\n\tend\r\n CurDate = date()\r\n CurTime = time()\r\n EntryId = @user4\r\n Notes = .notes->text\r\n RlKeys = ''\r\n for i = 1 to Rcnt\r\n ThisReactor = trim( Reactors<i> )\r\n convert @upper_case to '' in ThisReactor\r\n convert @lower_case to '' in ThisReactor\r\n ThisReactor = trim( ThisReactor )\r\n\t\tNextRLKey = next_key( 'REACTOR_LOG', RLTable, 'NEXT', '' )\r\n\t\tRLRec = ''\r\n\t\tRLRec<reactor_log_start_date$> = CurDate\r\n\t\tRLRec<reactor_log_start_time$> = CurTime\r\n\t\tRLRec<reactor_log_end_date$> = CurDate\r\n\t\tRLRec<reactor_log_end_time$> = CurTime\r\n\t\tRLRec<reactor_log_reactor$> = ThisReactor\r\n\t\tRLRec<reactor_log_category$> = 'A' ;* for passdown\r\n\t\tRLRec<reactor_log_notes$> = Notes\r\n\t\tRLRec<reactor_log_entry_id$> = EntryId\t\t\r\n\t\tRLRec<reactor_log_entry_date$> = CurDate\r\n\t\twrite RLRec on RLTable, NextRLKey else\r\n\t\t void = msg( '', 'Unable to write ':NextRLKey:' on REACTOR_LOG...' )\r\n\t\t return 0\r\n\t\tend\r\n\t\tunlock RLTable, NextRLKey else\r\n\t\t Void = msg( '', 'Unable to unlock ':NextRLKey:' on REACTOR_LOG...' )\r\n\t\t return 0\r\n\t\tend\r\n\t\tVoid = next_key( 'REACTOR_LOG', RLTable, 'UPDATE', NextRLKey )\r\n RlKeys<1,-1> = NextRLKey\t\t\r\n next i\r\n\t.reactors->text = ''\r\n\t.notes->text = ''\r\n if RlKeys <> '' then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'Do you wish to view the entrie(s)...'\r\n MsgInfo<mtype$> = 'BNY'\r\n MsgInfo<micon$> = '?'\r\n Resp = msg( '', MsgInfo )\r\n if Resp then\r\n\t\t Void = start_window( 'REACTOR_LOG', '', RlKeys, '', '' )\r\n end\r\n end\r\nend else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must select at least one reactor and enter a note at the bottom...'\r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
|
|
}
|
|
}
|
|
} |