You could use QUSPTRUS to retrive a pointer to the user space itself, or
you could define a (big) variable in your program and use QUSRTVUS to get
the actual user space contents. If you used the latter, you could have a
pointer based on the (big) variable, and pass that to MQPUT.

Here's an MQPUT...

C                   CallP     MQPut(HConn   :
C                                   HOutObj :
C                                   MQMd    :
C                                   MQPmo   :
C                                   BufLen  :
C                                   BufPtr  :
C                                   CCode   :
C                                   Reason)  

Where BufPtr is a pointer to the buffer containing the stuff you want to
send.


On Mon, 22 Mar 2004 10:57:59 -0500, "Carl Galgano"
<cgalgano2@xxxxxxxxxxxxxxxxx> said:
> Eric, Keith, Colin, jt, James, Scott, et al.
> Thanks for all the great suggestions.  You guys are great.  I think I am
> going to attempt to use a user space.  How do you pass the pointer to a
> user
> space to the MQPUT?  There is an API to call to do the MQPUT, but I don't
> know how to pass the pointer.  Anyone have an example.  I am going to do
> a
> little more research in the archives.
> cjg
> 
> Carl J. Galgano
> EDI Consulting Services, Inc.
> 600 Kennesaw Avenue, Suite 400
> Marietta, GA  30060
> (770) 422-2995 - voice
> (419) 730-8212 - fax
> mailto:cgalgano@xxxxxxxxxxxxxxxxx
> http://www.ediconsulting.com
> AS400 EDI, Networking, E-Commerce and Communications Consulting and
> Implementation 
> http://www.icecreamovernight.com
> Premium Ice Cream Brands shipped Overnight
> 
> Visit our website to subscribe to our FREE AS/400 Timesharing Service
> 
> -----Original Message-----
> From: Colin Williams [mailto:colin.williams@xxxxxxxxxxxx] 
> Sent: Saturday, March 20, 2004 3:47 PM
> To: Midrange Systems Technical Discussion
> Subject: Re: Record size limitation in RPG - MQ Series
> 
> 
> Carl 
> 
> user spaces are actually pretty easy to use. 
> 
> Use the API QUSPTRUS, Retrieve User Space Pointer, in your RPG, to point
> a 
> 32K variable in your RPG to a user space.  Then when you update the 
> variable, you will be writing to the user space. 
> 
> When you fill up the variable, add 32k to the pointer, clear the variable 
> and do it again until you've processed the whole message. 
> 
> Pass the message length and the pointer to the user space to MQPUT, and
> your
> 
> away. Did the same thing 8 years ago, and im sure that was on V3R7 
> 
> cheers 
> Colin.W 
> 
> 
> ----- Original Message ----- 
> From: "Carl Galgano" <cgalgano2@xxxxxxxxxxxxxxxxx> 
> To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx> 
> Sent: Saturday, March 20, 2004 3:41 PM 
> Subject: RE: Record size limitation in RPG - MQ Series 
> 
> 
> 
> 
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
> list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> 
-- 
  
  michaelr_41@xxxxxxxxxxxxxx

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.