*RET Return Command Input to SYSCMD

*RET SYSCMD The *RET statement is meaningful if CFS is called from a BS2000 DO procedure and which then calls multiple CFS procedures one after the other by means of DO commands.

Example:

*002 FILE=NO

DO CFS.USERLIB(PROC1)

DO CFS.USERLIB(PROC2)

DO CFS.USERLIB(PROC3)

END

In order for the sequence of procedures to function as expected, each of the CFS procedures (PROC1 to PROC3) must have a *RET SYSCMD command as their final statement. This will result in the command input source being redirected from SYSDTA (i.e. from the current CFS procedure file) to the BS2000 procedure. The next CFS DO command will then be read and executed.

If CFS is not invoked from a DO procedure (Procedure Level Number 0), then the *RET SYSCMD statement will have the same effect as the *DIA statement (see below).