RajSanj Beginner
Joined: 17 Mar 2006 Posts: 15 Topics: 7
|
Posted: Fri Mar 17, 2006 4:49 pm Post subject: Performance Tunning in SAS |
|
|
Hi,
I was looking at making my code in SAS more efficient. Just wanted to know if by using PUT statement immediately after the compress statement, will we do away with the overhead of uncomppressing the data before the read?
Below is the sample code to explain in detail:
Code: |
LENGTH FLD1-FLD2 $30;
INFILE INFILE MISSOVER DELIMITER = ',' DSD;
FILE OUTFILE;
INPUT FLD1-FLD2;
FLD1 = UPCASE(FLD1 );
FLD2 = UPCASE(FLD2 );
FLD2 = COMPRESS(FLD2,'"');
IF SUBSTR(FLD1,1,10) NE 'FILENUMBER' THEN
DO;
PUT @1 FLD1 $CHAR15.
@16 FLD2 $CHAR30.;
END;
|
FLD2 is compressed & later on down the line FLD1 & FLD2 is being read.
My intepretation is since we are compressing the data & again reading the same down the line, the data might be needed to be un-compressed which is definitely is not good from performance point of view. But if we are using PUT statement will we need to uncompress the data?
Thanks & Regards,
Rajeev |
|