73 data a;
74 infile '/folders/myfolders/a.txt';
75 input ID $3. Gender $ age salary A1 A2 A3 A4 A5;
76 run;
NOTE: The infile '/folders/myfolders/a.txt' is:
Filename=/folders/myfolders/a.txt,
Owner Name=root,Group Name=vboxsf,
Access Permission=-rwxrwx---,
Last Modified=29Oct2019:20:16:44,
File Size (bytes)=183
NOTE: 8 records were read from the infile '/folders/myfolders/a.txt'.
The minimum record length was 0.
The maximum record length was 25.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.A has 7 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
77
78 proc format;
79 value $gender 'M' = 'Male'
80 'F' = 'Female'
81 ' ' = 'Not Entered'
82 other = 'Miscoded';
NOTE: Format $GENDER is already on the library WORK.FORMATS.
NOTE: Format $GENDER has been output.
83
84 value age low-29 = 'Less than 30'
85 30-50 = '30 to 50'
86 51-high = '51+';
NOTE: Format AGE is already on the library WORK.FORMATS.
NOTE: Format AGE has been output.
87
88 value A1 '1' = 'Strongly Disagree'
ERROR: The format name A1 ends in a number, which is invalid.
89 2 = 'Disagree'
90 3 = 'No Opinion'
91 4 = 'Agree'
92 5 = 'Strongly Agree';
NOTE: The previous statement has been deleted.
93
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
94 proc print data=a noobs;
95 var id gender age salary A1-A5;
96 format
97 gender $gender.
98 age age.
99 salary dollar11.2
100 A1 A1.;
101
102
103 run;
NOTE: There were 7 observations read from the data set WORK.A.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.09 seconds
cpu time 0.09 seconds
104
105 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
117