Previous Topic: Halt a Program after an SQL RequestNext Topic: SQL Return Codes


Inspect Host Variables

When you are stopped at a breakpoint, inspect the values of data fields. SQL terminology refers to the fields used in SQL requests as host variables. Host variables are used to do the following tasks:

A typical SQL request has the following format:

EXEC SQL
	SELECT	column names
	INTO	host variables
	FROM	table name
	WHERE	column names/host variables
END‑EXEC

Example:

In a typical COBOL program:

Notes:

Display Host Variables

You can view host variables either individually by name or as a single structure. The following screen shows how CA InterTest for CICS displays host variables. The chapter "Breakpoint Activities" explains how to display the values of host variables.

   CA InterTest for CICS V9.1 - MAIN STORAGE UTILITY  Termid = LXD6   Starting at Address =  140D9C                Hexadecimal            Character      01 DCLEMP                           |                             |   02 EMPNO                           |  F0F0F0F0 F1F0              | 000010    02 FIRSTNME                        |                             |    03 FIRSTNMELEN                    |  0009                       | ..     03 FIRSTNMETEXT                   |  C3C8D9C9 E2E3C9D5 C5000000 | CHRISTINE..   02 MIDINIT                         |  C1                         | A    02 LASTNAME                        |                             |    03 LASTNAMELEN                    |  0004                       | ..     03 LASTNAMETEXT                   |  C8C1C1E2 00000000 00000000 | HAAS.......                                      |  000000                     | ...   02 WORKDEPT                        |  C1F0F0                     | A00    02 PHONENO                         |  F3F9F7F8                   | 3978   02 HIREDATE                        |  F1F9F6F5 60F0F160 F0F1     | 19650101    02 JOB                             |  D7D9C5E2 40404040          | PRES    02 EDLEVEL                         |  0012                       | ..    02 SEX                             |  C6                         | F       PF1 Help       2            3 End        4 Return     5            6             PF7 Backward   8 Forward    9 Caps Off  10           11 Redisplay 12 Structure   CORE='DCLEMP' 

For DB2 Users

If you use the DCLGEN function to generate DB2 table declarations, the COBOL 01-level field name is a concatenation of the characters DCL and the table name, as shown in the previous example.