QDEVICE Procedure

Character Variable Lengths in Report Output Data Sets

When you create an output data set report, the length of the character variables are not always a fixed length. The length of each character variable is determined by the maximum length of the data for each variable in the report. In the following examples, the length of the NAME variable is 3 in the first data set. In the second data set, the length is 6.
proc qdevice out=first;
   device emf;
   var name;
run;
Here is a partial display of the data set properties:
The NAME Variable Has a Length of 3
The name in the SASEMF device has a length of 6.
proc qdevice out=second;
   device sasemf;
   var name;
run;
Here is a partial display of the data set properties:
The NAME Variable Has a Length of 6
In order to merge or concatenate these reports, you must use a LENGTH statement that is set to the maximum length of the two NAME variables:
data third;
   length name $6.;
   set first second;
run;