Preparing Natural for Attached Debugging


Introduction

This document provides information on activating the debug attach server (DAS) to debug an external Natural application with NaturalONE.

An external application runs in a Natural environment but stores its sources in a NaturalONE project. The DAS is used to access a NaturalONE project.

For more information on using the DAS, refer to the NaturalONE documentation.

Prerequisites for Attached Debugging

The following prerequisites must be met to access the NaturalONE debugger from a mainframe Natural session:

  • The Natural session runs in a z/OS, z/VSE or BS2000 environment.

  • NaturalONE is installed.

  • Natural Development Server is installed and the version installed must support attached debugging.

  • Module NATADvrs (or NCIADvrs for a CICS session on z/OS) is generated from the Natural Developmet Server library and can be accessed for the Natural session.

  • The profile parameter DBGAT is specified, see DBGAT.

  • The profile parameter RCA is set to NATATDBG.

  • The profile parameter RCALIAS is set to (NATATDBG,NATADvrs), for CICS on z/OS to (NATATDBG,NCIADvrs).

  • The DAS is running and can be addressed through TCP/IP. The DAS is shipped with NaturalONE as NATDAS.EXE file.

For more information on RCA and RCALIAS, refer to the Parameter Reference documentation.

Example for z/OS Batch

A Natural batch application is to be debugged with NaturalONE. The DAS server is available under the TCP/IP name DASSERV and listens to port 50882. The NaturalONE debugger has identified itself to the DAS with client ID FRED. The attached debug interface resides in DSN NDV823.LOAD:

//NATBAT  EXEC PGM=NATBAT82
//STEPLIB DD   DISP=SHR,DSN=NAT823.LOAD
//        DD   DISP=SHR,DSN=NDV823.LOAD
//CMPRMIN DD   *
RCA=NATATDBG,RCALIAS=(NATATDBG,NATAD823)
DBGAT=(ACTIVE=ON,HOST=DASSERV,PORT=50882,CLID=FRED)
/*

Example for z/VSE Batch

A Natural batch application is to be debugged with NaturalONE. The DAS server is available under the TCP/IP name DASSERV and listens to port 50882. The NaturalONE debugger has identified itself to the DAS with client ID FRED. The attached debug interface resides in the library PRD.NAT823.LIBRARY:

// DLBL NAT823,'PRD.NAT823.LIBRARY'
// LIBDEF PHASE,SEARCH=(NAT823.NAT823,NAT823.NDV823,...)
// EXEC  NATBAT82,SIZE=(NATBAT82,120K),PARM='SYSRDR'
RCA=NATATDBG,RCALIAS=(NATATDBG,NATAD823)
DBGAT=(ACTIVE=ON,HOST=DASSERV,PORT=50882,CLID=FRED)
/*

Example for BS2000

A Natural batch application is to be debugged with NaturalONE. The DAS server is available under the TCP/IP name DASSERV and listens to port 50882. The NaturalONE debugger has identified itself to the DAS with client ID FRED. The attached debug interface resides in the library NDV833.MOD.

/LOGON                          
/SYSFILE SYSOUT=ATDEBUG.OUT     
/SYSFILE SYSLST=ATDEBUG.LST     
/FILE ADAPARM,DDLNKPAR          
/FILE NAT826.MOD,LINK=BLSLIB01  
/FILE NDV833.MOD,LINK=BLSLIB02  
/FILE CMPRMIN.RMDBG,LINK=CMPRMIN
/FILE DBGTRACE.NATBATCH,LINK=DBGTRACE
/START-EXE-PROG F-F=*LI-E(L=NAT826.MOD,EL=NATBAT82,TYPE=L)
...

The CMPRMIN.RMDBG dynamic parameter file contains the following Natural parameter settings:

RCA=NATATDBG,RCALIAS=(NATATDBG,NATAD833),
DBGAT=(ACTIVE=ON,CLID=FRED,HOST=DASSERV,PORT=50882)