Re: MI program unable to locate job - need assistance

Simon Coulter <shc-Q/[email protected]> Tue, 20 May 2008 17:13:20 +1000
Newsgroups gmane.comp.lang.as400.mi
Message-ID <[email protected]>
On 20/05/2008, at 4:43 PM, Paul Jackson wrote:

> how do set up the debuggable identifiers?

Rename all the variables that start with a period. Really dumb idea-- 
even though your code only uses the period in basing pointers. The MI  
compiler (CRTPG instruction actually) allows the caller to specify a  
character for which all variables that start with that character will  
not be added to the symbol table therefore can't be referenced by  
debug. The QPRCRTPG API sets that value to "." hence the admonition  
in the API documentation that "Symbols that begin with a period (.)  
are not inserted into the program's symbol table and may not be  
referred to by the i5/OS debug function."

Easiest fix is to simply replace the period in variable names and  
recompile. You can't just remove it because you'll get collisions on  
variable names. I would just do a global search and replace of . with  
@ (this will change branch-point names too which is undesirable but  
not problematic.

> Also I couldn't figure out how to display the value of a pointer  
> (at least using dsppgmvar)


Just display the pointer variable name. For example, given the  
pointer declaration:
	     DCL SYSPTR @WCBT00 DEF(OWN-PCO) POS(433);
then:
	dsppgmvar @WCBT00

will show:
	Variable  . . . . . . . . . . . . . . . : @WCBT00
	  Pointer type  . . . . . . . . . . . . :   SYP
	  Authority . . . . . . . . . . . . . . :   0011111100010000
	  Object  . . . . . . . . . . . . . . . :   QWCBT00
	    Library . . . . . . . . . . . . . . :     QSYS
	  Object type . . . . . . . . . . . . . :   *WCBT


Regards,
Simon Coulter.
--------------------------------------------------------------------
    FlyByNight Software         OS/400, i5/OS Technical Specialists

    http://www.flybynight.com.au/
    Phone: +61 2 6657 8251   Mobile: +61 0411 091 400        /"\
    Fax:   +61 2 6657 8251                                   \ /
                                                              X
                  ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.