The first operation that the user program should perform after making a call to an SSA-NAME3 API is to check if the returned value is less than 0. If it is, then a catastrophic error has occurred and processing should not continue. If not less than zero, then the call was performed successfully, although a logical error may have been detected. E.g. an unknown keyword may have been found in the Controls parameter. This type of error is indicated by the Response Code field. For this reason, the user program should always check the Response Code field after checking that the returned value is not less than zero. Here is a snippet of C code to demonstrate:
rc = ssan3_open (sockh, session_id, sysName,
population, controls,
rsp_code,SSA_SI_RSP_SZ,
n3_msg,SSA_SI_SSA_MSG_SZ);
if (rc < 0) {
fprintf (stderr, "%s> Error %ld from ssan3_open\n", prog, rc);
exit (-17);
}
if (rsp_code[0] != ’0’) {
fprintf (stderr, "%s> ’%s’\n", prog, n3_msg);
exit (-18);
}
/* do some more */