Previous Topic: Review What HappenedNext Topic: Review What Happened


Option 04: How to Display Variable Length Data

This section of the demo session details how you can see the current length of variable length records.

Note: Before you begin this section, complete the steps outlined in Demo Preliminaries (unless you did so earlier in this session). The CA InterTest Demo Session Options Menu should be displayed.

  1. Select option 04, and press Enter.

    The demo program displays a screen that describes what occurs in this part of the demo session.

    ********************************************************************** **** **** **** CA InterTest Demo Session **** **** Display Variable Length Data **** **** **** ********************************************************************** This feature lets you see the current length and contents of variable length data and records at any point in your program. Here is what will happen: 1. CA InterTest halts COBDEMO at an unconditional breakpoint. 2. You use the CORE facility to see the original record. 3. COBDEMO continues to execute and changes the length of the record. 4. You use CORE again to see the updated record. When this section of the demo completes, you will return to the Options Menu. Press ENTER to continue or CLEAR to terminate.

  2. Press Enter.

    CA InterTest for CICS halts the execution of the demo program at an unconditional breakpoint set during the Demo Preliminaries section.

    CA InterTest for CICS V9.1 - PROTSYM FILE UNCOND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ VAR-REC-LEN | +00100. ---------+--------------------------------------------------------------------- 000687**** THIS SECTION OF THE DEMO SHOWS HOW YOU **** 000688**** CAN LOOK AT VARIABLE LENGTH DATA ********** U ==> MOVE +48 TO VAR-REC-LEN. _ 000690 GO TO SEND-MAP00. _ 000691 REPLACE-FILE. _ 000692 IF TASK-SWITCH3 EQUAL SPACE _ 000693 MOVE 'A' TO TASK-SWITCH3 _ 000694 MOVE 'DMAP04' TO MAPNAME _ 000695 GO TO SEND-REWRITE-RETURN. _ 000696 IF TASK-SWITCH3 EQUAL 'A' _ 000697 GO TO READ-DATASET _ 000698 ELSE _ 000699 GO TO SEND-MAP00. _ 000700 READ-DATASET. 000701*EXEC CICS HANDLE CONDITION 000702* DSIDERR 000703* NOTOPEN(NOT-OPEN)

    The unconditional breakpoint was actually set at procedure name DO‑READ‑VAR. Because a procedure name does not have executable code, the unconditional breakpoint halts execution before the first verb in the paragraph. In this case, the first verb is the highlighted MOVE command below the comment lines. Halting execution at this point in the program lets you see the contents of a variable length record before the demo program changes its length.

    Execution of the highlighted MOVE statement changes the length of the 01‑level record VARIABLE‑LENGTH‑RECORD. Its definition tells us why.

  3. Type L variable‑length‑record into the command line, and press Enter.

    CA InterTest for CICS V9.1 - PROTSYM FILE UNCOND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ VAR-REC-LEN | +00100. ---------+--------------------------------------------------------------------- 000687**** THIS SECTION OF THE DEMO SHOWS HOW YOU **** 000688**** CAN LOOK AT VARIABLE LENGTH DATA ********** U ==> MOVE +48 TO VAR-REC-LEN. _ 000690 GO TO SEND-MAP00. _ 000691 REPLACE-FILE. . . .

    CA InterTest for CICS finds the definition of VARIABLE‑LENGTH‑RECORD in Working‑Storage and displays that portion of the compile listing.

    CA InterTest for CICS V9.1 - PROTSYM FILE UNCOND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ VAR-REC-LEN | +00100. ---------+--------------------------------------------------------------------- _ 000097 OCCURS 5 TIMES _ 000098 INDEXED BY DISTRICT-X. _ 000099 01 VARIABLE-LENGTH-RECORD. _ 000100 03 VAR-REC-LEN PIC S9(4) COMP. _ 000101 03 VAR-LENGTH-DATA PIC X _ 000102 OCCURS 1 TO 100 TIMES _ 000103 DEPENDING ON VAR-REC-LEN. _ 000104 COPY DFHAID.

    The definition of VARIABLE‑LENGTH‑RECORD shows two fields: VAR‑REC‑LEN and VAR‑LENGTH‑DATA. Note that the length of VAR‑LENGTH‑DATA depends on the value of VAR‑REC‑LEN.

    Now we will look at the current contents of VARIABLE‑LENGTH‑RECORD. You can do this directly from the Working‑Storage listing.

  4. Tab to the line containing VARIABLE‑LENGTH‑RECORD.
  5. Type d (for display), and press Enter.

    CA InterTest for CICS V9.1 - PROTSYM FILE UNCOND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------ _____ VAR-REC-LEN | +00100. ---------+-------------------------------------------------------------------- _ 000097 OCCURS 5 TIMES _ 000098 INDEXED BY DISTRICT-X. d 000099 01 VARIABLE-LENGTH-RECORD. _ 000100 03 VAR-REC-LEN PIC S9(4) COMP. _ 000101 03 VAR-LENGTH-DATA PIC X _ 000102 OCCURS 1 TO 100 TIMES _ 000103 DEPENDING ON VAR-REC-LEN. _ 000104 COPY DFHAID. . . .

    CA InterTest for CICS displays the contents of VARIABLE‑LENGTH‑RECORD in a structured format.

    CA InterTest for CICS V9.1 - MAIN STORAGE UTILITY - Termid = U031 Starting at Address =2080A6F0 Structure Display Format 01 VARIABLE-LENGTH-RECORD | | 02 VAR-REC-LEN | +00100. | 02 VAR-LENGTH-DATA | + | ------------------------------------------------------------------------------ PF1 Help 2 3 End 4 Return 5 6 Dump PF7 Backward 8 Forward 9 Caps Off 10 11 Redisplay 12 Structure CORE='000099:VARIABLE-LENGTH-RECORD' CAIN0467 AT LAST ENTRY IN STRUCTURE

    As you can see, the structured format gives only one occurrence of each field; it does not tell you the record length. To see the length of a 01‑level record, switch from the structured format to the dump format.

  6. Press Enter.

    CA InterTest for CICS displays the contents of VARIABLE‑LENGTH‑RECORD in a hexadecimal dump format.

    CA InterTest for CICS V9.1 - MAIN STORAGE UTILITY - Termid = U032 Offset Address Task + 0 00644E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ..++++++++++++++ * 2030A6F0 184 + 10 4E4E4E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ++++++++++++++++ * 2030A700 + 20 4E4E4E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ++++++++++++++++ * 2030A710 Page + 30 4E4E4E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ++++++++++++++++ * 2030A720 +000 + 40 4E4E4E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ++++++++++++++++ * 2030A730 + 50 4E4E4E4E 4E4E4E4E 4E4E4E4E 4E4E4E4E * ++++++++++++++++ * 2030A740 + 60 4E4E4E4E 4E4E * ++++++ * 2030A750 ------------------------------------------------------------------------------ PF1 Help 2 3 End 4 Return 5 6 Dump PF7 Backward 8 Forward 9 Caps Off 10 11 12 SDF CORE='000099:VARIABLE-LENGTH-RECORD'

    The dump format shows all occurrences of lower level fields and thus the 01‑level record length. This display shows that the record length is 64 hexadecimal (or 100 decimal) bytes. The first two bytes are the field VAR‑REC‑LEN, and the rest of the bytes are repeated occurrences of the field VAR‑LENGTH‑DATA.

    Now return to the breakpoint to continue execution

  7. Press Clear to return to Source Listing Breakpoint screen.

    Now you will execute one verb and then stop. This lets you see the contents of the record after the demo program changes its length.

  8. Press PF10.

    The demo program executes one verb (the MOVE statement, which moves 48 to VAR‑REC‑LEN). Then CA InterTest for CICS immediately stops the program and displays another breakpoint.

    Now the program is halted at the next statement, as shown next.

    CA InterTest for CICS V9.1 - PROTSYM FILE STEP BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= -------------------------------------------------------------------------------

    000688**** CAN LOOK AT VARIABLE LENGTH DATA ********** _ 000689 MOVE +48 TO VAR-REC-LEN. _ ==> GO TO SEND-MAP00. _ 000691 REPLACE-FILE. _ 000692 IF TASK-SWITCH3 EQUAL SPACE . .

  9. To display the contents of VARIABLE‑LENGTH‑RECORD from the Source Listing screen, you would have to find a line containing the field (such as the definition), type d, and press Enter. This is what you did the first time. Another method is to use a CORE menu:
  10. Press PF6.

    CA InterTest for CICS displays the Breakpoint Primary Option Menu.

  11. Select option 1 Main Menu.

    CA InterTest for CICS displays the Primary Option Menu.

  12. From the Primary Option Menu, select option 3 Main Storage.

    CA InterTest for CICS displays the Main Storage Menu.

  13. Select option 3 Breakpoint areas.

    CA InterTest for CICS displays a CORE menu for breakpoint‑related data.

    CA InterTest CORE COMMAND BUILDER ‑ BREAKPOINT‑RELATED AREAS (CORE=Bkpt) Specify area to be displayed, changed or moved: Task number: 00094 COBOL name: variable‑length‑record________ Special element: ________ (Enter highlighted keyword) SSCR Saved screen image BMSG Breakpoint message CMAR Commarea FCAR Facility cntl area EIB Exec interface block TUAR TCT user area BLLS COBOL BLL cells CWK COBOL working storage TGT COBOL TGT LCL COBOL local storage DSA COBOL DSA SCAN VALUE: _________________________________________ DATA FORMATS SCAN RANGE: ______ B to scan backwards: _ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ | P' ' = Packed | To VERIFY and/or CHANGE Data: | X' ' = Hex | Existing data: ______________________________________ | C' ' = Char | New data: ______________________________________ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ MOVE From ______________________________ To ______________________________ PF1 Help 2 3 End 4 Return 5 6 PF7 8 9 Complex 10 11 12

  14. Type variable‑length‑record in the COBOL name field, and press Enter.

    CA InterTest for CICS displays the modified contents of VARIABLE‑LENGTH‑ RECORD in structured format.

    CA InterTest for CICS V9.1 - MAIN STORAGE UTILITY - Termid = U031 Starting at Address =2080A6F0 Structure Display Format 01 VARIABLE-LENGTH-RECORD | | 02 VAR-REC-LEN | +00048. | 02 VAR-LENGTH-DATA | + | . . . ------------------------------------------------------------------------------ PF1 Help 2 3 End 4 Return 5 6 Dump PF7 Backward 8 Forward 9 Caps Off 10 11 Redisplay 12 Structure CORE(00050)='VARIABLE-LENGTH-RECORD' CAIN0467 AT LAST ENTRY IN STRUCTURE

  15. Press Enter to display the record in dump format.

    The record is now only 30 hexadecimal (or 48 decimal) bytes long because the variable field was reduced from a length of decimal 100 to decimal 48 when the program moved 48 to VAR‑REC‑LEN.

  16. Press Clear.

    CA InterTest for CICS displays the Main Storage Menu.

  17. Press PF4 until the Source Listing Breakpoint screen displays.
  18. Press PF5.

    The demo program resumes execution and displays the Options Menu.