× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gary

I am not sure, but Chuck may have been talking about the green-screen debugger - if you are using the G-S debugger, do what he says.

If you are in the graphical one,there are several options - I don't remember everything, but things like monitors can be set, or you can view what is in memory at the address (the pointer)

Good luck
Vern

On 8/29/2014 3:16 PM, Gary Thompson wrote:
Chuck,
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:

CREATE PROCEDURE test/mysql
( 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
like:
MYSQL.OUT_LOC = SPP:0000800000000270

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

Hmm, reading further in Kent's pdf:

DECLARE z CHAR(5)
"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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.