Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Host Operating Systems 203 The SAS® System under UNix® Operating Systems and Derivatives Sal/y Painter, SAS Institute Inc., cary NC The schedula' is sometimes referred to as lhe kernel. ABSTRACT ~ operating systems and derivatives offer many features that are quite powerfuJ. Coupled with extensive capabilities oflhe SAS System, a powerful tool for data analysis and management has been created. This paper will introduce features of UNIX operating systems and derivatives and features of the SAS System that combine to form a unique data processing task. The file system is the organizing structure fcx- data. It is perhaps the most important part of the system. The file system goes beyond simply a place to store data; it provides lhe means of organizing lhe layout of the data stcx-age in complex ways. UNIX operating systems and derivatives have three basic typeS of files: • directories Introductio n to UNIX Operating Systems and Derivatives The fmt UNIX operating system was developed in the late 1960s with the goal of creating an environ- ment to promote efficient programming developmenL One impressive feature of the UNIX operating systems and derivatives is the ability to port the system from one hardware environment to another. Rather than being specialized systems for one particular piece of hardware, or haldware vendor, the UNIX operating systems and derivatives can be easily modified to function efficiently on many hardware platforms. The UNIX operating systems and derivatives are divided into three major areas: • scheduler • fdesystem • shell. The scheduler is responsible for making the operating system a multitasking and multiuser system. That is, more than one user can be on the system and performing many tasks at the same time. The scheduler manages the computer resources among the current processes. Each process is handled separately, although to the users on the system it seems as if the tasks are running simultaneously. The scheduler is also responsible for controlling the swapping of programs from memory to disk. Most current UNIX operating systems and derivatives now • special ftles • ordinary files. Directories can be best understood by using the analogy of a filing cabineL The drawers in the cabinet are the subdirectories, and the folders within the drawers are the files. Special files are those that the scheduler needs in order to set up the environmenL The fde names of special files are usually prefixed with a period, and are sometimes referred to as hidden files since they will not be displayed when using the standard Is command. The shell is the command interpreter. It is just a utility program and not properly a part of the system; however, it is the part that you see. The shell listens totheterminalandtraDSlatesrequestsintocommands that the scheduler can understand. There are currendy three popular shells: • the Bourne shell (sh) • the C shell (csh) • the Kmt shell (ksh). Each shell offers slighdy different features and capabilities. The Kom shell is compatible with the BoiU1le shell. The C shell is noL employ the strategy of paging rather than swapping. With paging, programs are still moved from memory to disk, but they are moved in a fixed page size rather than by moving the entire program. NESUG '90 Proceedings 204 Host Operating Systems 1/0 Redirection Most system commands either read from standard input (stdin) or write to standard output (stdout). By default, standard input and output are defmed as the terminal. You can redirect your input and output using the operating system. For example, the cat command is used to display standard inpuL You can use input redirection (< ) to specify a system fl.le as input, rather than stdin. For example: eat< mylile Output redirection (>) is used to specify another destination for the output from a command rather than stdouL For example: Is > contents This sends the output from the Is command to the fde named contents rather than to stdouL Pipes UNIX operating systems and derivatives uses the pipe facility (I) to allow one command to read the output from another command. For example, to display the current users a page at a time, you would use the following: wbolmore Shell Scripts A shell script, or shell program, is just a collection of system commands that are grouped together for a particular !ask. 'These commands are then stored in a file that has been marked as executable. The SAS System under UNIX Operating Systems and Derivatives Today, there are many "flavors" of the standard UNIX operating system: HP-UX, AIX, Ultrix, and so on; The SAS System currently supports the following platforms: • HP-UX™ The SAS System allows many features of UNIX operating sys~s and derivatives to be used during your SAS SCSSJon. An excellent example is the ability 10 use pipes to send and receive information from the SAS session 10 the operating system. This capability is available through the FILENAME statement in the SAS System. The syntax is FILENAME r~~erer pipe 'system_com mand'; If the fileref is used in the SAS FILE statement, then the SAS output is sent 10 the system command. If the fileref is used in the INFILE statement, the OUtput of the system command is read by the SAS System. To produce a listing of all users currently logged on to the system, you would use the foUowing code: FILENAME JN PIPE 'WHO'; DATA WHO; JNFILEJN; JNPUT WHO SCHAR80.; RUN; PROC PRINT DATA=WHO; TITLE 'USTING OF CURRENTLY LOGGED USERS'; RUN; The pipe facility can also be used to send information from the SAS System as input 10 a system command. For example, you can execute the following code 10 send data directly 10 a printer. FU.ENAME OUT PIPE 'lp -dc2700jll'; DATA .NULL..; FILE OUT; PUT 'DID IT WORK?'; RUN; Some practical examples using the pipe facility can • SunOS™ be found in "The SAS System under UNIX and • UL1RIX™ Derivative Operating Systems: New Features, New Power" in Proceedings of the Fourteenth Annual ·~ • 00/UX™ • DomainOS 10.2. NESUG '90 Proceedings SAS Users Group lnter1101ionDl Conference . Host Operating Systems 205 Future of the SAS System under UNIX Operating Systems and Derivatives The SAS System is continually evolving into a more powerful data management system. The features discussed so far are available with Release 6.03 of the SAS System. With the coming of Release 6JJ/ under UNIX operating systems and derivatives, more enhancements have been added. SAS/CONNECfTM is a new product for Release 6.06 under MVS and CMS and Release 6.07 under UNIX platfonns. Originally known as the Micro-to-Host Link, SAS/CONNECT has added new features and capabilities to the original product The product will continue to develop into a complete cooperative processing tool. For example, a workstation running the UNIX operating system or a derivative can be logically attached to a MVS mainframe to access production data stored in a DBMS table. This enables you to combine the power and storage facilities of a mainframe system with the flexibility of your workstation system. Another new feature that will be available in Release 6.07 is the SAS/GRAP~ Interactive Graphics Editor. This enhancement to SAS/GRAPH software will allow you to interactively modify graphics produced with a graphics procedure or the DATA Step Graphics Interface. To invoke the editor, bring up the graphics window and type EDIT or select Edit from the pull-down menu. Some functions available with the Graphics Editor are the ability to • move or resize an object • create, delete, or duplicate an object • save modifications in a graphics catalog • add text of UNIX operating systems and derivatives. This product will provide capabilities for exploratory data analysis through interactive graphs. SAS/INSIGHT software resembles the ~ software product currently available on Macintosh hardware. Unlike JMP software, SAS/INSIGHT software will be fully integrated into the SAS System. This will allow the output to be displayed or used as input to any SAS procedure. CONCLUSION The SAS System under UNIX operating systems and derivatives has evolved into a powerful data processing tool. With the system-dependent features available in baseS AS software as well as the new products to be available with Release 6.07, many functions have been provided to take advantage of UNIX operating systems and derivatives. References Johnson, Bernadette(1989), "The SAS System under UNIX and Derivative Operating Systems: New Features, New Power" in Proceedings of the Fowteenth Annual SAS Users Group International Conference, Cary, NC: SAS Institute Inc. UNIX is a registered trademark of AT&T. JMP, SAS, and SAS/GRAPH are registered trademarks and SAS/CONNECT and SAS/INSIGHT are trademarks of SAS Institute Inc. HP-UX is atrademark of Hewlett-Packard Company. SunOS is a trademark of Sun Microsystems, Inc. • change atuibutes of objects such as font, color, size, and so on ULTRIX is a uademark of Digital Equipment Cor- • include other graphs into existing graphs. AIX is a registered trademark of International Business Machines Corporation. Using the Graphics Editor in combination with the GIMPORT procedure provides the capability to combine graphs from other software packages with SAS/GRAPH OUipUL poration. 00/UX is a uademark of Data General Corporation. SAS/INSIGJ:ITTM is an additional new product that will first be available with Release 6.07 on platforms NESUG '90 Proceedings