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



Looks interesting.
Does it matter what the variable is named? Is it actually called
"stuff" in your original code or is that just an example name?

The reason I say that is because I had an issue with fields named
"qual". They would not work with the debugger.
To view them I had to use the %var(qual) built-in function in the
debugger.  e.g.:

   eval  %var(stuff)

-Bob Cozzi

On Tue, 10 Jun 2003 17:19:16 -0500, Rich Duzenbury wrote:

> 
>    I'm having trouble debugging a program that passes a data
> structure into a
>    function.  I've managed to create a small bit of sample code
that
> fails on
>    a V5R2 machine.  Anyone know what the problem may be?
> 
>    Here is the code:
> 
>    H dftactgrp(*no)                                               
 
>         
>                                                                   
 
>         
>     * Declare a stuff template.  Shouldn't use memory because it's
> based     
>     * Right???                                                    
 
>         
>    Dstuff_t          ds                  based(@)                 
 
>         
>    D  alpha                        20                             
 
>         
>    D  unsigned                     10i 0                          
 
>         
>                                                                   
 
>         
>     * Declare an 'instance' of the stuff template.  This one
should 
>         
>     * allocate static storage                                     
 
>         
>    D mystuff         ds                  likeds(stuff_t)          
 
>         
>    D rc              s               n                            
 
>         
>                                                                   
 
>         
>    D test            pr              n                            
 
>         
>    D  stuff                              likeds(stuff_t)          
 
>         
>     /free                                                         
 
>         
>         rc = test(mystuff);                                       
 
>         
>         eval *inlr = *on;     // Breakpoint 1 here
>     /end-free                                                     
 
>         
>                                                                   
 
>        
>   
>
**************************************************************************
>    * Run a test...                                                
 
>        
>   
>
**************************************************************************
>                                                                   
 
>        
>     test            b                                             
 
>        
>     test            pi              n                             
 
>        
>      stuff                              likeds(stuff_t)           
 
>        
>                                                                   
 
>        
>     result          s               n                             
 
>        
>    /free                                                          
 
>        
>       stuff.alpha = 'Hello, World';                               
 
>        
>       stuff.unsigned = 1;                                         
 
>        
>       return *on;   // Breakpoint 2 here
>    /end-free                                                      
 
>        
>     test            e                                             
 
>        
> 
>    I've compiled the code as DBGVIEW(*LIST) and added breakpoints
as
>    indicated in the code.
> 
>    The problem is that at breakpoint number 2, I can't review the
> 'stuff'
>    data structure as I receive CPF7E12 'Identifier does not exist',
> as
>    follows:
> 
>    EVAL stuff                             
>    Identifier does not exist.             
> 
>    Of course, I can review 'mystuff' with no difficulty:
> 
>    EVAL mystuff                           
>    MYSTUFF.ALPHA = 'Hello, World        ' 
>    MYSTUFF.UNSIGNED = 1                   
>                                           
>    In my opinion, 'stuff' should be in the symbol template of the
> program.  I
>    should not have to find the caller of the function to inspect
it's
>    variables, right?
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.