home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / mvssrc.zip / MTFERROR < prev    next >
Text File  |  1992-04-13  |  6KB  |  152 lines

  1. #pragma nomargins
  2. int mtfichk(int retcode)
  3. /****************************************************************/
  4. /*   this function checks the return code of the TINIT routine  */
  5. /*   and issues an informative error message to STDOUT if      .*/
  6. /*   the TINIT failed.                                          */
  7. /*                                                              */
  8. /*            INPUT:   retcode - output of TINIT call           */
  9. /*            OUTPUT:  void                                     */
  10. /*                                                              */
  11. /****************************************************************/
  12. {
  13.      switch(retcode)
  14.      {
  15.      case (MTF_OK):
  16.      break;
  17.      case (ESUBCALL):
  18.       printf("TINIT -The MTF call was issued from a subtask.\n");
  19.      break;
  20.      case (EWRONGOS):
  21.       printf("TINIT -MTF is not supported under CMS, IMS, CICS, or DB2\n");
  22.      break;
  23.      case (EACTIVE):
  24.       printf("TINIT -MTF has already been initialized and is active\n");
  25.      break;
  26.      case (ENAME2LNG):
  27.       printf("TINIT -The parallel module name is longer than 8 chars\n");
  28.      break;
  29.      case (ETASKNUM):
  30.       printf("TINIT -The number of tasks specified is invalid\n");
  31.      break;
  32.      case (ENOMEM):
  33.       printf("TINIT -There was insufficient storage for MTF-internal areas\n");
  34.      break;
  35.      case (EMODFIND):
  36.       printf("TINIT -The parallel load module was not found\n");
  37.      break;
  38.      case (EMODREAD):
  39.       printf("TINIT -The parallel load module was not sucessfully read\n");
  40.      break;
  41.      case (EMODFMT):
  42.       printf("TINIT -The parallel load module format is invalid\n");
  43.      break;
  44.      case (EAUTOALC):
  45.       printf("TINIT -Automatic allocation of standard stream DD failed\n");
  46.      break;
  47.      case (ETASKFAIL):
  48.       printf("TINIT -The attempt to attach task(s) has failed.\n");
  49.      break;
  50.      case (ETASKABND):
  51.       printf("TINIT -One or more subtasks have abnormally terminated.\n");
  52.      break;
  53.      default:
  54.       printf("TINIT -unknown tinit error, return code=%d\n",retcode);
  55.      }
  56. return retcode;
  57. }
  58. int mtfscchk(int retcode)
  59. /****************************************************************/
  60. /*   this function checks the return code of the TSCHED routine */
  61. /*   and issues an informative error message to STDOUT if      .*/
  62. /*   the TSCHED failed.                                         */
  63. /*                                                              */
  64. /*            INPUT:   retcode - output of TSCHED call          */
  65. /*            OUTPUT:  void                                     */
  66. /*                                                              */
  67. /****************************************************************/
  68. {
  69.      switch(retcode)
  70.      {
  71.      case (MTF_OK):
  72.      break;
  73.      case (EINACTIVE):
  74.       printf("TSCHED -MTF is inactive.\n");
  75.      break;
  76.      case (EBADLNKG):
  77.       printf("TSCHED -tsched has been invoked via invalid linkage\n");
  78.      break;
  79.      case (ETASKID):
  80.       printf("TSCHED -the task id specified is not valid\n");
  81.      break;
  82.      case (EENTRY):
  83.       printf("TSCHED -The parallel function was not found in the parallel module\n");
  84.      break;
  85.      case (ENOMEM):
  86.       printf("TSCHED -There was insufficient storage for MTF internal areas\n");
  87.      break;
  88.      case (ETASKABND):
  89.       printf("TSCHED -One or more subtasks have terminated abnormally\n");
  90.      break;
  91.      default:
  92.       printf("TSCHED -unknown tsched error, return code=%d\n",retcode);
  93.      }
  94. return retcode;
  95. }
  96. int mtfsychk(int retcode)
  97. /****************************************************************/
  98. /*   this function checks the return code of the TSYNCRO routine*/
  99. /*   and issues an informative error message to STDOUT if      .*/
  100. /*   the TSYNCRO failed.                                        */
  101. /*                                                              */
  102. /*            INPUT:   retcode - output of TSYNCRO call         */
  103. /*            OUTPUT:  void                                     */
  104. /*                                                              */
  105. /****************************************************************/
  106. {
  107.      switch(retcode)
  108.      {
  109.      case (MTF_OK):
  110.      break;
  111.      case (EINACTIVE):
  112.       printf("TSYNCRO -MTF is inactive.\n");
  113.      break;
  114.      case (ETASKID):
  115.       printf("TSYNCRO -the task id specified is not valid\n");
  116.      break;
  117.      case (ETASKABND):
  118.       printf("TSYNCRO -One or more subtasks have terminated abnormally\n");
  119.      break;
  120.      default:
  121.       printf("TSYNCRO -unknown TSYNCRO error, return code=%d\n",retcode);
  122.      }
  123. return retcode;
  124. }
  125. int mtftrchk(int retcode)
  126. /****************************************************************/
  127. /*   this function checks the return code of the TTERM routine  */
  128. /*   and issues an informative error message to STDOUT if       */
  129. /*   the TTERM failed.                                          */
  130. /*                                                              */
  131. /*            INPUT:   retcode - output of TTERM call           */
  132. /*            OUTPUT:  void                                     */
  133. /*                                                              */
  134. /****************************************************************/
  135. {
  136.      switch(retcode)
  137.      {
  138.      case (MTF_OK):
  139.       printf("TTERM -MTF is inactive.\n");
  140.      break;
  141.      case (EINACTIVE):
  142.       printf("TTERM -MTF is inactive.\n");
  143.      break;
  144.      case (ETASKABND):
  145.       printf("TTERM -One or more subtasks have terminated abnormally\n");
  146.      break;
  147.      default:
  148.       printf("TTERM -unknown TTERM error, return code=%d\n",retcode);
  149.      }
  150. return retcode;
  151. }
  152.