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



On 10/29/2015 4:16 PM, Steinmetz, Paul wrote:
I have a working API example for a non-users pace API.
I've never created, changed or worked with user spaces.
This API requires the use of a user space.
So I need create and change the user space for this API.
I was planning on using the TAATOOLS for this.
CRTUSRSPC, CHGUSRSPC, etc.

I'm still looking for a good CL API user space example.

http://code.midrange.com/21421a6be5.html does a create and delete user
space in CL. The user space APIs use an error code, which is defined here:

/* Initialise error return structure */
CHGVAR &ERR (&ERR_SIZE *CAT +
&ERR_AVAIL *CAT +
&ERR_ID *CAT +
&ERR_RES)

Creating a user space:

/* Create 16KB space to hold temp results */
CALL QUSCRTUS ('RTVJOBCMD QTEMP ' +
'JOBLOG ' +
&SPC_SIZE +
&SPC_VAL +
'*LIBCRTAUT' +
'RTVJOBCMD API work area')

Deleting a user space:

/* Delete space; ignore errors */
CALL QUSDLTUS PARM('RTVJOBCMD QTEMP ' +
&ERR )

The RPG program uses QUSRTVUS to walk through the returned API information.

Actually, if there is a better solution, I really need the last command (RNMOBJ) with parameters called in job abc.

As posted, this utility will return all the commands to a temporary
source file. I use this to copy/paste the ones I am interested in. You
could modify the RPG to search the returned command and only save the
RNMOBJ that you want.

What will you be doing with the command once you've retrieved it?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.