TPGPRIO-get service request priority
01TPPRIDEF-REC.
COPY TPPRIDEF.
01TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPGPRIO" USINGTPPRIDEF-RECTPSTATUS-REC.
TPGPRIO returns the priority for the last request sent or received. Priorities can range from 1 to 100, inclusive, with 100 being the highest priority. TPGPRIO may be called after TPCALL() or TPACALL(), (also TPENQUEUE() or TPDEQUEUE(), assuming the queued management facility is installed), and the priority returned is for the request sent. Also, TPGPRIO may be called within a service routine to find out at what priority the invoked service was sent. TPGPRIO may be called any number of times and will return the same value until the next request is sent.
Since the conversation primitives are not associated with priorities, issuing TPSEND() or TPRECV() has no effect on the priority returned by TPGPRIO. Also, there is no priority associated with a conversational service routine unless a TPCALL() or TPACALL() is done within that service.
Upon successful completion, TPGPRIO sets TP-STATUS to [TPOK] and returns a request's priority in PRIORITY in TPPRIDEF-REC.
Under the following conditions, TPGPRIO fails and sets TP-STATUS to:
TPENOENT]
TPGPRIO was called and no requests (via TPCALL() or TPACALL()) have been sent, or it is called within a conversational service for which no requests have been sent.
TPEPROTO]
TPGPRIO was called in an improper context.
TPESYSTEM]
TPEOS]
TPACALL(), TPCALL(), TPDEQUEUE(), TPENQUEUE(), TPSPRIO()