{ "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 )\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 = CurDate\r\n\t\tRLRec = CurTime\r\n\t\tRLRec = CurDate\r\n\t\tRLRec = CurTime\r\n\t\tRLRec = ThisReactor\r\n\t\tRLRec = 'A' ;* for passdown\r\n\t\tRLRec = Notes\r\n\t\tRLRec = EntryId\t\t\r\n\t\tRLRec = 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 = 'Do you wish to view the entrie(s)...'\r\n MsgInfo = 'BNY'\r\n MsgInfo = '?'\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 = 'You must select at least one reactor and enter a note at the bottom...'\r\n MsgInfo = 'H'\r\n Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0" } } }