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



Well:
Thanks to all of you for your suggestions.  I have made a reasonable amount
of progress today.  I have written a program to read my EDI data from my PF
and load it into my user space, using the DMPOBJ command to verify the data
is there.  Next I have attempted to write an ILE RPG program to use the
QUSPTRUS API to retrieve the pointer and pass it along to the MQ API.  I am
very close.  I kept getting an error that the buffer length was invalid as I
was writing to the MQ queue.  So I manually calculated the buffer length (in
my case it was 3600) and temp hard coded the value into program.  Well, that
worked.... Sort of.  If wrote my 3600 byte record into the MQ queue, so that
is EXACLTY what I am after.  However, about the first 144 characters of the
message are not there.  I suspect my data structure that I am using is not
correct:  As I put the program into debug, I could see that several fields
in the data structure had the missing data that I was expecting to end up in
my MQ message.

Here is the data structure:

 D p_UsrSpc        S               *                    
 D dsLH            DS                   BASED(p_UsrSpc) 
 D   dsLHFill1                  103A                    
 D   dsLHStatus                   1A                    
 D   dsLHFill2                   12A                    
 D   dsLHHdrOff                  10I 0                  
 D   dsLHHdrSiz                  10I 0                  
 D   dsLHLstOff                  10I 0                  
 D   dsLHLstSiz                  10I 0                  
 D   dsLHEntCnt                  10I 0                  
 D   dsLHEntSiz                  10I 0                  

For some strange reason, dsLHFill1 contains the 1st 103 characters of my
data.  I am passing the value of dsLHLstOff as the pointer to my buffer
data.  This program is using a 3.7 ILE compiler.  I know I am close, but
unsure what to do next.  I thought the value of dsLHLstSiz would contain the
length of my user space, but it does not.  

Do the lengths of the fields in the API change from release to release?  I
was looking at the API definition from a 4.1 manual and it appears that the
lengths of some of the data structure fields are different.

Any help or suggestions would be appreciated.
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 





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.