SUBROUTINE SIG_PROFILE_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'
                
        Vals = XLATE('SYSREPOSPOPUPS','LSL2**SIG_PROF_KEYS',8,'X')
   		Desc = ''
   		LOOP
   			Val = Vals[1,@VM]
   			Code = Val[1,@SVM]
   			Desc = Val[COL2()+1,@SVM]
   		UNTIL Desc = DataIO OR Vals = ''
   			Vals = DELETE(Vals,1,1,0)
   		REPEAT
   		ReturnedValue = Code

        
   CASE ConvType = 'OCONV'
   		IF NUM(DataIo[1,1]) THEN DataIo[1,1] = ''
   		
   		Vals = XLATE('SYSREPOSPOPUPS','LSL2**SIG_PROF_KEYS',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
