Table of Contents

Search

  1. Preface
  2. Introduction
  3. Program Design
  4. SSA-NAME3 Functions
  5. Language Specific Guidelines
  6. Controls
  7. Advanced Controls
  8. Address Standardization
  9. ASM Workbench

SSA-NAME3 API Reference Guide

SSA-NAME3 API Reference Guide

Return Value

Return Value

For those languages which support the returning of a value from a function, all the SSA-NAME3 API calls return a
Long
. If the call succeeded, the value will be zero. Otherwise, the value will be less than zero.
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 */

0 COMMENTS

We’d like to hear from you!