### PDA_XERMSG

Process error messages for SLATEC and other libraries

#### Description:

PDA_XERMSG processes a diagnostic message in a manner determined by the value of LEVEL. In the original, things also depended on an error report control flag KONTRL. This was by default 2.

If KONTRL was zero or negative, no information other than the message itself (including numeric values, if any) would have been printed. If KONTRL was positive, introductory messages, trace-backs, etc., would have been printed in addition to the message.

Depending on KONTRL and LEVEL the error handling mechanism might also have included aborting the program via a STOP statement.

 ABS(KONTRL) LEVEL 0 1 2 2 fatal fatal fatal 1 not printed printed fatal 0 not printed printed printed -1 not printed printed printed only once only once

In the current version, this routine will always issue a message via EMS_REP. Under no circumstances is the program aborted. Instead this routine always returns control to the caller after setting the STATUS argument (which is new in this version) to 1.

#### Invocation

CALL PDA_XERMSG( LIBRAR, SUBROU, MESSG, NERR, LEVEL, STATUS )

#### Arguments

##### LIBRAR = CHARACTER * ( * ) (Given)
The name of the library such as ‘SLATEC’. This will form part of the message put out.
##### SUBROU = CHARACTER * ( * ) (Given)
The name of the subroutine calling PDA_XERMSG. This will form part of the message put out.
##### MESSG = CHARACTER * ( * ) (Given)
The principal error or warning message.
Ignored.
Ignored.
##### STATUS = INTEGER (Returned)
The global status. Always returned as 1.

#### References

R. E. Jones and D. K. Kahaner, XERROR, the SLATEC Error-handling Package, SAND82-0800, Sandia Laboratories, 1982.

P. C. T. Rees and A. J. Chipperfield, EMS Error Message Service, Version 1.4, Programmer’s Manual, SSN/4.7, DRAL, 1995.

#### Implementation Status:

The newline sentinel  is not interpreted by this routine.