Hello Martin,
There's no way to determine where the messages queued to a specific LTERM originated from in SYSVIEW. You can set a threshold for metric IMLTQUE to trigger on a specific queue depth for the LTERM, or create a threshold for the total long message queue use (IMLMSGQ%) or the total short message queue use (IMSMSGQ%). Since BA9RATS is a static terminal, a DEQALL line command from that data row on the IMSLTERM display should dequeue any messages to that LTERM. The only other suggestion I have is to possibly search the IMS PSBLIB for the string BA9RATS to see if you can identify the PSB(s) that have a PCB specifying LTERM=BA9RATS.