I had a difference using PC SAS 9.2 and EG SAS 4.2 that came up the other day with my co-workers. We often have to repeat a variable name while using the Proc Print statement. We found these differences and were wondering if you guys/girls had picked-up this repeating variable before today.
Program and text using SAS EG 4.2:
After checking all boxes of the result formats (SAS report, HTML, PDF, RTF and Text output) on Results General Panel, I then ran the SAS program in SAS EG 4.2. Here are the results for all result formats:
1. SAS Report- rename variable if a variable is listed more than once in PROC PRINT statement. So, we have variables x1, x12, x122, x3, x4, x32. Notice variable x122 is printing variable x1 but it could not label it x12 because that variable exists.
2. HTML-Printed the variables as SAS 9.2.
3. PDF –Printed the variables as SAS 9.2.
4. RTF –Printed the variables as SAS 9.2.
5. Text output- dropped the variable if a variable is listed more than once in PROC PRINT statement. So for Text output the variables are X1, x12, x3, x4.
As you can see, I got the same output for HTML format, PDF format and RTF format. However, SAS report does rename variable if a variable is listed more than once in PROC PRINT statement. On the other hand, Text Report drops the additional variable if a variable is listed more than once in PROC PRINT statement.
I do not know the reason why SAS report format and Text Report format print differently. I think there is a reason for that.
Maybe, you will take this program and try running it in SAS 9.2 and EG 4.2!
The "list data" task will not allow you to use the same variable more than once in an EGuide generated PRINT task, so I'm assuming that SassyGirl is using the programming interface to generate the output. If so, then all the work is being done by SAS 9.2 and the only addition that EGuide may make is to append some pre- or post- code.
I don't have EGuide 4.1 installed currently, but I believe that same behavior existed there.