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



Scott,

Good observation, and the answer really depends on what RCRTUS does
and how many entries are returned by the List API.

If it simply creates the *USRSPC with an initial value of x'00' then
the list API will automatically extend the *USRSPC and the extents
will be populated with x'00'.  It the list API then happens to just fill
the last page of the *USRSPC and the RPG application then tries to
access the "last record + 1", then a CPD3C14 and CPF3C06 will occur.
If the List API does leave at least 10 bytes "unused" in the last page
of the *USRSPC, then the application program will work (this time).

If, on the other hand, RCRTUS creates the *USRSPC and then uses QUSCUSAT
to set auto-extend on, then the application would not get the errors
and would get x'00's for the new extension (trying to read a *USRSPC
location that doesn't exist will automatically extend the *USRSPC if
automatic extendability is on).  This assumes of course that the call
to QUSCSUAT doesn't also change the initial value to a non-x'00' value,
and that the list doesn't fill up the 16MB *USRSPC (in which case the
application would again walk off the deep end).

Bruce Vining

>
>Hi Bruce...
>
>I agree wholeheartedly with your statements in #2 & #3 (quoted below),
>but have some questions about #1.
>
>You say that he should look for *LOVAL instead of *BLANKS (other
>people have also suggested *ALLx'00', as well)  But, what happens
>if the user space was created with, say, only 1 byte?  Then extended
>by the QUSLMBR API?  What will be at the end, then?   Or what happens
>if the data returned by the API fills up all of the available area
>in the *USRSPC.  Wouldnt his call to QUSRTVUS then fail, causing
>the program to never complete normally?
>
>It seems to me (after considering it further) that not only are you
>100% right in your "Point #2" below, (a point which I also tried to
>make in my earlier message, as well) but it seems to be the ONLY
>reliable method of doing this. :)
>
>I guess the purpose of this message is just to emphasize that :)
>
>Scott Klement
>Information Systems Manager
>Klement's Sausage Co, Inc.
>

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.