Thank you.
I have System Debugger open
On the Locals tab I see messages:
Attempting connection
Connected successfully
Waiting for debug server connection
Accepted connection from debug server
Ok, methinks
Alas, Command eval myproc.myvar returns: Identifier does not exist ???
I had better luck in a prior session, but after re-write/re-compile I've got lost,
although clicking >Resume< steps through code until: Program . . . has run to completion ???
Maybe I failed to click >End Debug< in my first session ???
. . . Hmm, back to the manual.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Friday, August 29, 2014 1:54 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Debugging SQL - question re character variables

On 29-Aug-2014 12:23 -0500, Gary Thompson wrote:
On 29-Aug-2014 11:38 -0500, Gary Thompson wrote:
First time creating SQL Stored Procedure and using the Debugger as
described in Kent Milligan's pdf.
Thank you Kent!

First part of mysql definition is:

( IN out_loc CHARACTER (4)
, IN cto_num DECIMAL(13,0)
, IN bat_dat DECIMAL(7,0)

I called mysql from Run Sql Scripts with:

call testlib/mysql('82 ',8268773,1140627)

My question: why does the character variable show on the Console tab
MYSQL.OUT_LOC = SPP:0000800000000270

Decimal variables show like:
MYSQL.CTO_NUM = 0000008268773.
MYSQL.BAT_DAT = 1140627.

Hmm, reading further in Kent's pdf:

"the following EVAL command can be used to display . . . contents":
"EVAL *SP.z :S 5"
Must be a "C thing" ?

In the debugger command-line, type HELP and press Enter. Click on _EVAL_ then navigate to the _Expression_ help wherein can be found some help entitled _C/C++ language examples_ that should be helpful in that regard; given the SET OPTION DBGVIEW=*LIST produces a C program listing, that form of the EVAL is indeed a "C thing" that must be dealt with.
The asterisk asks to /de-reference/ [I think that is the correct terminology] the variable which is a pointer to the storage that addresses the first character of a null-terminated string.

Apparently there have been some improvements to SQL routine debug capabilities that should enable avoiding that somewhat frustrating experience for someone unfamiliar with the language trying to debug C [strings; and C-code generally]. I seem to recall the enhancements that allow debugging the SQL routine [as SQL code], had appeared in a "what's new" document somewhere.

Regards, Chuck
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page