Abstracts for WUSS2009 Paper
Total Page:16
File Type:pdf, Size:1020Kb
Portable SAS®: Language and Platform Considerations Robert A. Cruz, Info-Mation Systems, Hollister, CA Portable SAS®: Language and Platform Considerations...............................................................................................1 Abstract .....................................................................................................................................................................1 Audience...............................................................................................................................................................1 O. Introduction...........................................................................................................................................................1 I. The Roots of Portability Issues...............................................................................................................................1 I.A Platforms.........................................................................................................................................................1 I.B What Do We Mean by “Portable” Software? ...................................................................................................2 II. Platform Differences..............................................................................................................................................2 II.A Hardware Differences.....................................................................................................................................2 II.B Software Differences......................................................................................................................................6 III. Base Language Considerations ...........................................................................................................................6 III.A Instruction Set Considerations ......................................................................................................................6 III.B Internal Memory Considerations ...................................................................................................................6 III.C Character Set Considerations .......................................................................................................................7 III.D Numeric Considerations..............................................................................................................................10 III.E INFORMAT and OUTFORMAT Considerations ..........................................................................................11 III.F Macro Language Considerations.................................................................................................................11 III.G PROC Considerations.................................................................................................................................11 II.H System, Statement, and PROC Options Considerations .............................................................................12 IV. Operating System Considerations .....................................................................................................................13 IV.A External Executables Considerations .........................................................................................................13 IV.B Other Platform-Specific Features................................................................................................................13 IV.C Isolating System Dependencies .................................................................................................................13 V. Creating Portable SAS Programs .......................................................................................................................14 V.A The Three-Pronged Strategy to Create a Portable SAS Program ...............................................................14 VI. Conclusion .........................................................................................................................................................15 Acknowledgements .................................................................................................................................................15 Recommended Reading..........................................................................................................................................16 Contact Information .................................................................................................................................................16 Trademarks, Brand and Product Names .................................................................................................................16 Appendix A: SAS Language Elements with Portability Considerations ..................................................................16 Endnotes .................................................................................................................................................................21 ABSTRACT Techniques for creating portable SAS programs will be discussed. Portable mainline code can be executed unchanged on multiple platforms. Requirements for Windows, Unix, and mainframe systems will be presented. Considerations include language features to use or avoid, and coding techniques to use or avoid. Issues to be dealt with include internal representation of characters and numbers. Techniques for addressing the peculiarities of each platform will be presented. Windows, Unix, and mainframe platforms will be covered. Interfacing to sequential files and databases will be covered, as will considerations for system commands and sort utility. Automated platform identification and adaptation by macros will be covered. Search Keywords: Portable SAS, Windows, Unix, MVS, CMS, PC, Server, Mainframe, Collation Operating System: ALL Applicable SAS Products: Base SAS AUDIENCE This presentation is of interest to Beginner, Intermediate, and Expert SAS users who must deal with portability issues. O. INTRODUCTION The objective of this paper is to familiarize the reader with those issues that impact the ability of a SAS program to function in the same manner when run on different computing platforms. Techniques for creating a portable program will be illustrated. These techniques include choices of base language elements, and an approach to structuring a SAS program to improve portability. I. THE ROOTS OF PORTABILITY ISSUES I.A PLATFORMS A computing platform is the combination of hardware and software that an application is executed on. This combination identifies the environment in which the program will run. The platform may be identified by a particular Page 1 of 21 Portable SAS: Language and Platform Considerations industry term, such as “Wintel” (the Windows operating system running on an Intel-compatible processor), or by implication. For example, citing “CMS” as the platform implies an operating system in the VM/CMS family running on IBM System/370-family hardware. Note that these are historical references, as the current version of this operating system is z/VM and the current hardware is the zSeries System 10. Very often, the required environment must be specified in more detail, giving a minimum amount of memory, and/or processor class, and/or storage capacity. Very often, a particular release of an operating system or other corequisite software is required, due to the exploitation of features available in that version of the OS. Examples of platforms are: 32-bit Windows running on an Intel-compatible CPU Windows running on an Alpha processor Linux running on an x86-class CPU Linux running on server-class hardware (it may also be necessary to specify which manufacturer’s hardware is in use) Linux running on an IBM mainframe (such as System z) MVS-family operating system (such as z/OS) running on an IBM mainframe (such as System z) CMS-family operating system (such as z/VM) running on an IBM mainframe (such as System z ) As you can see, neither the hardware nor operating system alone determines the platform. In SAS documentation, the equivalent term for platform is operating environment. SAS publishes a series of “Companion” manuals, one for each platform1. I.B WHAT DO WE MEAN BY “PORTABLE” SOFTWARE? The concept of “portability” in computing refers to the ability to move an application program from one computing platform to another without having to change it. Portable programs either do not involve platform aspects that differ from one platform to another, or take them into account. Some languages were created with portability as a design objective. An early example of this was the “P-code” system used by Pascal language compilers in the early- to mid-1970s2. Chief among these today is Java, which runs in a virtual machine that isolates the Java program from its platform. These virtual machines are themselves not portable, but they enable the Java applications which run within them to be portable. II. PLATFORM DIFFERENCES II.A HARDWARE DIFFERENCES II.A.1 Executable Instructions Hardware design concerns itself with data representation and instruction implementation. Hardware design has produced a number of differing approaches to instruction encoding, including CISC (Complex Instruction Set Computer), RISC (Reduced Instruction Set Computer), and VLIW (Very Long Instruction Words). It is not necessary to know the details of these instruction implementations to realize that they are quite different.