Ensuring that exit routines exist at the CALL

If the work involved in setting up information for the CALL request is costly, you might issue the QUERY request with the QTYPE=CALL parameter to find out whether any exit routines are associated with the exit. This step would help you avoid the steps that lead up to a CALL request. Here is an example, in pseudocode, of using the QUERY request:
Issue REQUEST=QUERY with TYPE=CALL
IF retcode indicates "there are exit routines" THEN
  set up parameter list
  Issue REQUEST=CALL
ELSE
  do "no exit routine" default processing
ENDIF