' set key of record to delete
iRet = LceSetFieldValue(iSession, "EMPNO", EmpNo)
If iRet = LceTrue then 
    ' see if the record can be deleted
    iRet = LceDelete(iSession, "PSLMST", "EMPNO", LceTrue)
    if iRet = LceTrue then 
        ' record can be deleted so delete
        iRet = LceDelete(iSession, "PSLMST", "EMPNO", LceFalse)
    else
        msgBox "Can't delete"
    End if 
End if 
     ' normally you just delete the record. LANSA Open automatically 
     ' will set and display error codes and messages.