added LSL2 stored procedures
This commit is contained in:
55
LSL2/STPROC/FIX_REACT_STATUS.txt
Normal file
55
LSL2/STPROC/FIX_REACT_STATUS.txt
Normal file
@ -0,0 +1,55 @@
|
||||
COMPILE ROUTINE FIX_REACT_STATUS(Dummy)
|
||||
ROWDEF(CHARSTR)
|
||||
|
||||
DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info
|
||||
DECLARE FUNCTION Get_Status, Set_Printer
|
||||
|
||||
$INSERT OIPRINT_EQUATES
|
||||
|
||||
$INSERT REACT_STATUS_EQUATES
|
||||
|
||||
|
||||
OPEN 'REACT_STATUS' To FileIn ELSE GOTO Bail
|
||||
|
||||
SELECT FileIn
|
||||
DEBUG
|
||||
|
||||
ActiveReacts = '24,27,29,30,32,33,34,40,42,48,50,52,54,58,63'
|
||||
CONVERT ',' TO @VM IN ActiveReacts
|
||||
|
||||
Done = 0
|
||||
RecCnt = 0
|
||||
LOOP
|
||||
READNEXT RecKey ELSE Done = 1
|
||||
UNTIL Done
|
||||
RecCnt += 1
|
||||
Send_Info(RecCnt)
|
||||
LOCATE RecKey IN ActiveReacts USING @VM SETTING Pos THEN
|
||||
|
||||
READ Record FROM FileIn,RecKey THEN
|
||||
ReactorType = XLATE('REACT_STATUS',RecKey,'REACT_TYPE_DESC','X')
|
||||
IF ReactorType NE 'EPP' THEN
|
||||
Record<REACT_STATUS_LOAD_CASS_ID$> = Record<REACT_STATUS_LOAD_CASS_ID$>[-1,'B':@VM]
|
||||
Record<REACT_STATUS_LOAD_DTM$> = Record<REACT_STATUS_LOAD_DTM$>[-1,'B':@VM]
|
||||
*WRITE Record ON FileIn,RecKey THEN
|
||||
Send_Dyn(RecKey:' ':Record<REACT_STATUS_LOAD_CASS_ID$>:' ':OCONV(Record<REACT_STATUS_LOAD_DTM$>,'DT4/HS'))
|
||||
*END
|
||||
END
|
||||
END
|
||||
END
|
||||
REPEAT
|
||||
|
||||
GOTO Bail
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF Get_Status(errCode) THEN DEBUG
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Bail:
|
||||
* * * * * * *
|
||||
|
||||
|
Reference in New Issue
Block a user