SUBROUTINE CONV_ITEM_CURR_STATUS(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
        	begin case
           case DataIo = 'Retired'
              ReturnedValue = 'R'
              
           case DataIo = 'Installed'
              ReturnedValue = 'I'
              
           case DataIo = 'Used'
              ReturnedValue = 'U'
              
           case DataIo = 'New'
              ReturnedValue = 'N'   
           case 1
              ReturnedValue = DataIo
         end case
       
   case ConvType = 'OCONV'
        begin case
           case DataIo = 'R'
              ReturnedValue = 'Retired'
              
           case DataIo = 'I'
              ReturnedValue = 'Installed'
              
           case DataIo = 'U'
              ReturnedValue = 'Used'
              
           case DataIo = 'N'
              ReturnedValue = 'New'   
           case 1
              ReturnedValue = DataIo
         end case
   case otherwise$
        status() = invalid_msg$
end case
return
