[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Compile error RNF0351



Thanks for your help Scott.  I completely agree with your point about the
old system.  We are actually running on a 6.1 system, but it's a customer
whose system is running so far behind.  Hopefully this will be the tipping
point that finally encourages them to upgrade.

However, we really don't need XML support at all for what we are doing for
them.  I have no problem reading the XML data and parsing it myself if I
could simply get that data returned to me.  (As you can see in my
StartOfElement and EndOfElement procedures below, I'm simply building that
XML string again anyways.)  Are there any examples that do that?  I know
EXAMPLE4 throws the returned data into a stream file, but is there an
example that I have missed that just returns the data?

Thanks again,
Brian

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, April 27, 2010 7:12 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Compile error RNF0351

Hi Brian,

All of the XML parsing stuff in HTTPAPI requires V5R1 or later.  The 
entire XML interface is written in free-format RPG, and would take a lot 
of effort to convert to fixed-format.

The particular error you're receiving (RNF0351) is caused by a change 
IBM made to the %PADDR BIF in V5R1.  In V4R5 and older releases, %PADDR 
could only get the address of a module entry-point. (i.e. the name of an 
externalized procedure in a module.)  In V4R5 and earlier, you'd code it 
like this:

     %PADDR('MYEXPORTNAME')

where 'MYEXPORTNAME' is the case-sensitive export name, as reported by 
the following command:

    DSPMOD MODULE(LIBSCK/CHGSQLDATE) DETAIL(*EXPORT)

However, in V5R1 they changed it.  In V5R1 and later, you can specify 
either an export (as above, in quotes) or a prototype name.  If you 
specify a prototype name, the name is not case-sensitive, doesn't have 
to be exported, and references a prototype rather than an entry point.

EXAMPLE16 is using that V5R1 feature of referencing a prototype name. 
If that were the only problem preventing it from working on V4R5, I'd 
surely change the code to add the EXPORT keyword and reference the 
export name...   but since the entire HTTPXMLR4 module of HTTPAPI 
doesn't work prior to V5R1, this change would only be the tip of the 
iceberg.

It'd be much easier to write your own code that calls Expat directly 
than it would be to upgrade HTTPXMLR4 and EXAMPLE16 to work on V4R5.

However, if I were you, I'd give serious consideration to the fact that 
you're running a really old release.  V4R5 is 10 years old, and IBM 
dropped support for it 8 years ago.  You are likely to have a lot of 
problems going forward if you're trying to get modern code to work on a 
system that's an entire decade out of date.



On 4/27/2010 5:12 PM, Brian Bishop wrote:
>
>     I am receiving the following RNF0351 errors when trying to compile a
>     slightly modified version of the EXAMPLE16 program.  I have no
>     problems running this on a 6.1 machine, but I had to convert the code
>     from free-format to fixed-format when I tried to run the program on a
>     V4R5 machine and I can't seem to get it to compile.  I've looked in
>     the archives of this mailing list as well as google and haven't been
>     able to figure out the issue.  As you can see below, the code is not
>     complicated at all.  Thanks for your help.
>
>
>
>       1941 C                   Eval      rc =
>     http_url_post_xml('https://APIDemo.' +
>
>       1942 C
>     'IPCharge.net/IPCHAPI/RH.aspx'
>
>       1943 C                                  :
>     %addr(dataIn)
>
>       1944 C                                  :
>     %len(dataIn)
>
>       1945 C                                  :
>     %paddr(StartOfElement)
>
>     ======>
>     aaaaaaaaaaaaaa
>
>     *RNF0351 20 a      004100  Parameter STARTOFELEMENT for %PADDR is not
>     valid; %PADDR is
>
>                                ignored.
>
>       1946 C                                  :
>     %paddr(EndOfElement)
>
>     ======>
>     aaaaaaaaaaaa
>
>     *RNF0351 20 a      004200  Parameter ENDOFELEMENT for %PADDR is not
>     valid; %PADDR is
>
>
>     ignored.
>
>       1947 C                                  : *NULL
>     )
>
>
>
>
>     Here is the code for those procedures, which I also converted from
>     free-format to fixed-format:
>
>
>     P StartOfElement  B
>
>     D StartOfElement  PI
>
>     D   UserData                      *   value
>
>     D   depth                       10I 0 value
>
>     D   name                      1024A   varying const
>
>     D   path                     24576A   varying const
>
>     D   attrs                         *   dim(32767)
>
>     D                                     const options(*varsize)
>
>
>     C                   Eval      DataOut = %trim(DataOut) + '<' +
>
>     C                                       %trim(name) + '>'
>
>
>     P                 E
>
>
>
>     P EndOfElement
>     B
>
>     D EndOfElement
>     PI
>
>     D   UserData                      *
>     value
>
>     D   depth                       10I 0
>     value
>
>     D   name                      1024A   varying
>     const
>
>     D   path                     24576A   varying
>     const
>
>     D   value                    65535A   varying const
>
>     D   attrs                         *
>     dim(32767)
>
>     D                                     const
>     options(*varsize)
>
>
>
>     C                   Eval      DataOut = %trim(DataOut) + %trim(value)
>     +
>
>     C                                       '</' + name +
>     '>'
>
>
>
>     P                 E
>
>
>     Thanks,
>     Brian
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------