× 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.



FYI - When using debug over a CLLE program, or running DMPCLPGM within that program, variables that are *DEFINED over a *BASED variable might not be reported correctly. The VALUES are correct, just not reported rightly. They seem to report the same value as whatever is at position one of the *BASED variable over which they are *DEFINED.

This is being fixed in V6R1 - APAR SE39126 - it will not be fixed in V5R4. The workaround is to compile the program as CLP - then it all works.

I hadn't thought of it, but it might be interesting that the new *PTR stuff and subroutines work in CLP as well as CLLE - a fellow I was working with was surprised at this.

Here is the code that fails - to see what happens in STRDBG (or the Integrated WDSC Debugger or the Graphical Debugger), put a breakpoint on the line with DMPCLPGM and look at the variable just set with CHGVAR.

Vern

/***********************************************************************/
/* Author: Vernon M. Hamberg */
/* Date written: 02/05/2010 */
/* Purpose: Test *DEFINED over *BASED variables */
/***********************************************************************/
PGM

/* Output structure */
DCL VAR(&OUTPUT) TYPE(*CHAR) LEN(2512)

/* Variables for each entry */
DCL VAR(&PENTRY) TYPE(*PTR)
DCL VAR(&ENTRY) TYPE(*CHAR) STG(*BASED) +
LEN(500) BASPTR(&PENTRY)
DCL VAR(&FSTYPE) TYPE(*UINT) STG(*DEFINED) +
LEN(4) DEFVAR(&ENTRY 13)
DCL VAR(&ENTLEN) TYPE(*UINT) STG(*DEFINED) +
LEN(4) DEFVAR(&ENTRY 1)
DCL VAR(&MFSNAMOFS) TYPE(*UINT) STG(*DEFINED) +
LEN(4) DEFVAR(&ENTRY 33)
DCL VAR(&MFSNAMLEN) TYPE(*UINT) STG(*DEFINED) +
LEN(4) DEFVAR(&ENTRY 37)

/* Set pointer to first entry */
CHGVAR VAR(&PENTRY) VALUE(%ADDRESS(&OUTPUT))
CHGVAR VAR(%OFFSET(&PENTRY)) VALUE(%OFFSET(&PENTRY) +
+ 12)
CHGVAR VAR(&FSTYPE) VALUE(32)
CHGVAR VAR(&ENTLEN) VALUE(261)
CHGVAR VAR(&MFSNAMOFS) VALUE(63)
CHGVAR VAR(&MFSNAMLEN) VALUE(21)
DMPCLPGM

ENDPGM:
ENDPGM

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.