![]() Chapter Contents |
![]() Previous |
![]() Next |
| The Subcommand Interface to EXECs and CLISTs |
| Steps in Subcommand Processing |
Associated with each of these steps are the following SUBCOM functions:
execget
, which obtains a subcommand from an appropriate source
execid
, which extracts the subcommand name and may
perform additional system-dependent
processing, for example, recognizing system-defined use of special characters
in the subcommand
execmsg
, which sends diagnostic messages, the exact form of which can be controlled
by the user
execrc
, which sets the return code from the completed subcommand and may
perform additional system-dependent processing.
In addition, an
execinit
function is used to initialize the subcommand environment
(and assign a name to it), and
execend
is used to terminate the environment.
The set of library
functions that implement the SUBCOM interface
can be summarized as follows:
execinit
establishes and assigns a name to a SUBCOM environment.
execinit(...); /* Set up environment. */
for(;;) {
execget(...); /* Get a subcommand. */
cmd = execid(...); /* Identify subcommand. */
if (strcmp(cmd,"END")==0)
break;
if (strcmp(cmd,"EXEC")==0)
execcall(...); /* Implement exec. */
else
process(...); /* Process the subcommand. */
execrc(...); /* Set the return code. */
}
execend(); /* Terminate the environment.*/
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.