30.06.2013 Views

Data Queue APIs--Categories - FTP Directory Listing - IBM

Data Queue APIs--Categories - FTP Directory Listing - IBM

Data Queue APIs--Categories - FTP Directory Listing - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Retrieve Pointer to User Space (QUSPTRUS) API<br />

Retrieve Pointer to User Space (QUSPTRUS) API<br />

Required Parameter Group:<br />

1 Qualified user space name Input Char(20)<br />

2 Return pointer Output PTR(SPP)<br />

Optional Parameter:<br />

3 Error code I/O Char(*)<br />

Threadsafe: Yes<br />

The Retrieve Pointer to User Space (QUSPTRUS) API retrieves a pointer to the contents of a user-domain<br />

user space. The data in that user space then can be directly manipulated by high-level language programs<br />

that support pointers, such as C or COBOL. The QUSPTRUS API will not return a pointer to a<br />

system-domain user space; you must use system <strong>APIs</strong> to access system-domain user spaces. If you attempt<br />

to retrieve the pointer to a system-domain user space, an error will be returned.<br />

The QUSPTRUS API even returns a pointer to an object that is subject to an exclusive (*EXCL) lock. If<br />

you create application programs using HLLs that can directly update user spaces using pointers (instead of<br />

using the Change User Space (QUSCHGUS) API), you should use your own synchronization data<br />

methods. You can use one of the following methods to avoid updates at the same time to the same location<br />

within a user space:<br />

● CMPSW MI instruction<br />

● CMPSWP MI instruction<br />

● LOCK MI instruction<br />

● LOCKSL MI instruction<br />

● Allocate Object (ALCOBJ) command<br />

Use of the QUSPTRUS API does not update the object usage information (such as last changed date, last<br />

date used, and so on). You should use the Change User Space or the Retrieve User Space API to update<br />

the object usage information if needed.<br />

Examples of the API are in API examples.<br />

http://infocntr.rchland.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/qusptrus.htm (1 of 3) [10/4/1999 2:35:05 PM]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!