home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cicspa2.zip
/
PA2ABEND.CCS
< prev
next >
Wrap
Text File
|
1995-07-02
|
3KB
|
109 lines
/*******************************************************************
*
* MODULE NAME PA2ABEND.CCP
*
* DESCRIPTIVE NAME ABEND Sample
*
* Statement: Licensed Materials - Property of IBM
*
* 5764-091 (c) Copyright IBM Corp. 1994,1995.
*
* See Copyright Instructions.
*
* All rights reserved.
*
* U.S. Government Users Restricted Rights - use,
* duplication or disclosure restricted by GSA
* ADP Schedule Contract with IBM Corp.
*
* Status: Version 1 Release 01
*
* NOTES :-
* DEPENDENCIES = None
* None
* RESTRICTIONS = none
* MODULE TYPE = program
* PROCESSOR = PS/2 and PC
*
* PURPOSE =
*
* LINKAGE =
*
* INPUT = None
*
*
* OUTPUT = WRITE TO OPERATOR saying ABEND caused
*
* EXIT-NORMAL =
*
* EXIT-ERROR =
*
* EXTERNAL REFERENCES =
*
* DATA AREAS =
*
* CONTROL BLOCKS = none
*
* GLOBAL VARIABLES =
*
* TABLES =
*
* SAMPLE DEF FILE =
*
*
*
*
*
*
********************************************************************/
#include <string.h>
#pragma intrinsic(strlen)
#include "pa2clock.h"
/*************************************************************/
/* */
/* */
/*************************************************************/
void main( void )
{
char Message[] = "PA2CLOCK sample, ABEND coming up.";
static char Pa2ABEND[] = "PA2X";
PA2CLOCK(PA2BEGIN,1); /* start clock 1 */
PA2CLOCK(PA2BEGIN,2); /* start clock 2 */
PA2CLOCK(PA2BEGIN,3); /* start clock 3 */
PA2CLOCK(PA2END,4); /* stop clock 4, before started */
/* get stop before start message in FAASTATS.DAT */
PA2CLOCK('X',2); /* pass non valid function value */
/* get non valid function message in FAASTATS.DAT */
PA2CLOCK(PA2BEGIN,7); /* start clock 7, out of range 1-4 */
/* get out of range message in FAASTATS.DAT */
/* Peform a CICS statement to put some time in clocks 1,2,and 3 */
EXEC CICS WRITE OPERATOR
TEXT(Message)
TEXTLENGTH((long)strlen(Message));
PA2CLOCK(PA2END,2); /* end clock 2, to get some real data */
PA2CLOCK(PA2BEGIN,3); /* start clock 3, without having stopped it first */
/* get not stopped clock message in FAASTATS.DAT */
EXEC CICS ABEND
ABCODE(Pa2ABEND);
EXEC CICS RETURN;
/* get not stopped clock 1 and 3 before end of */
/* transaction message in FAASTATS.DAT */
}