Platform LSF API uses error numbers to indicate an error. There are two global variables that are accessible from the application. These variables are used in exactly the same way UNIX system call error number variable errno is used. The error number should only be tested when an LSLIB or LSBLIB call fails.
An Platform LSF program should test whether an LSLIB call is successful or not by checking the return value of the call instead of lserrno.
When any LSLIB function call fails, it sets the global variable lserrno to indicate the cause of the error. The programmer can either call ls_perror() to print the error message explicitly to the stderr, or call ls_sysmsg() to get the error message string corresponding to the current value of lserrno.