Reads data that are stored in IBM packed decimal format.
Category: | Numeric |
Interaction: | List input is incompatible with binary input when this informat is specified in an INFORMAT= statement or an ATTRIB= statement using the INFORMAT= argument. SAS issues a warning and uses formatted input to read the data. |
See: | PDw.d Informat: UNIX in SAS Companion for UNIX Environments |
PDw.d Informat: Windows in SAS Companion for Windows | |
PDw.d Informat: z/OS in SAS Companion for z/OS |
input @1 x pd4.;
Data Line 1
|
Result
|
---|---|
----+----1 |
|
0000128C |
128 |
1The data line is a hexadecimal representation of a binary number stored in packed decimal form. Each byte occupies one column of the input field. |
input x: $hex10.; mnth=input(x, pd5.); date=input(put(mnth,8.),mmddyy6.);
Data Line 1
|
Result
|
---|---|
----+----1 |
|
012252010C |
18621 |
1The data line is a hexadecimal representation of a binary number that is stored in packed decimal form on an IBM mainframe operating environment. Each byte occupies one column of the input field. The result is a SAS date value that corresponds to December 25, 2010. |