Chapter Contents

Previous

Next
SAS Companion for the CMS Environment

Considerations for Using Formats under CMS


EBCDIC and Character Data

The following character formats produce different results on different computing platforms, depending on which character-encoding system the platform uses. Because CMS uses the EBCDIC character-encoding system, all of the following formats convert data from EBCDIC.

These formats are not discussed in detail in this section because the EBCDIC character-encoding system is their only host-specific aspect.

$ASCIIw.
converts EBCDIC character data to ASCII character data.

$BINARYw.
converts EBCDIC character data to binary values.

$CHARw.
writes standard character data.

EBCDICw.
converts native format character data to EBCDIC representation.

$HEXw.
converts EBCDIC character data to hexadecimal data.

$OCTALw.
converts EBCDIC character data to octal data.

VARYINGw.
writes varying-length character values.

$w.
writes standard character data.

All the information that you need in order to use these formats under CMS is included in SAS Language Reference: Dictionary.


Floating-Point Number Format and Portability

The manner in which CMS stores floating-point numbers can affect your data. See Representation of Floating-Point Numbers for details.


Writing Binary Data

If a SAS program that writes binary data is run on only one type of machine, you can use the following native-mode formats. Native mode means that these formats use the byte-ordering system and floating-point representation which are standard for the machine.
IBw.d writes integer binary (fixed-point) values, including negative values, which are represented in twos complement notation
PDw.d writes data that are stored in the IBM packed decimal format
PIBw.d writes positive integer binary (fixed-point) values
RBw.d writes real binary (floating-point) data.
ZD writes zoned decimal data.

If you want to write SAS programs that can be run on multiple machines that use different byte-storage systems, then use the following IBM 370 formats:

S370FIBw.d
writes integer binary data in the IBM mainframe format

S370FIBU
writes unsigned integer binary data in the IBM mainframe format

S370FPDw.d
writes packed decimal data in the IBM mainframe format

S370FPDU
writes unsigned packed decimal data in the IBM mainframe format

S370FPIBw.d
writes positive integer binary data in the IBM mainframe format

S370FRBw.d
writes real binary data in the IBM mainframe format

S370FZD
writes zoned decimal data in the IBM mainframe format

S370FZDL
writes zoned decimal leading sign data in the IBM mainframe format

S370FZDS
writes zoned decimal separate leading sign data in the IBM mainframe format

S370FZDT
writes zoned decimal separate trailing sign data in the IBM mainframe format

S370FZDU
writes unsigned zoned decimal data in the IBM mainframe format.

These IBM 370 formats enable you to write SAS programs that can be run in any SAS environment, regardless of the standard for storing numeric data. They also enhance your ability to port raw data between host operating environments.

For more information about the IBM 370 formats, see SAS Language Reference: Dictionary.


Chapter Contents

Previous

Next

Top of Page

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