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



>From: "Dan Bale" <dbale@samsa.com>
>Date: Fri, 9 Aug 2002 12:49:51 -0400
>
>We are trying to determine the parameters for OPM RPG program objects that
>we do not have source for.  We have forced a dump of the program by
>temporarily renaming a file that the program expects to be there, then
>calling the program, causing CPF4101, which allows a 'D' response.
>
>The dump shows:
>
>RPG/400 FORMATTED DUMP
>NAME     OFFSET  ATTRIBUTES    VALUE
>WP0001   01031B  CHAR(3)       '111'
>WP0001.P 011BE0  POINTER(SPP)
>                 SPACE OFFSET  66331                   '0001031B'X
>                 OBJECT        QPADEV0001DBALE     550049
>WP0002   01031E  CHAR(3)       '222'
>WP0002.P 011BF0  POINTER(SPP)
>                 SPACE OFFSET  66334                   '0001031E'X
>                 OBJECT        QPADEV0001DBALE     550049
>WP0003           NOT ADDRESSABLE
>WP0003.P         NOT ADDRESSABLE
>
>Some investigation with other programs that we do have source for seem to
>indicate that the '.P' appended to a field name seems to indicate that it
is
>a program's *ENTRY parameter.  WP0003, as shown here, seems to be a
>parameter that had no value passed.  (So, I called the program again with
a
>3rd parameter value specified, and dump for WP0003 showed similar
>information to the first two fields.)  Also, the SPACE OFFSET would seem
to
>indicate the position of the parameters.
> ...

Dan, I'm not sure you can get the order of the parameters from this
dump.  I think the offsets reflect the location of parameters in the
calling program.  You must be passing parameters in order.  I just
ran a little experiment with the following two programs.  I named
the parameters in reverse alphabetical order in the called program,
and in the calling program, I passed parameters that were
a) in order, b) out of order, c) the same.

 * ####JUNK
H        1
C           *ENTRY    PLIST
C                     PARM           PARM1  10
C                     PARM           PARM2  10
C                     DUMP
C                     SETON                     LR

 * ####JUNK2
I            DS
I                                        1  10 P1
I                                       11  20 P2
C                     CALL '####JUNK'
C                     PARM 'P1 FIRST'P1
C                     PARM 'P1 FIRST'P2
C                     CALL '####JUNK'
C                     PARM 'P2 FIRST'P2
C                     PARM 'P2 FIRST'P1
C                     CALL '####JUNK'
C                     PARM 'SAME'    P1
C                     PARM 'SAME'    P1
C                     SETON                     LR

---- Dump 1:
PARMA2   0398FC  CHAR(10)      'P1 FIRST  '
PARMA2.P 039D90  POINTER(SPP)
                 SPACE OFFSET  235772
                 OBJECT        QPADEV000WBMORRIS   020543
PARMB1   0398F2  CHAR(10)      'P1 FIRST  '
PARMB1.P 039D80  POINTER(SPP)
                 SPACE OFFSET  235762
                 OBJECT        QPADEV000WBMORRIS   020543

---- Dump 2:
PARMA2   0398F2  CHAR(10)      'P2 FIRST  '
PARMA2.P 039D80  POINTER(SPP)
                 SPACE OFFSET  235762
                 OBJECT        QPADEV000WBMORRIS   020543
PARMB1   0398FC  CHAR(10)      'P2 FIRST  '
PARMB1.P 039D90  POINTER(SPP)
                 SPACE OFFSET  235772
                 OBJECT        QPADEV000WBMORRIS   020543

---- Dump 3:
PARMA2   0398F2  CHAR(10)      'SAME      '
PARMA2.P 039D80  POINTER(SPP)
                 SPACE OFFSET  235762
                 OBJECT        QPADEV000WBMORRIS   020543
PARMB1   0398F2  CHAR(10)      'SAME      '
PARMB1.P 039D80  POINTER(SPP)
                 SPACE OFFSET  235762
                 OBJECT        QPADEV000WBMORRIS   020543

Barbara Morris



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.