Reading Variable-Length Records |
Reading Records with a Varying Number of
Fields |
When the execution phase is complete, you can use the PRINT
procedure to display the data set. The FORMAT statement associates the DATE9.
format with the variable
Date . |
proc print data=perm.health; format date date9.; run; |
Obs | ID | Index | Date | BP |
1 | 1234 | 6 | 13MAR1989 | 120/80 |
2 | 1443 | 6 | 12FEB1989 | 120/70 |
3 | 1443 | 21 | 03FEB1990 | 125/80 |
4 | 1443 | 36 | 07OCT1990 | 125/99 |
5 | 1681 | 6 | 11JAN1990 | 120/80 |
6 | 1681 | 21 | 05JUN1990 | 110/70 |
7 | 2034 | 6 | 19NOV1988 | 130/70 |
8 | 2034 | 21 | 12MAY1989 | 150/90 |
9 | 2034 | 36 | 23MAR1990 | 130/80 |
If you do not want to print the variable index ,
remember that you can use the DROP= option in the PRINT statement. |
proc print data=perm.health (drop=index); format date date9.; run; |
Obs | ID | Date | BP |
1 | 1234 | 13MAR1989 | 120/80 |
2 | 1443 | 12FEB1989 | 120/70 |
3 | 1443 | 03FEB1990 | 125/80 |
4 | 1443 | 07OCT1990 | 125/99 |
5 | 1681 | 11JAN1990 | 120/80 |
6 | 1681 | 05JUN1990 | 110/70 |
7 | 2034 | 19NOV1988 | 130/70 |
8 | 2034 | 12MAY1989 | 150/90 |
9 | 2034 | 23MAR1990 | 130/80 |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.