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



The receiver variable has much more information in it than just the
returned program variable value.  Try this instead:

d* allocate much larger receiver variable
d rtnval         ds         1000
d* define returned length of variable value (see API documentation for lots
of other things returned)
d   VarLen              37    40i 0
d* define standalone field for variable value
d Value           s             10

and then after the API call:

c* get the variable value
c                     eval      Value = %subst(rtnval:253:VarLen)

For ILE program debug you may want to look at the Submit Debug Command API.

Bruce




                      dcolford@pathix.c
                      om                       To:       <mi400@midrange.com>
                      Sent by:                 cc:
                      mi400-admin@midra        Subject:  [MI400] API QTERTVPV - 
retrieve OPM pgm variable in debug
                      nge.com


                      06/28/2002 04:44
                      AM
                      Please respond to
                      mi400





Hi. I am trying to set up a simple debug error handler and am using API
QTERTVPV and am having problems getting it working 100%. The code below
runs as errcode = blanks after the procedure, but the value of RTNVAL
should be the current library and it is all reverse image blanks... Does
anyone have a fix.. Is it a problem with my receivervar/lengthofrec
definition...

Also is there a hidden ILE retrieve pgm var API that I can use.. I see one
for all variables, but for what I need in this simple error handler that is
overkill. I have looked on all search engines and no one is using this API

Thanks in advance
Dave



     Drtv              pr                  extpgm('QTERTVPV')
     d Receivervar                32767A   options(*varsize)
     d LengthofRec                   10i 0 const
     d Programvar                   132    const
     d Basingpoint                  660    const
     d Startingpos                   10i 0 const
     d Lengthofstr                   10i 0 const
     d Outputform                    10    const
     d Program                       10    const
     d Recursionlvl                  10i 0 const
     D errorcode                           like(errCode)

     D errCode         ds
     D   prov                        10i 0 inz(%size(errCode))
     D   avail                       10i 0
     D   excid                        7a

     d rtnval          ds            10
     c                   callp     rtv(
     c                                           rtnval :
     c                                       %size(rtnval) :
     c                             '&CURLIB' :
     c                             ' ' :
     c                             1   :
     c                             0   :
     c                             '*CHAR'  :
     c                             'XXXXXXXXXX'  :
     c                             0         :
     c                                           Errcode )
     c
     c                   move      *on           *inlr



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








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.