Natural Debugger in JCL

How to running the Natural Debugger in JCL batch?
I have setting the breakpoint and test mode is ON, but program not stoping. :shock:
pls help me…

Did you resolve your issue. I’m just getting started trying to get Natural Debugger to work in jcl batch environment. Can you provide any assistance? Debugger Online works great but just don’t have the documentation for setting up batch jcl.

From the on-line debugger, create and save an Environment. In your JCL, invoke the saved Environment.

//CMSYNIN   DD *                                                        
LOGON natlib                                                            

“L,envname” loads your debug environment
“batchpgm” is the program you’re debugging
“L” lists the break point

I haven’t used this sample for several years. I hope that it still works.

I’ve tried the code, and I have a question:

what is ,%K14?
The jcl always abended on “End of file after input…”

How can I fix it?


the %K14 issues a PF14; the commas skip input fields to position you at the 16th input field.

Try starting your Natural job with the dynamic parameter
(input mode Delimiter; other option is F for Form)

Since the example Ralph provided is a few years old, the number of fields being skipped with the commas may be more or less than it was originally. Bring up the menu online and count the number of fields, providing a comma to skip each one, until you reach the “command” area (actually, any alpha field will work if it is 5 or more characters to allow the “%K14” to be entered).


Thank You.


Can I display the data in my temporary storage (using batch)
memory or disks?


Natural Debugger looks at variables within Natural programs. If you have loaded your “temporary storage” or disk files into Natural variables, you can display the values of those variables.

It is fiddly since you have to figure out the menus and the number of commas to use to input values or %keys to those menus. If it is an option, it is usually easier to add WRITE/PRINT statements to your program (route them to a different printer number than your application printer).

Another option that I have used is to run the batch program from TSO online. Allocate the work files and print files as needed before starting Natural in TSO. You can then use the interactive debugger to step through the code. With ISPF split screen support in Natural, you can also swap out to view disk files at breakpoints.