Mano,
i am confused but try below one
if {APY2055.PYMNT_STATUS} ='P' THEN
'300'+{@transit_nbr} + right({@account_number},7) + {@check_number} + {@check_amount}+ {@Client_ref_space} +{@filler_53to60}+{@check_dt}+ {@filler_67to80}
ELSE IF {APY2055.PYMNT_STATUS} ='S' THEN
'311'+{@transit_nbr} + right({@account_number},7) + {@check_number} + {@check_amount}+ {@Client_ref_space} +{@filler_53to80}
ELSE IF {APY2055.PYMNT_STATUS} ='xxx' THEN
'321'+{@transit_nbr} + right({@account_number},7) + {@check_number} + {@check_amount}+ {@Client_ref_space} +{@filler_53to80}
Thnks,
DJ