In earlier versions of SAS, printed output from SAS procedures and from the DATA step was designed for a traditional line-printer. In Version 8, printed output is much more flexible. The new Output Delivery System (ODS) enhances your ability to manage both DATA step and procedure output. ODS features include the ability to:
ODS provides a flexible mechanism for procedures to produce output. Instead of writing to the listing file directly, the procedure creates an output object for each piece of output to be displayed. Every table, plot, and chart is thus a separate entity in the system. Each output object is composed of a data component (the collection of raw numbers and characters comprising the contents of the output) and a template component (the description of what the output is supposed to look like when the data is formatted and arranged on a page).
Output objects are created by the procedure, and they are rendered based on the output destinations that the user has requested. You can control which output destinations are in effect by using the ODS statement or by selecting output destinations in the SAS Explorer. The Results window retains a running record of the output directory hierarchy that is produced when a SAS job is executed. The items on the left-hand side of the RESULTS node are output directories. The items on the right-hand side of the RESULTS node are pieces of output.
ODS currently supports four destinations: the HTML destination (for output that is written in Hypertext Markup Language), the Output destination (for creating a SAS data set), the Printer destination (for output that is formatted for a high-resolution printer), and the Listing destination. ODS destinations can be open or closed. When a destination is open, ODS can send output objects to it. Multiple output destinations can be active at the same time. You open and close a destination with the appropriate ODS statement (ODS HTML, ODS LISTING, ODS PRINTER, or ODS OUTPUT). By default, the Listing destination is open, and all other destinations are closed. Consequently, if you do nothing, your SAS programs run and produce Listing output, just as they did in earlier releases of the SAS System.
By default, ODS output is formatted according to instructions in various definitions that the procedure or DATA step points to. However, ODS provides ways for you to customize the output. You can customize the output for an entire SAS job, or you can customize the output for a single output object. To customize the presentation aspects of the output at the level of the entire SAS job, use a style definition. To customize the output for a single output object, use a table definition. The TEMPLATE procedure creates and modifies these definitions, which the Output Delivery System then uses to create formatted output.
ODS styles govern the overall look and feel of SAS procedure output. Styles determine the colors, fonts, graphic images, and other visual aspects in effect when output is generated. SAS delivers several predefined styles, and you can customize them or create new ones.
Exactly one style is in effect at any time during a SAS session. It applies to all procedure output during the period it is in effect. This gives the output a uniform look and feel. Regardless of the procedure, row headers have the same background color, data cells have the same font, and so forth.
A style definition describes how to render the presentation aspects (color, font face, font size, and so forth) of an entire SAS job. Each style definition is composed of style elements, where a style element is a collection of style attributes that apply to a particular part of the output. For instance, a style element may contain instructions for the presentation of column headers or for the presentation of the data inside cells. Style elements may also specify default colors and fonts for output that uses the style definition. Each style attribute specifies a value for one aspect of the presentation. For instance, the BACKGROUND= attribute specifies the color for the background of an HTML table, and the FONT_STYLE= attribute specifies whether to use a Roman, a slant, or an italic font.
A table definition describes how to render the output for a tabular output object. (Almost all ODS output is tabular.) A table definition determines the order of table headers and footers, the order of columns, and the overall look of the output object that uses it. Each table definition contains or references table elements, where a table element is a collection of attributes that apply to a particular column, header, or footer. Typically, these attributes specify something about the data rather than about its presentation. For instance FORMAT= specifies the SAS format to use in a column. However, some attributes describe presentation aspects of the data.
Both style definitions and table definitions are contained in templates. SAS System templates are stored in the SASHELP library. When you run PROC TEMPLATE to modify or edit a template, the template is stored in the SASUSER library. You can modify the concatenation path that ODS uses to look up templates with the ODS PATH statement. This enables you to set up a default set of templates for your organization to give your SAS output a look and feel consistent with your organization's needs.
Although primarily created for procedure output, this new functionality is also available for DATA step programs, through the FILE and PUT statements. The FILE statement is used to define an ODS output object using the new ODS= option. With this new FILE statement option, the template is specified, and an ODS object is defined and created. Data columns for the data object are specified, and mapped to variables in the DATA step program data vector. The PUT statement can then be used to move data from these DATA step variables into the ODS output object. For a complete discussion of the DATA step interface to ODS, see the SUGI 23 paper "ODS: The DATA Step Knows".
For more information on the Output Delivery System, see The Complete Guide to the SAS Output Delivery System, Version 8.
With the CATALOG access method you can reference a SAS catalog or an entry within a SAS catalog as an external file. You can then use any SAS commands, statements or procedures that access external files to access catalogs. With the CATALOG access method you can read any type of catalog entry, but you can only write to entries of type LOG, OUTPUT, SOURCE, and CATAMS.
Some new capabilities this offers are:
For more information about the CATALOG access method, including examples that illustrate the way it can be used, see SAS Language Reference: Dictionary, Version 8.
As an experimental feature in Version 8, the SAS System enables you to send electronic mail (e-mail) from a DATA step, SAS procedure, or SCL. Specifically, you can:
The SAS System sends all e-mail over a socket to an SMTP server.
Note: You or your system administrator may have to specify the EMAILHOST and EMAILPORT SAS system options. The EMAILHOST option identifies the host that runs the SMTP server on your network. It defaults to localhost. The EMAILPORT option identifies the port number for the SMTP server. It defaults to 25.
In general, a DATA step or SCL code that sends e-mail has these components:
Options that you specify in the FILE statement override any corresponding options that you specified in the FILENAME statement.
In your DATA step, after using the FILE statement to define your e-mail fileref as the output destination, use PUT statements to define the body of the message.
You can also use PUT statements to specify e-mail directives that change the attributes of your electronic message or perform actions with it.
E-mail can also be used to send procedure output. Two of the ways you can use this feature are directing HTML procedure output generated using ODS and sending images generated by graphics procedures.
ODS HTML procedure output must be sent with the RECORD_SEPARATOR (RS) option set to NONE. For CMS, ODS produces an HTML stream with embedded record-separator characters, by default. When the RS option is set to NONE, ODS writes one line of HTML at a time to the file.
For more information abou the EMAIL Access Method, including examples that illustrate the way it can be used, see SAS Companion for the CMS Environment, Version 8.
With the FTP access method you can use file transfer protocol (FTP) to read or write to a file from any host machine that you can connect to on a network with an FTP server running. Use this access method when you want to connect to the host machine, log in to the FTP server, to make records in the specified file available for reading or writing, and then to disconnect from the host machine.
Some of the types of tasks you can perform using the FTP access method are:
For more information about the FTP access method, including examples that illustrate the way it can be used, see SAS Language Reference: Dictionary, Version 8.
The PIPE access method allows you to pipe data between SAS and CMS Pipelines.
The pipe can be opened for input or output. When a pipe is opened for input by the INFILE statement, output from the pipe is available for input. When a pipe is opened for output by the FILE statement, any lines that are written to the pipe by the PUT statement are input to the pipe.
For more information about the PIPE access method, including examples that illustrate the way it can be used, see SAS Companion for the CMS Environment, Version 8.
The socket access method enables you to read from or write to a Transmission Control Protocol/Internet Protocol (TCP/IP) socket. A TCP/IP socket is a communication link between two applications. The server application creates the socket and waits for a connection. The client application connects to the socket. With the SOCKET access method, you can use SAS to communicate with another application over a socket in either client or server mode. The client and server applications can reside on the same machine or on different machines that are connected by a network.
You can use the SOCKET access method in either client mode or server mode. In client mode, a local SAS application can use the SOCKET access method to communicate with a remote application that acts as a server (and waits for a connection). When the local SAS application is in server mode, it remains in a wait state until a remote application connects to it. To use the SOCKET access method in server mode, you need to know only the port number that you want the server to listen to for a connection.
For more details about the SOCKET access method, including an example that illustrates the way it can be used, see SAS Language Reference: Dictionary, Version 8.
With the URL access method you can read a file from any host machine that you can connect to on a network with a URL server running.
Among the capabilities the URL access method offers are:
For more details about the URL access method, including examples that illustrate the features mentioned above, see SAS Language Reference: Dictionary, Version 8.
The rules for SAS names have been expanded to provide more functionality. Some SAS names, such as DATA step variables, members of SAS data libraries, and catalog entries, can be up to 32 bytes long. A variable name can be mixed case.
In a DATA step or a PROC SQL step, you can more easily use DBMS files. You can use a new name literal to express a DBMS column name that may contain characters that are not normally allowed in SAS names. The SAS system option VALIDVARNAME= enables you to specify what rules apply to the variable names that you can create and process in a SAS session.
You can now reference two or more SAS libraries with a single libref in all operating environments. To make your code easier to use in multiple operating environments, you can use a libref, rather than only the physical name as in Version 6, to specify the aggregate storage location that contains your SAS files.
You can now logically concatenate entries in two or more SAS catalogs. Use the LIBNAME statement to implicitly concatenate entries in SAS catalogs. Use the new CATNAME statement to explicitly concatenate entries in SAS catalogs.
Generation data sets enable you to keep multiple copies of a SAS data set. The copies represent versions of the same data set, which is archived each time it is replaced. To request generation data sets, use the GENMAX= data set option. To reference a specific version of a data set, use the GENNUM= data set option.
Integrity constraints enable you to specify rules that guarantee the consistency and correctness of stored data. The rules restrict the data that can be added, updated, or deleted from a data set, and they also link the data in one data set to data in another data set.
You can specify integrity constraints either when a data set is created or after it already contains data. To create and delete integrity constraints, you can use the DATASETS procedure, the SQL procedure, or SCL functions. To list integrity constraints, use the CONTENTS procedure.
Version 8 incorporates the following performance improvements for indexed data sets:
Compressed data sets are more flexible to use. You can now access observations in a compressed SAS data set directly by using the POINT= or FIRSTOBS= option.
You can choose a compression algorithm that best fits your data. For compressing character data, specify CHAR to use the RLE (Run Length Encoding) algorithm. For compressing binary (for example, numeric) data, specify BINARY to use the RDC (Ross Data Compression) algorithm.
In Version 8, you can use the POINTOBS= data set option to control whether a compressed data set may be processed with random access rather than with sequential access only.
An audit trail enables you to log updates to a SAS data file in a separate audit file. Each time an observation is added, deleted, or updated, information is added to the audit file about who made the modification, what was modified, and when.
You can also define special variables that are stored in the audit file. The user can assign values to them just like regular data set variables. They are stored with each record written to the audit trail. For example, they could be used to log a "reason for modification."
The audit trail is initiated with the AUDIT statement in PROC DATASETS. See SAS Procedures Guide, Version 8 for more information.
You can create or reference a permanent SAS data set without first assigning a libref. You can refer to a SAS data set directly by specifying in quotes the name by which the operating system refers to the file.
The following formats are new:
The DATEJUL informat can be used to read Julian dates in either yyddd or yyyyddd format. If the date is in yyddd format, then SAS uses the value of the YEARCUTOFF= SAS system option to interpret yy.
Creation date and date last modified are stored in ISPF statistics in directory entry in 0CYYDDDF packed format, where C= 0 for 1900, 1 for 2000, etc. Consider, for example, x'0090045F'. The century is 0, corresponding to 1900. The year is 90. The day is 45, corresponding to 02/14. The resolved date in mm/dd/yyyy format is 02/14/1990.
The following informats are new:
These date and time functions are new:
The maximum length for many SAS names has been increased to 32 (from 8 in earlier versions). In the DATA step, variable names (including array names), window names, and statement labels may now consist of up to 32 characters. A variable name can be mixed case.
There also has been an increase in length of value that could be contained in a character variable. In earlier releases the limit was 200, now it is 32,767.
Reports that are created with the FILE and PUT statements in a DATA step have two new features:
The ability to directly access input and output buffers has been enhanced.
Instead of just referencing the _INFILE_ pseudo-variable in a PUT statement, you may now use it almost anywhere a variable reference may occur, including as the source or target in an assignment statement, or as a function call argument.
A new pseudo-variable _FILE_ offers you access to the current output buffer, the last buffer formatted by the most recent PUT statement. You may access the _FILE_ pseudo-variable before or after the PUT statement executes. Before the PUT statement executes, the output buffer is empty. At this point, you may want to initialize the buffer with some data that would be reflected in the next PUT statement. You may also access the _FILE_ variable after a PUT statement executes, provided that the buffers are held in memory, either by using a trailing @ or N= and # line pointer controls.
In Version 8, SAS no longer requires that you recompile stored compiled DATA step programs or recreate DATA step views that were created in previous versions or releases of SAS. Stored programs and views created in Version 6 or Version 7 run as is in Version 8, provided that you run them on the same operating system on which they were created.
By default, SAS also saves the source statements when you create stored compiled programs and DATA step views in Version 8. You can retrieve and/or execute the statements by using the new DESCRIBE and EXECUTE statements within the DATA step.
The following formats are new:
Character informats can handle strings up to 32,767 characters (32K) long.
The following informats are new:
In addition to the functions described below see also External I/O: Functions, SAS I/O: Functions, and Date and Time Processing: Functions.
The following mathematical and probability functions have been added to base SAS software:
The following web-based functions have been added to base SAS software:
The SAS workspace is composed of windows that enable you to accomplish specific tasks. Along with the main programming windows (Program Editor, Log, and Output), the workspace now includes SAS Explorer, a central point for managing basic SAS software tasks such as:
If you issue the CAT, DIR, LIB, or FILENAME commands, an Explorer window opens. For example, if you type CAT WORK.TEST, you will see the contents of your TEST catalog in a modified Explorer window.
The SAS Registry stores configuration data about the SAS session and about various applications. You can use the SAS Registry Editor window to
You can also use PROC REGISTRY to accomplish these tasks.
The Results window contains pointers to various locations in the Output window. When procedure code executes, pointers to specific output are generated and are listed in the Results window. You can click the navigation pointers to locate the desired output.
SAS/CONNECT now supports both synchronous and asynchronous remote processing. In Version 6, only synchronous processing was supported. With synchronous processing, the default behavior, you wait for the results of the remote processing before you are able to continue local processing. With asynchronous processing, you immediately regain control to continue local processing while the remote job executes, and results can be obtained at a later time.
The ability to execute remote submits asynchronously allows you to continue processing on your local host while the remote submit executes in the background. Asynchronous processing provides increased time effieiency by allowing you to perform multiple tasks simultaneously. Using this technique, you can start a long running task in the background on a remote host, and immediately be able to begin another task on another remote host or continue local processing, rather than wait until the first remote task is complete before regaining control of your local SAS session. This also provides you with flexibility as to when and where tasks are performed.
The following new statements are available for checking the status of asynchronous remote processing and obtaining results from it:
For more information refer to SAS/CONNECT User's Guide, Version 8 or "New V7 Client/Server Capabilities to Solve and Secure Your Distributed Processing Needs" by Cheryl Garner.
When using compute services in SAS/CONNECT software, you can use the Output Delivery System (ODS) to change the format and appearance of SAS output that is generated on a remote host. You can generate ODS output from a remote host when using either a synchronous or an asynchronous remote submit. ODS statements and procedures that support ODS can be used to
Encryption services protect data that is sent between hosts across a network. Encryption services use a reversible algorithm to convert plain-text data into an unintelligible form, thus protecting data from being used by unauthorized parties. A SAS proprietary form of data encryption is available on all platforms.
Encryption services are packaged in two forms because of export key-length restrictions:
For more information on data encryption, refer to the Appendix, "Encryption Services" in SAS/CONNECT User's Guide, Version 8, and "New V7 Client/Server Capabilities to Solve and Secure Your Distributed Processing Needs" by Cheryl Garner.
SAS/CONNECT offers the ability to design and develop distributed applications that communicate by using messages. Messaging services enable the programs that compose a distributed application to communicate by sending data in the form of a message. Two forms of messaging services are available: direct messaging and indirect messaging. Both direct and indirect messaging enable you to include attachments with messages that are sent between a client and a server portion of an application.
Messaging allows applications to communicate by sending each other data in messages. Any action can be taken upon receipt of a message and acknowledgements can be returned to the sender if and when appropriate. With direct messaging, both the client and the server must be active at the same time. With indirect messaging, this restriction is lifted.
Messaging enables application developers to deploy multi-tiered distributed applications. This multi-tiered design allows you to separate and centralize business and data access to the server portion of the application. You can then implement a thin client application that requires little or no maintenance. Not only is it easy to segment your logic into individual programs, but these programs can execute on the host that best meets your data and resource requirements.
The indirect messaging facility allows you to write applications that communicate asynchronously with each other. That is, one application could send messages to one or more target applications that may not be currently running and that may not run for several more hours or days. SAS indirect messaging (message queueing) enables programs to communicate indirectly by placing messages on queues in storage. Therefore, the pieces of your application can run independently of each other, can run at different speeds and times, and can run without a direct connection between them.
SAS/CONNECT User's Guide, Version 8 contains more information about messaging services.
SAS software introduces a new cross-environment data access (CEDA) facility. SAS recognizes that diverse and distributed computers have become more common than they were when Version 6 was introduced. It is no longer unusual to have a site where multiple CPUs share access to a single disk or to a single networked file system. With CEDA, SAS data sets are accessible across platforms. CEDA allows any SAS data set that is created on a directory-based host to be read by a SAS session that is running on another directory-based host. This means that from UNIX System Services on OS/390 you can access SAS data sets on Windows NT, Windows 95, Windows 98, OS/2, Macintosh, Solaris, HP-UX, RS/6000, AIX, Compaq Tru64 UNIX (formerly Compaq's DIGITAL UNIX), OpenVMS Alpha, and OpenVMS VAX.
The advantage of CEDA is that you can transfer your data sets from one host to another, or NFS mount a disk from another host and automatically be able to access your data without any extra steps. CEDA eliminates the need to execute any other procedure, maintain a running server, or even SIGNON to the remote host.
For more information about CEDA, see SAS/CONNECT User's Guide, Version 8 or "New V7 Client/Server Capabilities to Solve and Secure Your Distributed Processing Needs" by Cheryl Garner.
Version 8 and Version 6 SAS/SHARE client/server applications are compatible. This enables you to convert your applications incrementally rather than at one time. For example, you can convert your client from Version 6 to Version 8 and still communicate with a Version 6 server. After successfully converting the client, the server can then be converted. Another approach would be to convert the server first and then the client. Otherwise, both client and server would need to be converted simultaneously, which generally increases the cost and risk of the conversion.
Encryption services protect data that is sent between hosts across a network. Encryption services use a reversible algorithm to convert plain-text data into an unintelligible form, thus protecting data from being used by unauthorized parties. For the OS/390 platform, the purchase of a license for SAS/SECURE is necessary. SAS/SECURE provides access to the encryption services of the RSA BSAFE Crypto-C Toolkit.
In Version 8, SAS/SECURE introduces support for the RSA BSAFE Crypto-J Toolkit for Java clients of the SAS server. SAS system options for data encryption for the RSA BSAFE Crypto-C Toolkit and the Microsoft CryptoAPI (for Windows) are:
Other documentation explains options that are applicable to RSA BSAFE Crypto-J Toolkit Java clients.
In the windowing environment, extensive help is available through the SAS online Help. To access online Help, either enter the HELP command or issue the PMENU command as needed to display SAS menus, then select
Help->SAS System Help
This causes the HELP Browser window to display. Then select Help topics of interest at increasing levels of detail.
Underlined text in the Help Browser window represents links to additional information. You can use the Tab key to move the cursor from link to link in the current window. To display the linked topic, position the cursor on the underlined text for the desired link and press Enter or click the left mouse button.
The Help Browser keeps a history of the help topics you view. The following navigation controls are available:
To scroll up and down within the help current help topic, the following controls are available:
To access CMS specific help directly, enter help host on the command line, then select host, or, using PMENUs, select Help->SAS System Help->Using SAS with your operating environment.
You can develop Help for your site or for your SAS programs that can be displayed in the standard SAS Help browser. To ensure that user-defined Help will be displayed as it is written, use only the subset of tags from HTML Version 3.2 that is supported on the SAS Help browser. Help information in tags that not supported by the SAS Help browser may be ignored.
The following HTML tags are supported by the SAS Help browser: H1, H2, H3, H4, H5, H6, P, UL, OL, DIR, MENU, DL, DT, DD, PRE, XMP, LISTING, I, B, U, EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, A, LINK, TITLE, BASE, HEAD, and HTML.
The TABLE tag is the only frequently used tag that is not supported at this time. To add tables to your Help, use the PRE tag and format the text manually by using blank spaces, vertical bars, dashes, and underscores as needed. For more details about developing and using user-defined Help, see Initializing and Configuring the SAS System in the SAS Companion for the CMS Environment, Version 8.
The CD-ROM that is supplied with SAS software contains most of the documentation for base SAS, including SAS Language Reference: Dictionary and other titles. If you encounter a problem that you cannot solve with the information that is provided in the SAS log or in SAS online Help, load the CD-ROM disk into a CD-ROM reader and browse through the contents of the books.
Contact your SAS Support Consultant for assistance with ordering hardcopy documentation.