RMFSTAMPw. Informat

Reads time and date fields of RMF records.
Category: Date and Time

Syntax

RMFSTAMPw.

Syntax Description

w
specifies the width of the input field.
Requirement:w must be 8 because packed decimal time and date values in RMF records contain eight bytes of information: four bytes of time data that are followed by four bytes of date data.

Details

The RMFSTAMPw. informat reads packed decimal time and date values of RMF records that are produced by IBM mainframe systems, and converts the time and date values to SAS datetime values.
The general form of the time and date information in an RMF record in hexadecimal notation is 0hhmmssFccyydddF:
0
is the half byte that contains all binary 0s.
hh
is the one-byte representation of two digits that correspond to the hour of the day.
mm
is the one-byte representation of two digits that correspond to minutes.
ss
is 1 byte that represents two digits that correspond to seconds.
cc
is the one-byte representation of two digits that correspond to the century.
yy
is the one-byte representation of two digits that correspond to the year.
ddd
is the one-and-a-half bytes that contain three digits that correspond to the day of the year.
F
is the half byte that contains all binary 1s.
The century indicators 00 correspond to 1900, 01 to 2000, and 02 to 2100.
RMFSTAMPw. enables you to read, on any operating environment, packed decimal time and date values from files that are created on an IBM mainframe.

Comparisons

Both the RMFSTAMPw. informat and the PDTIMEw. informat read packed decimal values from RMF records. The RMFSTAMPw. informat reads both time and date values and results in a SAS datetime value. The PDTIMEw. informat reads only time values and results in a SAS time value.

Example

input begin: $hex16.;
y=input(begin, rmfstamp8.);
Data Line 1
Result
----+----1----+----2
0142225F2612200F
80550512545
1The data line is a hexadecimal representation of a binary time and date value that is stored in packed decimal form as it would appear in an RMF record. Each byte occupies one column of the input field. The result is a SAS datetime value that corresponds to July 18, 2012, 2:22.25 PM.