RETURN via PF key

We have recently ported an application from a Mainframe to an AIX system.

We have a program that has the following code in it.

SET KEY PF3 = ‘RETURN’

This is meant to return to the previous library, when invoked. Instead it logs off.

The documentation explains that this happens if no return point has been set, but doesn’t explain how this is done.

The module in question is the start up program for a library.

It is invoked from a different library by running a module that does a stack of a LOGON to the library that this program is in.

It used to work on the mainframe.

Any ideas?

SET KEY PF3=‘RETURN’
INPUT …

is executing the Natural System Command RETURN.
For this to work, you must first SETUP a return point.
If no return point is defined then RETURN will log you off.
.
Please take a look at the Natural documentation -> System Commands: SETUP and RETURN.

Thank you.

I have been able to get it working again.