Guest.Visitor
Hi Danny, I will answer your second question first, about how the QUsPtrUs API works (you call it using all caps; but I like to mix cases for readability). Here is the relevant information from the IBM "OS/400 System API Reference" manual: The "Retrieve Pointer to User Space" (QUSPTRUS) API retrieves a pointer to the contents of a user-domain user space. The data in that user space then can be directly manipulated by high-level language programs that support pointers, such as C or COBOL. [and now, RPG!> The QUSPTRUS API will not return a pointer to a system-domain user space; you must use system APIs to access system-domain user spaces. If you attempt to retrieve the pointer to a system domain user space, an error will be returned. Thus saith IBM. Don\'t worry about the system domain spaces; any User Space created by the // DspRcdFmt tool will be in the user domain! There are just two parms to pass to the QUsPtrUs API, the twenty-byte fully qualifed User Space name (Name + Library, both left adjusted), and the Pointer return variable. The API returns a pointer to the space, assuming that it exists. Armed with the pointer, you can then read the Space directly, no call to QUsRtvUs is needed (that is, with ILE RPG or another language that supports pointers). About your first question: After playing with // DspRcdFmt all weekend, I am sure that there is no problem with the IBM QUsRtvUs API. The magic is in using the right offsets. More about this later!
Please login to make comments.
User Rating: / 0
PoorBest 

   MC-STORE.COM