11 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|     "header": {
 | |
|         "version": 1,
 | |
|         "type": "record"
 | |
|     },
 | |
|     "body": {
 | |
|         "record1": {
 | |
|             "<1>": "declare function msg, end_window, fieldcount\r\ndeclare subroutine rlist, record_lock, create_note\r\n\r\n$insert logical\r\n$insert rlist_equates\r\n$insert msg_equates\r\n$insert quote_sigs_equ\r\n$insert master_calib_list_equ\r\n$INSERT NOTIFICATION_EQU\r\n\r\nEQU CRLF$ TO \\0D0A\\\r\n\r\nCurrentSize\t= .gasbar->size\r\nNewSize\t\t= CurrentSize\r\nNewSize<3>\t= 0\r\n\r\n.gasbar->size\t\t= NewSize\r\n.gasbar->visible\t= 1\r\n\r\n\r\nOPEN 'CONFIG' to ConfigTable else\r\n   Void = msg( '', 'Unable to open CONFIG table...' )\r\n   return 0\r\nEND\r\n\r\n* Changed to send only 2 messages with multiple instruments / NIST lines per message 12/22/2008 JCH\r\n\r\nMasterCalibList = XLATE( 'CONFIG', 'MASTER_CALIB_LIST', '', 'X' )\r\n\r\nInstruments\t= MasterCalibList<MasterCalibListInstrument$>\t\t\t\t; *read the instrument array\r\nInstrumentCnt = COUNT(Instruments,@VM) + (Instruments NE '')\r\n\r\nInstrumentSNs\t\t\t= MasterCalibList<MasterCalibListEquipSN$>\r\nInstrumentLocs\t\t\t= MasterCalibList<MasterCalibListEquipLoc$>\r\nInstrumentNextCalDates\t= MasterCalibList<MasterCalibListEquipNextCalDate$>\r\n\r\nNISTs = MasterCalibList<MasterCalibListNISTStandard$>\t\t\t\t\t; *read the NIST Standards array\r\nNISTCnt = COUNT(NISTs,@VM) + (NISTs NE '')\r\n\r\nNISTSNs\t\t\t\t= MasterCalibList<MasterCalibListNISTSN$>\r\nNISTLocs\t\t\t= MasterCalibList<MasterCalibListNISTLoc$>\r\nNISTNextCalDates\t= MasterCalibList<MasterCalibListNISTNextCalDate$>\r\n\r\n\r\nToday = DATE() \r\n\r\nNoteText = ''\r\n\r\nFOR I = 1 TO InstrumentCnt\r\n\tIF (InstrumentNextCalDates<1, I> < today+15) AND (InstrumentNextCalDates<1,I> <>'') THEN\r\n\t\tIDate = OCONV( InstrumentNextCalDates<1, I>, \"D2/\" )\r\n\t\tNoteText := 'The ':Instruments<1,I>:' (S/N: ':InstrumentSNs<1,I>:') located in the ':InstrumentLocs<1,I>:' is due for calibration on ':IDate:CRLF$\r\n\tEND\r\nNEXT I\r\n\r\nCalEngSigners = XLATE('NOTIFICATION','4PP_OUT',NOTIFICATION_USER_ID$,'X')\r\n\r\nNoteSubject = \"Equipment Calibration Reminder\"\r\n \r\nIF NoteText NE '' THEN\r\n\tCreate_Note( CalEngSigners, 'System', NoteSubject, NoteText, 'MASTER_CALIB_LIST', 'EQUIPMENT*':I:'*CENTER' )\r\nEND\r\n\r\nNoteText = ''\r\n\r\nFOR I = 1 TO NISTCnt\r\n\tIF (NISTNextCalDates<1,I> < Today+15) and (NISTNextCalDates<1,I> <>'') THEN\r\n\t\tNDate = OCONV( NISTNextCalDates<1, I>, \"D2/\")\r\n\t\tNoteText := 'The NIST Standard ':NISTs<1,I>:' (S/N: ':NISTSNs<1,I>:') located in the ':NISTLocs<1,I>:' is due for calibration on ':NDate:CRLF$\r\n\tEND\r\nNEXT I\r\n\r\nIF NoteText NE '' THEN\r\n\tCreate_Note( CalEngSigners, 'System', NoteSubject, NoteText, 'MASTER_CALIB_LIST', 'NIST*':I:'*CENTER' )\r\nEND\r\n\r\nRETURN 1\r\n\r\n\r\n\r\n/*\r\nCalEngSigners = XLATE( 'CONFIG', 'QUOTE_SIGS', F4PPOutSpecNotif$, 'X' )\r\nNoteSubject = \"Equipment Calibration Reminder\"                                                          \r\n\r\nFOR I = 1 TO InstrumentCnt\r\n\tIF (InstrumentNextCalDates<1, I> < Today+15) and (InstrumentNextCalDates<1,I> <>'') THEN\r\n\t\tIDate = OCONV( InstrumentNextCalDates<1, I>, \"D2/\" )\r\n\t\tNoteText = 'The ':Instruments<1,I>:' (S/N: ':InstrumentSNs<1,I>:') which is located in the ':InstrumentLocs<1,I>:' is due for calibration on ':IDate\r\n\t\tcreate_note( CalEngSigners, 'System', NoteSubject, NoteText, 'MASTER_CALIB_LIST', 'EQUIPMENT*':I:'*CENTER' )\t        \t   \r\n   \tEND\r\nNEXT\r\n\r\nfor I = 1 to NISTCnt\r\n\tif (NISTNextCalDate<1,I> < today+15) and (NISTNextCalDate<1,I> <>'') then\r\n\t\tNDate = oconv( NISTNextCalDate<1, I>, \"D2/\")\r\n\t\tNoteText = 'The NIST Standard ':NISTs<1,I>:' (S/N: ':NISTSNs<1,I>:') which is located in the ':NISTLocs<1,I>:' is due for calibration on ':NDate\r\n\t\tcreate_note( CalEngSigners, 'System', NoteSubject, NoteText, 'MASTER_CALIB_LIST', 'NIST*':I:'*CENTER' )\t        \t   \t        \t   \r\n\t\t\r\n   \tend \r\nnext\r\n*/\r\n\r\nRETURN 1"
 | |
|         }
 | |
|     }
 | |
| } |