S370FPDw.d Informat
Reads packed data in IBM mainframe format.
| Categories: | CAS |
|---|---|
| Numeric | |
| Interaction: | List input is incompatible with binary input when this informat is specified in an INFORMAT= statement or an ATTRIB= statement that uses the INFORMAT= argument. SAS issues a warning and uses formatted input to read the data. |
| Note: | Beginning in 2025.12, this informat supports the BIGINT data type when run in the DS2 language. Set BIGINTPROCESSING=YES to ensure that large integer values—stored as BIGINT—are displayed with full precision, up to 19 digits, without rounding or truncation. BIGINTPROCESSING=YES is recommended for large values that exceed 15–16 digits. |
Table of Contents
Syntax
Syntax Description
w
specifies the width of the input field.
| Default | 1 |
|---|---|
| Range | 1–16 |
d
specifies the power of 10 by which to divide the value. This argument is optional.
| Default | 0 |
|---|---|
| Range | 0–31 |
Details
Packed decimal data contains two digits per byte, but only one digit in the input field represents the sign. The last half of the last byte indicates the sign: a C or an F for positive numbers and a D for negative numbers.
Use S370FPDw.d to read packed decimal data from IBM mainframe files in other operating environments.
Comparisons
- If you use SAS on an IBM mainframe, the S370FPDw.d and PDw.d informats are identical.
- The following table
compares the equivalent packed decimal notation by programming language:
Language
Packed Decimal Notation
SAS
S370FPD4.
PL/I
FIXED DEC(7,0)
COBOL
COMP-3 PIC 9(7)
assembler
PL4
Example
The variable in this example is a hexadecimal representation of a binary number that is stored in packed decimal form. Each two hexadecimal characters correspond to 1 byte of binary data, and each byte corresponds to one column of the input field.
data _null_;
a=input('12345F'x,s370fpd3.);
put a=;
run;
SAS writes the following output to the log:
a=12345