Usage Note 3714: SAS informats that correspond to COBOL data descriptions
COBOL uses a picture clause for data description. The COBOL PICTURE
and USAGE are used to determine the data type and the corresponding
SAS informat. Pictures using an X represent character values.
Pictures using a 9 represent numeric values which may also contain a S
to indicate the value is signed and a V to show the location of an
implied decimal point. Pictures using a 9 that also contain a USAGE
or an S (signed) indicate the non-standard numeric type of the value.
The term non-standard numeric refers to numeric values such as packed
decimal, zoned decimal, real binary and integer binary.
The COBOL PICTURE describes the actual (resulting) width of the value
by the number of X's or 9's in the picture or by the number within
parentheses immediately after the X or 9. A character value with a
width of 5 is specified as: PIC XXXXX or PIC X(5).
The following table shows how the COBOL PICTURE and USAGE correspond
to SAS informats. Native system indicates the value is being read on
the same system which it was created. Non-native indicates the value
is in IBM (mainframe) format and is being read on a different (non
IBM) system.
NATIVE SYSTEM NON-NATIVE SYSTEM
COBOL PICTURE INFORMAT INFORMAT
------------- ------------- -----------------
PIC X(n) $w. or $CHARw. $EBCDICw.
PIC 9(int)V9(fract) w.d S370FF
PIC 9(int)V9(fract) COMP-3 PK or S370FPDU PK or S370FPDU
PIC S9(int)V9(fract) COMP-3 PD S370FPD
PIC 9(int)V9(fract) DISPLAY S370FZDU S370FZDU
PIC S9(int)V9(fract) DISPLAY ZD S370FZD
PIC S9(int)V9(fract) DISPLAY
SIGN LEADING S370FZDL S370FZDL
PIC S9(int)V9(fract) DISPLAY
SIGN LEADING SEPARATE S370FZDS S370FZDS
PIC S9(int)V9(fract) DISPLAY
SIGN TRAILING SEPARATE S370FZDT S370FZDT
PIC 9(int)V9(fract) COMP S370FIBU S370FIBU
PIC S9(int)V9(fract) COMP IB or PIB S370FIB or S370FPIB
no picture but usage COMP-1 RB4. S370FRB4.
no picture but usage COMP-2 RB8. S370FRB8.
Notes:
1. If the picture contains a signed numeric without a USAGE
then the USAGE type is DISPLAY.
2. The PK and S370FPDU informats both read unsigned packed
decimal, but the difference is that PK reads values which do
not contain a sign bit and that S370FPDU reads IBM mainframe
values which always contain an F as the sign in the
right-most bit.
3. The S370FIBU informat reads unsigned integer binary values
stored in IBM mainframe format. The PIB informat reads
positive integer binary values, treats all values as
positive and includes the sign bit as part of the value.
The S370FPIB informat reads positive integer binary values
stored in IBM mainframe format, treats all values as
positive and includes the sign bit as part of the value.
Use the following chart to determine the correct width and decimal
specification to use with the SAS informat:
USAGE WIDTH DECIMAL
----- ----- -------
DISPLAY (Zoned Decimal) (int+fract) (fract)
COMP-3 (Packed Decimal) CEIL((int+fract+1)/2) (fract)
COMP (Integer Binary):
if 1<=(int+fract)<=4 2 (fract)
if 5<=(int+fract)<=9 4 (fract)
if 10<=(int+fract)<=18 8 (fract)
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows 95/98 | 8 TS M0 | |
| Microsoft Windows NT Workstation | 8 TS M0 | |
| Microsoft Windows 2000 Server | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | |
| OpenVMS VAX | 8 TS M0 | |
| 64-bit Enabled Solaris | 8 TS M0 | |
| Solaris | 8 TS M0 | |
| IRIX | 8 TS M0 | |
| z/OS | 8 TS M0 | |
| OS/2 | 8 TS M0 | |
| HP-UX | 8 TS M0 | |
| ABI+ for Intel Architecture | 8 TS M0 | |
| CMS | 8 TS M0 | |
| 64-bit Enabled AIX | 8 TS M0 | |
| 64-bit Enabled HP-UX | 8 TS M0 | |
| OpenVMS Alpha | 8 TS M0 | |
| Tru64 UNIX | 8 TS M0 | |
| AIX | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | |
| Topic: | SAS Reference ==> Informats
|
| Date Modified: | 2000-10-27 13:37:00 |
| Date Created: | 2000-10-25 16:03:26 |