ISPF service call not allowed during exit invocation
If this is the case, be aware of the fact that you are not allowed to use ISPF services within REXX code imbedded in an ISPF panel.
[Edited] I've posted my answer before reading page 2 of the post where the problem has already been solved by Pedro and explained by Akatsukami.
Hope you don't mind.