6100 ADCCP Programming Manual
ADCCP Programming Example Using C
C–6 069225 Tandem Computers Incorporated
 short count;
 short count_trans;
 int error;
 /*
 * The values for the specific request are assigned to the
 * structure for the request and the buffer length is set.
 */
 dPtr->function = function_code;
 dPtr->modifier = 0;
 dPtr->request_id = function_code;
 dPtr->text_out = textout;
 dPtr->text_in = textin;
 count = length;
 c_code = WRITEREAD(rfnum,(short *)dPtr,length,count,&count_trans);
 if (c_code != CCE) {
 FILEINFO(rfnum,&error);
 printf("Error %d occurred on WRITEREAD\n",error);
 DEBUG();
 ABEND();
 }
}
/*
 *-------------------------------------------------------------------
 *
 * Status_codes
 *
 * Prints the meaning of the status code returned by
 * the response.
 *
 * Results:
 *
 * Takes the status code from the response and prints out
 * a message.
 *
 * Side effects:
 *
 * None.
 *---------------------------------------------------------------------
*/
void Status_codes(code)
 short code; /* IN - The status code value from the response.
 */
{
 switch(code) {
 case 0:
 printf("Status code %d.\n",code);
 printf("The request was successful.\n");
 break;
 case 1:
 printf("Status code %d.\n",code);
 printf("A bad sequence number in a frame in route from a");
 printf("controller to an LIU.\n");
 break;
 case 2:
 printf("Status code %d.\n",code);
 printf("The LIU received the wrong sequence of frame types");
 printf("from the controller.\n");
 break;
 case 3:
 printf("Status code %d.\n",code);
 printf("The LIU received an invalid frame type from the controller.\n");
 case 4:










