Chapter Contents

Previous

Next
execend

execend



Cancel the SUBCOM Interface

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTIONS
IMPLEMENTATION
EXAMPLE


SYNOPSIS

#include <exec.h>

 int execend(void);


DESCRIPTION

The execend function is called to terminate subcommand processing.


RETURN VALUE

The execend function returns 0 if the call is successful or nonzero if the call is not successful. A nonzero value is returned when there is no previous successful call to execinit or if execend encounters other errors during its processing. Further use of a SUBCOM environment created by execinit is not possible after a call to execend , if execend does not complete successfully.


CAUTIONS

If any EXECs invoked by execcall are active when execend is called, the effect is system-dependent and also can depend on whether the previous call to execinit was interactive.

Under CMS, if the program invokes an EXEC via execcall and then calls execend (see the IMPLEMENTATION section) before processing the entire EXEC, execend allows the EXEC processing to complete. All remaining subcommands are accepted but ignored, and the return code for each subcommand is set to 10 .

Under TSO, if the original execinit call is interactive, any active CLISTs started by execcall are terminated when execend is called. If the execinit call is noninteractive, however, any such CLISTs continue to execute and may generate input for the processor that called the C program.

If the execend function is called with one or more TSO REXX EXECs still active, the EXECs continue to execute, but any attempt to send a subcommand to the application that called execend results in a REXX RC of 10 and a message. The call to execend is not considered to be complete until all active REXX EXECs have terminated. If execinit is called in noninteractive mode, any CLISTs on the TSO stack beneath the first REXX EXEC at the time of a call to execend remain active.

Under the USS shell, the behavior is the same as under CMS.


IMPLEMENTATION

Under TSO, when SUBCOM is initialized with an interactive call to execinit , execend causes all CLISTs invoked by execcall to be forcibly terminated. If execinit creates a new stack allocation, the previous allocation is restored.

Similarly, if SUBCOM is initialized as interactive, execend deletes the current REXX data stack, restoring the stack defined when execinit was called. If SUBCOM is initialized as noninteractive, the REXX data stack is not modified.


EXAMPLE

See the example for the execget function and the comprehensive SUBCOM example.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.