home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cicspa2.zip / PA2ABEND.CCS < prev    next >
Text File  |  1995-07-02  |  3KB  |  109 lines

  1.  /*******************************************************************
  2.  *
  3.  * MODULE NAME        PA2ABEND.CCP
  4.  *
  5.  * DESCRIPTIVE NAME   ABEND Sample
  6.  *
  7.  * Statement:         Licensed Materials - Property of IBM
  8.  *
  9.  *                    5764-091 (c) Copyright IBM Corp. 1994,1995.
  10.  *
  11.  *                    See Copyright Instructions.
  12.  *
  13.  *                    All rights reserved.
  14.  *
  15.  *                    U.S. Government Users Restricted Rights - use,
  16.  *                    duplication or disclosure restricted by GSA
  17.  *                    ADP Schedule Contract with IBM Corp.
  18.  *
  19.  * Status:            Version 1 Release 01
  20.  *
  21.  *  NOTES :-
  22.  *    DEPENDENCIES = None
  23.  *                   None
  24.  *    RESTRICTIONS = none
  25.  *    MODULE TYPE  = program
  26.  *    PROCESSOR    = PS/2 and PC
  27.  *
  28.  *  PURPOSE =
  29.  *
  30.  *  LINKAGE =
  31.  *
  32.  *  INPUT =  None
  33.  *
  34.  *
  35.  *  OUTPUT =   WRITE TO OPERATOR saying ABEND caused
  36.  *
  37.  *  EXIT-NORMAL =
  38.  *
  39.  *  EXIT-ERROR =
  40.  *
  41.  *  EXTERNAL REFERENCES =
  42.  *
  43.  *  DATA AREAS =
  44.  *
  45.  *  CONTROL BLOCKS = none
  46.  *
  47.  *  GLOBAL VARIABLES =
  48.  *
  49.  *  TABLES =
  50.  *
  51.  *  SAMPLE DEF FILE =
  52.  *
  53.  *
  54.  *
  55.  *
  56.  *
  57.  *
  58.  ********************************************************************/
  59.  
  60. #include <string.h>
  61. #pragma intrinsic(strlen)
  62.  
  63. #include "pa2clock.h"
  64. /*************************************************************/
  65. /*                                                           */
  66. /*                                                           */
  67. /*************************************************************/
  68.  
  69.  
  70. void main( void )
  71. {
  72. char Message[] = "PA2CLOCK sample, ABEND coming up.";
  73. static char Pa2ABEND[] = "PA2X";
  74.  
  75.     PA2CLOCK(PA2BEGIN,1);   /* start clock 1 */
  76.  
  77.     PA2CLOCK(PA2BEGIN,2);   /* start clock 2 */
  78.  
  79.     PA2CLOCK(PA2BEGIN,3);   /* start clock 3 */
  80.  
  81.     PA2CLOCK(PA2END,4);     /* stop clock 4, before started */
  82.                             /* get stop before start message in FAASTATS.DAT */
  83.  
  84.     PA2CLOCK('X',2);        /* pass non valid function value */
  85.                             /* get non valid function message in FAASTATS.DAT */
  86.  
  87.     PA2CLOCK(PA2BEGIN,7);   /* start clock 7, out of range 1-4 */
  88.                             /* get out of range message in FAASTATS.DAT */
  89.  
  90.     /* Peform a CICS statement to put some time in clocks 1,2,and 3 */
  91.  
  92.     EXEC CICS WRITE OPERATOR
  93.       TEXT(Message)
  94.       TEXTLENGTH((long)strlen(Message));
  95.  
  96.     PA2CLOCK(PA2END,2);     /* end clock 2, to get some real data */
  97.  
  98.     PA2CLOCK(PA2BEGIN,3);   /* start clock 3, without having stopped it first */
  99.                             /* get not stopped clock message in FAASTATS.DAT  */
  100.  
  101.     EXEC CICS ABEND
  102.        ABCODE(Pa2ABEND);
  103.  
  104.     EXEC CICS RETURN;
  105.                             /* get not stopped clock 1 and 3 before end of */
  106.                             /* transaction message in FAASTATS.DAT */
  107.  
  108. }
  109.