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


  • Subject: Antwort: Re: RPGIV - Pointer Parameter API QwpzHostPrintTransform
  • From: bmorris@xxxxxxxxxx
  • Date: Wed, 14 Mar 2001 10:31:59 -0500
  • Importance: Normal


>Date: Wed, 14 Mar 2001 11:11:43 +0100
>From: B.Quindt@zapf-bayreuth.de
>
>thank you, passing the fields with the correct type by reference worked
>fine,
>the only problem is. If the transformed data buffer returned from the API
>is greater than
>32767 Byte we get an CPF6DF9 - Buffer too small.....
>
>Has anybody a idea to handle this problem ?

The limit for character fields is 65535, not 32767, but that might
also be too small.

For that parameter, you might want to switch back to passing a pointer
by value.  Instead of declaring a field for the buffer, use ALLOC to
allocate data large enough for the buffer.

To handle the buffer data, you would use a based 65535A field and
gradually walk its basing pointer through the data.

D bufP           S            *
D workP          S            *
D workVar        S       65535A    based(bufP)
D totalHandled   S          10I 0

C         alloc       buflen       bufP
C         callp       ...

C         eval        totalHandled = 0
C         eval        lenHandled = 0
C         dow         lenHandled < returnedLen
C         eval        workP = bufP + totalHandled
C          ... handle some data in workVar
C         eval        totalHandled = totalHandled + whatever
C         enddo

C         dealloc                  bufP

Barbara Morris


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.