Learn it on Mainframe Path. Do it with MainframeKit.Learn on Mainframe Path ▸
MainframeKit

S047

Unauthorized program used a restricted serviceSYSTEM ABEND

A program that is not APF-authorized issued a service call that only authorized programs may use, so the system ended it with abend 047.

MOST LIKELY

A library in STEPLIB or JOBLIB is not in the APF list, which strips authorization from the whole concatenation.

FIRST CHECK

List the allocated libraries (for example with LISTALC in TSO) and find any that is not APF-authorized.

TRY IT ▸

Site search

What it means

Abend 047 is the system saying a restricted service (an SVC reserved for authorized callers) was requested by a program that has no authorization. Authorization normally comes from the program being link-edited as authorized and loaded only from APF-authorized libraries.

A very common surprise: a program that is fine on its own loses authorization because one library in its STEPLIB or JOBLIB concatenation is not APF-authorized. The whole concatenation then runs unauthorized.

Typical causes

  • A library in STEPLIB or JOBLIB is not in the APF list, which strips authorization from the whole concatenation.
  • The program was loaded from a non-authorized library.
  • A tool that needs authority is called from a program that is not authorized (for example a utility invoked by an unauthorized caller).
  • A product fix tightened an authorization check, so a previously working caller now fails.

How to fix it

  1. List the allocated libraries (for example with LISTALC in TSO) and find any that is not APF-authorized.
  2. Remove non-authorized libraries from the concatenation, or ask your systems programmer whether each library should be authorized.
  3. Ask the systems programmer to add a required product library to the APF list through the normal change process; do not change authorization yourself.
  4. Check the product documentation for how its program is meant to be invoked (batch step, authorized caller).
  5. Search IBM support for a PTF if the abend started right after maintenance.

Example

Illustrative only; names and values are invented.

Illustrative only:
IEA995I SYMPTOM DUMP OUTPUT
  SYSTEM COMPLETION CODE=047