Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Swapping Group Profile- API QWTSETP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Swapping Group Profile- API QWTSETP

    Qzdasoinit is a prestart job. My understanding of this job is it sits and waits for an odbc connection, swaps Quser for the requesting user and executes the called programs. When the calling program ends the qzdasoinit job will wait for another user request and service the next user. For each user using the job qzdasoinit a job log is produced. Therefore, one Qzdasoinit job could service numerous users. I am using the API QWTSETP to set a profile handle, I understand that the profile handle is temporary, and can be used only in the job that created it. My question is..... Which job will the profile handle be created for? Will be profile handle end when the servicing user xxxxxxx job is ended???? or will the profile handle stay active until the qzdasoinit job is ended? I plan to use Qsyrlsph at the end of the routine, but I am concerned about jobs ending abnormally or the user turning the PC off.

  • #2
    Swapping Group Profile- API QWTSETP

    The profile handle will be created for the most current user of the ODBC prestart job. If you were to watch the audit journal for these ODBC jobs you will notice that as soon as one of them starts up the QZDASOINIT job swaps from user QTCP to the user who is doing the ODBC. After this swap is done, the exit program is called and you have the opportunity to swap to a profile of your own choosing. But a couple of words of caution Ė First, the QSYRLSPH api does not undo the swapping. It just releases the profile handle (a good thing), but the user profile that was set by the QWTSETP api stays in effect. In order to clean up after yourself and not leave inappropriate levels of authority laying around youíll have to swap back to the original user at some point. That brings me to the second concern, your exit program only gets called on the way into the ODBC request, not on the way back out. This means once you have swapped to an alternate user you will not be given an opportunity to swap back until the next time the exit program is called. The way that I have engineered this is to instruct the exit program to always swap back to itís original user upon entry into the program. This cleans up any old authorities that may have been lying around and gives you a clean start with each call. jte

    Comment

    Working...
    X