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



List,

I am using the Change User Space (QUSCHGUS) API to allow me to pass some data
between programs (max 65K, DataQueues are not an option)
The data is returned in the User Area of the General Header Section.
This is only 64 characters.  A field larger than that will over-write the Header
values following this field.

Is this normal behaviour ?  Am I missing something ?
I expected the data to be from the offset of data.

Oh, I did RTFM, Google and Midrange.com archive search before posting ...

Any help appreciated.
     
                   EVAL      US_GenLength = 140               
                   EVAL      US_StartPos = 1                  
* Retrieve values from the user space - Header record returned     
                   CALL      'QUSRTVUS'                            
                   PARM                    US_SpaceName            
                   PARM                    US_StartPos             
                   PARM                    US_GenLength            
                   PARM                    GHS_Header              
                   PARM                    EC_ErrorCode            
* Set data offset for User Space change                            
                   EVAL      US_StartPos   = GHS_OffsData + 1      
                   EVAL      US_LengthData = Fx - 1                
                   EVAL      US_Data = %subst(WRK_LargeFld:1:Fx-1) 
                   EVAL      US_FrcAuxStg  = *ZERO                 
* Make sure that any exception is returned to the program          
                   EVAL      EC_ErrorCode = *BLANKS                
                   EVAL      EC_BytesProv = 16                     
* Call the Change User Space API                        
                   CALL      'QUSCHGUS'                            
                   PARM                    US_SpaceName   
                   PARM                    US_StartPos    
                   PARM                    US_LengthData  
                   PARM                    US_Data        
                   PARM                    US_FrcAuxStg   
                   PARM                    EC_ErrorCode   

Regards,

Rick Renkema
iSeries Developer
Mid-Comp International Pty Ltd
Phone : +61 3 9011 8288
Fax : +61 3 9544 9631
Mobile : +61 (0)414 877 483
email : rickr@xxxxxxxxxxxxxx

"All great discoveries are made by mistake" 

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.