DCE Application Programming Guide
Sample Mixed-Language Application
HP NonStop DCE Application Programming Guide—429551-003
B-7
The COBOL File
The COBOL File
The COBOL file is shown in Figure B-5 on page B-8.
 printf(“Elapsed %ld seconds for %ld calls.\n”,
 end_time - start_time,currcounter - 1);
 printf(“\nTransfered %ld bytes.\n”,loopCount * transferSize * 2);
 if (end_time - start_time) {
 avg1 = ldiv(loopCount, 
 end_time - start_time);
 printf(“This is an average of %ld RPC calls per second.\n”,
 avg1.quot);
 avg2 = ldiv(loopCount * transferSize * 2, 
 end_time - start_time);
 printf(“This is an transfer rate of %ld bytes per second.\n\n”,
 avg2.quot);
 } else {
 printf(“Start time and end time are too close to calculate 
rates.\n\n”);
 }
 return 0;
}
/* end file client.c */
Figure B-4. The Client File in a Mixed-Language Application (page 3 of 3)










