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 Development 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 NDVvrs.LOAD:

//NATBAT  EXEC PGM=NATBATvr
//STEPLIB DD   DISP=SHR,DSN=NATvrs.LOAD
//        DD   DISP=SHR,DSN=NDVvrs.LOAD
//CMPRMIN DD   *
RCA=NATATDBG,RCALIAS=(NATATDBG,NATADvrs)
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.NATvrs.LIBRARY:

// DLBL NATvrs,'PRD.NATvrs.LIBRARY'
// LIBDEF PHASE,SEARCH=(NATvrs.NATvrs,NATvrs.NDVvrs,...)
// EXEC  NATBATvr,SIZE=(NATBATvr,120K),PARM='SYSRDR'
RCA=NATATDBG,RCALIAS=(NATATDBG,NATADvrs)
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 NDVvrs.MOD.

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

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

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