rslvsp function returns null

415 pts.
Tags:
API
iSeries
rslvsp function
V6R1
Documentation for rslvsp points: "A null pointer value means the object was found in a machine context." But I verified that my user space was created successsful rslvsp(_Usrspc,"userspace", "QTEMP", _AUTH_ALL) If it is found in machine context, how can I resolve to it (Have a pointer to the user space)? if is not in a machine context , but it exists how can I otain a pointer for that location? why is returning me NULL?

Software/Hardware used:
v6r1, iseries, rslvsp function, API
ASKED: December 21, 2012  9:41 PM
UPDATED: December 21, 2012  10:10 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    We need to see more of the programming to know if any part of your rslvsp() call is valid. However, if you just want a pointer for your user space, use the Retrieve Pointer to User Space (QUSPTRUS) API. -- Tom
    125,585 pointsBadges:
    report
  • GraceP
    With QUSPTRUS function my program correctly return a pointer to my user space, but no matter if I change to _Program I obtain a null pointer with rslvsp even if the object is in there, we use the rslvsp due to performance reasons.The call for rslvsp is just: _SYSPTR sysP = rslvsp(_Usrspc,"USRSPC01", "QTEMP", _AUTH_ALL) ; Can you explain me a little bit about that context machine ?  ( because is the only clue that I have ) 
    415 pointsBadges:
    report
  • TomLiotta
    First, do you have evidence that using QUSPTRUS causes any significant delay? Next, you say this:   Documentation for rslvsp points: "A null pointer value means the object was found in a machine context."   But as far as I know, that is only in the MI rslvsp documentation and you are using the rslvsp() MI library procedure in C. Those are not the same. The rslvsp() MI library procedure has no such statement.   A null pointer might be returned from rslvsp() for a number of reasons, but there's no way to know what that might mean without seeing more of your program. Especially, how are you handling errors?   Tom
    125,585 pointsBadges:
    report
  • GraceP
    My error, I thought that the cast between pointers was good and clear, but it is  when I do the cast when is returning NULL , it is weird,  when I call the program from another remote programs it returns NULL but if I call into an interactive session the pointer is correct.   I guess it is not the way to manage the system pointer  static char * pointer = NULL ; f() { #pragma exception_handler(errorLabel,0,0,_C2_ALL,_CTLA_HANDLE) pointer = (char *)((void *)rslvsp(_Usrspc,"USRSPC01", "QTEMP", _AUTH_ALL) ); #pragma disable_handler errorLabel: ... }
    415 pointsBadges:
    report
  • GraceP
    I tested the splitting the cast and the char pointer has a valid pointer :    static char * pointer = NULL ; { #pragma exception_handler(errorLabel,0,0,_C2_ALL,_CTLA_HANDLE) void * a = (void *)rslvsp(_Usrspc,"USRSPC01", "QTEMP", _AUTH_ALL) ; pointer = (char *) a; #pragma disable_handler }
    415 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following