HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
DBG> EXAMINE CHARCT TESTA\TESTB\CHARCT: 3.00 |
DBG> DEPOSIT CHARCT=15.95 |
DBG> EXAMINE CHARCT TESTA\TESTB\CHARCT: 15.95 |
DBG> DEPOSIT CHARCT=2890 %DEBUG-E-DECOVF, decimal overflow at or near DEPOSIT |
DBG> EXAMINE CHARCT TESTA\TESTB\CHARCT: 15.95 |
DBG> EXAMINE TEMP-CHAR(2) TEMP-CHAR of TESTA\TESTB\TEMP-WORD(2): "b" |
DBG> DEPOSIT TEMP-CHAR(2)="x" DBG> EXAMINE TEMP-CHAR(2) TEMP-CHAR of TESTA\TESTB\TEMP-WORD(2): "x" |
DBG> EXAMINE IN-WORD of TESTA-DATA IN-WORD OF TESTA\TESTA-DATA: "axc" |
DBG> DEPOSIT CHARCT=8.00 |
DBG> GO cba trace at TESTA\%LINE 15 15: PERFORM SHOW-IT. watch of DISP-COUNT of TESTA\TESTA-DATA at TESTA\%LINE 19+52 19: MOVE LET-CNT TO DISP-COUNT. old value = 0 new value = 3 break at TEST-A\%LINE 20 20: DISPLAY DISP-COUNT " CHARACTERS". |
DBG> SHOW CALLS module name routine name line rel PC abs PC *TESTA TESTA 22 00000120 00030120 00000080 000306C0 LIB$INITIALIZE 85739D00 8576A530 00000080 7FE61F30 |
DBG> GO 03 CHARACTERS %DEBUG-I-EXITSTATUS, is '%SYSTEM-S-NORMAL, normal successful completion' |
DBG> EXIT $ <> |
When you debug an HP COBOL program, the default module (which will be brought into the debugger) is the main module name. If your program consists of multiple separately compiled programs (SCPs), and was compiled with the /SEPARATE_COMPILATION qualifier (see Section 1.2.2.4 and Section B.4.2.8), each module that you wish to debug other than the main module must be identified to the debugger.
For example:
DBG> SET BREAK %LINE 43 |
In the previous example, the default module is the main module name. You can specify a different module in those cases where you use multiple separately compiled programs as follows:
DBG> SET BREAK modulename \ %LINE 43 |
In the preceding example, the default debug module becomes modulename. The same result can be obtained by using SET MODULE, as follows:
DBG> SET MODULE modulename DBG> SET BREAK %LINE 43 |
If modulename is a valid module, the default will be set to that module name and the debugger prompt will be returned. You can then set a breakpoint (or any other valid debugger action) in the new module source. If it is not a valid module, the system will advise you as follows:
DBG> SET MODULE invalidmodulename %DEBUG-E-NOSUCHMODU, module INVALIDMODULENAME is not in module chain |
The Language-Sensitive Editor (LSE) is a powerful and flexible text editor designed specifically for software development. The Source Code Analyzer (SCA) is an interactive tool for program analysis.
These products are closely integrated; generally, you can invoke SCA through LSE. LSE provides additional editing features that make SCA program analysis more efficient. In conjunction with the HP COBOL compiler, the two tools provide a set of new enhancements supporting source code design and review.
LSE also provides the following software development features:
SCA performs the following types of program analysis:
LSE and SCA together, in conjunction with compilers for supported languages, provide the following software design features:
HP COBOL supports the LSE and SCA program creation, analysis, and compilation features described in the preceding sections. HP COBOL on OpenVMS Alpha and OpenVMS I64 does not support the LSE Program Design Facility (PDF) design comments, pseudocode placeholders, or the /DESIGN qualifier.
The following sections provide entry, exit, and language-specific information on the combined use of LSE and SCA.
SCA stores data generated by the HP COBOL compiler in an SCA library. The data in an SCA library contains information about all symbols, modules, and files encountered during a specific compilation of the source. You must prepare this library before you enter LSE to invoke SCA by following these steps:
$ CREATE/DIRECTORY PROJ:[USER.LIB1] |
$ SCA CREATE LIBRARY [.LIB1] |
$ SCA SET LIBRARY [.EXISTING_SCA_LIBARAY] |
$ COBOL/ANALYSIS_DATA PG1,PG2,PG3 |
Previous | Next | Contents | Index |