|
Hi, Euh... isn't pMem = %Alloc(4000000); ... a bit easier ? Kind regards, Paul -----Original Message----- From: bill.reger@convergys.com [mailto:bill.reger@convergys.com] Sent: 24 April, 2002 16:40 To: rpg400-l@midrange.com Subject: Big API Receiver Variables (was Re: QtocRtvNetCnnDta) There is another technique for handling these big Receiver Variables that was suggested to me by Craig Rutledge. And that is to receive them into a User Space. Though not documented anywhere that I can see, this lets you receive up to 16Meg of Receiver Variable data, more than enough for most anything! Let me give you the basics using QDBRTVFD API with format FILD0200: 1. Define a Data Structure and base it on a pointer: D RcvVarDS DS 145 based(RcvVarDSPtr) D BytesRtnd 1 4b 0 D BytesAvail 5 8b 0 D NumOfFlds 144 145b 0 2. Use the QUSCRTUS API to create a user space: C CallP quscrtus(UsrSpace : C 'QDBRTVFD ' : C 4000000 : C x'00' : C '*ALL' : C 'Field Info.' : C '*YES' : C APIerror 3. Use the QUSPTRUS API to get the address of the user space into the same based pointer: C CallP qusptrus(UsrSpace : C RcvVarDSPtr : C APIerror) 4. Call your API that has the big Receiver Variable and reference your Data Structure name (with the same length as the size of the user space): C CallP qdbrtvfd(RcvVarDS : C 4000000 : C RtnFilQual : C 'FILD0200' : C FileName : C RcdFmt : C '0' : C '*FILETYPE ' : C '*EXT ' : C APIerror) Voila! You have received the Receiver Variable data into your user space. Bill -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ==============================================================================
As an Amazon Associate we earn from qualifying purchases.
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.