SUBROUTINE CLEAN_INSP_CURR_STATUS_CONV(ConvType, DataIo, SubrLabel, ReturnedValue)
*

$insert LOGICAL

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

STATUS() = valid$
BEGIN CASE
	CASE ConvType = 'ICONV'
        ReturnedValue = DataIo
        
	CASE ConvType = 'OCONV'
		Vals = XLATE('SYSREPOSPOPUPS','LSL2**CLEAN_INSP_CURR_STATUS',8,'X')
		Desc = ''
		LOOP
			Val = Vals[1,@VM]
			Code = Val[1,@SVM]
			Desc = Val[COL2()+1,@SVM]
		UNTIL Code = DataIO OR Vals = ''
			Vals = DELETE(Vals,1,1,0)
		REPEAT
		ReturnedValue = Desc
		
	CASE OTHERWISE$
		Status() = invalid_msg$
END CASE
RETURN
