Chapter Contents

Previous

Next
WOUTPUT

WOUTPUT



Manipulates the OUTPUT window

Category: Window


Syntax
Details
Example

Syntax

sysrc=WOUTPUT(action<,argument-1<, . . . ,argument-3>>);

sysrc
contains the return code for the operation:
0 successful
[ne]0 not successful

Type: Numeric

action
is an action to perform, from the list below.

Type: Character

argument-1, . . . , argument-3
are additional arguments that can be specified for some of the actions, as indicated in the following list.

Type: Character

'CLEAR'
clears the OUTPUT window. There are no additional arguments for this action.

'DROPNOTE'
clears the note marked with the 'NOTE' and causes it to use its default behavior to write only the last output.

'FILE'
writes the current contents of the OUTPUT window to an external file. This action allows two additional arguments:

argument-1
is the fileref for the external file to which the window contents are to be written. This argument is required.

argument-2
optionally specifies append mode. By default, each new output replaces any current contents of the external file. Specify the value 'A' to append the output to the external file instead.

'NOTE'
puts the pointer at the end of the current output. The NOTE action has a direct effect on the FILE, PRINT and SAVE actions. When the output is written via WOUTPUT, the pointer is reset to get the next output.

'POPOFF'
turns off the AUTOPOP option of the OUTPUT window.

'POPON'
turns on the AUTOPOP option of the OUTPUT window.

'PRINT'
prints the current contents of the OUTPUT window. This action allows three additional arguments, all of which are optional:

argument-1
is the name of a form to use to control printing. Use name.FORM or simply name to specify a form in the current catalog. Use libref.catalog.name.FORM or libref.catalog.name to specify a form in a different catalog. The default form is the one specified in the FORMNAME option.

argument-2
is the fileref for a print file. If this argument is blank or if it is not specified, the output is sent to the default system printer.

argument-3
specifies append mode. Use the value 'A' to append the output to the current contents of the print file. If this argument is blank or if it is not specified, then each new output replaces the previous contents of the print file.

'SAVE'
saves the current contents of the OUTPUT window in a catalog entry of type SOURCE, LOG, or OUTPUT. This action allows three additional arguments:

argument-1
is the name of the entry in which the window contents are saved. The name can be a one- or three-level name. A one-level name saves the entry in SASUSER.PROFILE.name.OUTPUT. A three-level name saves the entry in libref.catalog.name.OUTPUT. You can also use a four-level name of the form libref.catalog.entry.type, where type is SOURCE, LOG, or OUTPUT. This argument is required.

argument-2
is an optional description of up to 40 characters.

argument-3
optionally specifies append mode. Specify the value 'A' to append the output to the current contents of the entry. By default, each new output replaces the previous contents of the entry.


Details

The list of options varies depending on the action specified.


Example

Print the OUTPUT window and append it to the file to which the fileref EXTERN has previously been assigned. Use the form specified in a previous FORMNAME option:

rc=woutput('print','','extern','a');


Chapter Contents

Previous

Next

Top of Page

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