TPGPRIO - get service request priority
01 TPPRIDEF-REC. COPY TPPRIDEF. 01 TPSTATUS-REC. COPY TPSTATUS. CALL "TPGPRIO" USING TPPRIDEF-REC TPSTATUS-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(3cbl) or TPACALL(3cbl), (also TPENQUEUE(3cbl) or TPDEQUEUE(3cbl), 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(3cbl) or TPRECV(3cbl) has no effect on the priority returned by TPGPRIO. Also, there is no priority associated with a conversational service routine unless a TPCALL(3cbl) or TPACALL(3cbl) 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:
TPACALL(3cbl),
TPCALL(3cbl),
TPDEQUEUE(3cbl),
TPENQUEUE(3cbl),
TPSPRIO(3cbl),