added LSL2 stored procedures
This commit is contained in:
46
LSL2/STPROC/ICAR_NONCONFORMANCE_VALID.txt
Normal file
46
LSL2/STPROC/ICAR_NONCONFORMANCE_VALID.txt
Normal file
@ -0,0 +1,46 @@
|
||||
compile subroutine ICAR_NONCONFORMANCE_VALID(ConvType, DataIo, Branch, ReturnedValue)
|
||||
begin condition
|
||||
pre:
|
||||
post:
|
||||
end condition
|
||||
|
||||
$insert logical
|
||||
$insert msg_equates
|
||||
$insert icar_nonconformance_equ
|
||||
|
||||
declare function msg, get_property, set_property
|
||||
equ valid$ to 0 ;* successful
|
||||
equ invalid_msg$ to 1 ;* bad data - print error message window
|
||||
equ invalid_conv$ to 2 ;* bad conversion - " "
|
||||
equ invalid_nomsg$ to 3 ;* bad but do not print the error message window
|
||||
equ CrLf$ to char(13):char(10)
|
||||
|
||||
ReturnedValue = DataIo
|
||||
status() = Valid$
|
||||
*
|
||||
ICARNonConf = xlate( 'CONFIG', 'ICAR_NONCONFORMANCE', '', 'X' )
|
||||
Procs = ICARNonConf<Proc$>
|
||||
begin case
|
||||
case ConvType = 'ICONV'
|
||||
locate DataIo in Procs using @vm setting Ppos then
|
||||
* VALIDATED OK
|
||||
end else
|
||||
MsgInfo = ''
|
||||
MsgInfo<mtext$> = DataIo:' is not an valid procedure...'
|
||||
MsgInfo<micon$> = 'H'
|
||||
Void = msg( '', MsgInfo )
|
||||
status() = invalid_nomsg$
|
||||
end
|
||||
case ConvType = 'OCONV'
|
||||
locate DataIo in Procs using @vm setting Ppos then
|
||||
NewDataIo = ICARNonConf<ProcDesc$,Ppos>
|
||||
end else
|
||||
NewDataIo = ''
|
||||
end
|
||||
ReturnedValue = NewDataIo
|
||||
case otherwise$
|
||||
ReturnedValue = ''
|
||||
status() = invalid_conv$
|
||||
end case
|
||||
return
|
||||
|
Reference in New Issue
Block a user