MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Performance Tunning in SAS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
RajSanj
Beginner


Joined: 17 Mar 2006
Posts: 15
Topics: 7

PostPosted: Fri Mar 17, 2006 4:49 pm    Post subject: Performance Tunning in SAS Reply with quote

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
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Sun Mar 19, 2006 6:51 pm    Post subject: Reply with quote

RajSanj,

I guess you are NOT familiar with COMPRESS verb. It allows you to remove selected characters from a character value.

Check this link for a detailed explanation of the COMPRESS verb with examples

http://support.sas.com/ctx/samples/index.jsp?sid=823

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group