BSFN code to set return code to 2

johndanter

johndanter

Legendary Poster
Hi folks,

I am writing a little NER that needs to throw an error back to the calling PGM. (DC Link)

In the past I've used
Set NER Error(BF szErrorMessageKey, <None>)

and then
Set NER Return Code
(= 2)

This works fine but for some reason, this time it isn't

All the N3DNxxxx DC Link BSFNs also do this and even when I call them and test them myself they do this. I can't fathom this out as it should be very simple.

Any ideas list? How do you do it?

Thanks

John

EDIT: For future readers: Set NER Return Code needs to be the last BSFN call in your code before you exit. Thanks to Craig Welton
 
Last edited:
And BF szErrorMessageKey definitely has a value? Can you see that in the data structure output?
 
It's working!

I just deleted the code and entered it again from scratch. Must have been a previous dodgy cut and paste
 
John, any chance you are calling another BSFN after Set NER Return Code? I believe that will change the error status.

Craig
 
Hi Craig,

It's working now. Really annoyed as I've wasted a day on this :)

Craig, you are right - I was calling Get Error With Text Substitution afterwards :)

So this needs to be the last thing before you exit?

Tested twice and it works. The instant I move the code it stops. So thanks mate
 
Last edited:
Back
Top