Testing and Debugging Programmers responsibility that program works correctly! Can write program incrementally You must test anything that the user may enter on every screen High–Low ranges of data entered Invalid entries – when feasible CICS-Dbg 1 Types of Testing Unit Test Tested by itself to verify performance Correct screens displayed Field edits working correctly Files updated correctly Usually done by programmer CICS-Dbg 2 Types of Testing Concurrency Test Run concurrently on several terminals Verify multiple executions - no interference Usually need help for this testing Verify record ‘locks’ (if used) Verify ‘busy’ message (if used) CICS-Dbg 3 Types of Testing Integration Test Run with other programs Verify the program works as part of system Can also find problems with app design Screen Formats PF key uses and layouts Color coding used, etc. CICS-Dbg 4 Types of Testing Regression Test Verify functions not changed still work Very time consuming Entire original test usually repeated 70+ Percent is maintenance (not NEW!) Often done hurriedly with poor results CICS-Dbg 5 Test Environment Usually separate CICS region Relaxed Security Create own table entries Create test Data Sets Access to CICS debug aids CEMT, CECI, CEDF, CEDC Change management software CICS-Dbg 6 The Test Plan Try and test everything! Maximum and Minimum Values Required Fields Missing Fields Default Values Data Set Access and Updates ‘Clean Up’ when Finished! CICS-Dbg 7 Test Steps Test the MAPSETS CECI transaction – SEND MAP Verify items on checklist Page 201 Program, MOVE ALL ‘X’ to fields, SEND MAP Test Program with VALID data Test ‘normal’ functions and defaults Test Program with INVALID data Most time consuming making up data Test all edit rules and defaults CICS-Dbg 8 CEDA (For Table Updates) CEDA DI G(group) [Display Group] (where nn is last two digits of your ID Find similar entries and type following: COPY AS(VIS0nn) - MapSet COPY AS(VIP0nn) - Program COPY AS(V0nn) - Transaction ID Alter – Change to new program name! COPY AS(NAMADDnn) – VSAM File Alter – Change DSN and verify Settings CEDA I G(group) [Install Group] CICS-Dbg 9 CICS Transactions for Testing CEMT – Master Terminal Transaction NEWCOPY Program / Map Must do after each COMPILE! CEMT I PROG(V*QQ) OPEN/CLOSE a Data Set Needed for rebuilding a Data Set CEMT I FI(V*QQ) DELETE / DEFINE of VSAM Data Set CICS-Dbg 10 CEMT (Handy Transactions) Used for NEWCOPY after Compile(s) CEMT I PROG(VIP*QQ) Lists COBOL Programs CEMT I PROG(VIS*QQ) Lists Assembler (MAP) Programs CEMT I FI(*QQ) [For initializing files] Lists All Your CICS VSAM Files CICS-Dbg 11 CICS Transactions for Testing CECI – Command-level Interpreter Allows execution of Most CICS commands Can test MAP display Can store data in VARIABLES ALL CECI Variables start with ‘&’ Can modify (corrupted) Data Sets READ UPDATE into &rec, then REWRITE! CICS-Dbg 12 CECI (For MAP Testing) CECI SEND MAP(‘VIDS0M1’) MAPSET(‘VIS0QQ’) [ERASE] MAPONLY Shows command before and after Can run most CICS Commands Can use variables! (Pages 211 - 215) CICS-Dbg 13 Debugging a CICS Abend ABEND = ABnormal END of Program Program encounters error CICS presents Abend Code to Program Program can handle with message Program can ignore – (CICS Abend) Over 300 Abend codes Only a few are usually handled CICS-Dbg 14 Abend Code Types Exceptional Conditions (AEI and AEY) File Not Open, Record Not Found, Etc. Program Checks (ASRA) S0C7, other program errors. Other (Misc) Abend Codes Cursor off screen, no map found, etc. CICS-Dbg 15 Execution Diagnostics Facility Same Terminal Checkout Mode ‘CEDF’ entered from clear screen Terminal Responds: EDF MODE ON Enter TRAN-ID of Program to debug Each CICS COMMAND is shown Before execution and after execution Status shown, NORMAL is Good! You can add ‘Extra’ CICS Commands CICS-Dbg 16 (Re)Build VSAM Data Files In In In In In In In CICS, Close Files - CEMT I FI(V*QQ) TSO, RUN: VCUSTDS and VTAPEALL CICS, Open Files – CEMT I FI(V*QQ) CICS, Enter Customer(s), Tape(s) CICS, Close Files (one more time) TSO, RUN: VTAPEBX (Builds Index) CICS, Open Files (For last time?) CICS-Dbg 17