Debugging Batch Programs with the Trace Facility

You can use the CA IDMS trace facility to trace database calls in the following types of programs:
idmscu19
You can use the CA IDMS trace facility to trace database calls in the following types of programs:
  • Batch application programs that run either under the central version or in local mode
  • CA IDMS utilities, compilers, and reports
The trace facility writes one line to the SYSLST file for each call to the IDMS module. This line contains the following:
  • DML sequence number, if the DEBUG option was specified at compile time and mode is not DC-BATCH
  • Database key
  • Error status
  • DML verb number
  • DML verb name
  • Record, set, or area name (if applicable)
 
What You Can Do
 
You can use the CA IDMS trace facility to:
  • Help debug application programs
  • Analyze and tune database navigation
  • Analyze unfamiliar programs that have been assigned to you for maintenance
 
Activating the Trace Facility
 
To activate the trace facility, specify the SYSIDMS parameter DMLTRACE=ON. For example:
//SYSIDMS * DBNAME=TSTDICT DMLTRACE=ON . . .
This activates a trace of all DML calls made by the program.
 
Trace Facility Output
 
The following example shows CA IDMS trace facility output for a sample COBOL program:
Verb=59 BIND SUBSCHEMA-─►EMPSS01 DBNAME=EMPDB PROGRAM=CBDML04 Verb=59 BIND SUBSCHEMA-─►IDMSNWKL DBNAME=SYSTEM PROGRAM=RHDCRUAL Verb=37 READY Area Retrieval AREA─►DDLDCLOD Verb=54 ACCEPT Current of Run-Unit Verb=48 BIND Record REC-─►LOADHDR-156 ADDR=8502AF0C Verb=32 OBTAIN CALC REC-─►LOADHDR-156 I D M S SSCSTAT=0326 ERRREC=LOADHDR-156 ERRAREA=DDLDCLOD DBKEY=20113:0 Verb=02 FINISH Verb=59 BIND SUBSCHEMA-─►IDMSNWKL DBNAME=SYSTEM PROGRAM=RHDCRUAL Verb=37 READY Area Retrieval AREA─►DDLDCLOD Verb=54 ACCEPT Current of Run-Unit Verb=48 BIND Record REC-─►LOADHDR-156 ADDR=8505C520 Verb=32 OBTAIN CALC REC-─►LOADHDR-156 I D M S SSCSTAT=0326 ERRREC=LOADHDR-156 ERRAREA=DDLDCLOD DBKEY=20113:0 Verb=48 BIND Record REC-─►LOADHDR-156 ADDR=8505C520 Verb=32 OBTAIN CALC REC-─►LOADHDR-156 I D M S SSCSTAT=0326 ERRREC=LOADHDR-156 ERRAREA=DDLDCLOD DBKEY=20113:0 Verb=02 FINISH Verb=59 BIND SUBSCHEMA-─►IDMSSECU DBNAME=SYSUSER PROGRAM=RHDCRUAL Verb=37 READY Area Retrieval AREA─►DDLSEC Verb=54 ACCEPT Current of Run-Unit Verb=48 BIND Record REC-─►USER ADDR=8009390C Verb=32 OBTAIN CALC REC-─►USER I D M S SSCSTAT=0370 ERRAREA=DDLSEC DBKEY=8000006:0 Verb=02 FINISH Verb=59 BIND SUBSCHEMA-─►IDMSSECU DBNAME=SYSUSER PROGRAM=RHDCRUAL Verb=37 READY Area Retrieval AREA─►DDLSEC Verb=54 ACCEPT Current of Run-Unit Verb=48 BIND Record REC-─►PROFILE ADDR=85024810 Verb=48 BIND Record REC-─►ATTRIBUTE ADDR=85024810 Verb=32 OBTAIN CALC REC-─►PROFILE I D M S SSCSTAT=0370 ERRAREA=DDLSEC DBKEY=8000006:0 Verb=02 FINISH
 
Turning Trace On and Off
 
You can use the DML trace facility selectively by adding logic to the program itself. You can switch the trace facility on and off within the program by issuing a call to the IDMSIN01 entry point of the IDMS module.