Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. smalek

    PROC SQL Pass through MS ACCESS

    Hello I have a number of tables residing in an MS ACCESS db which I would like to import into SAS without using the PROC IMPORT option. My code is as follows: Proc SQL; Connect to access (path='S:\LAB STATS 09_10.mdb'); Create table ed.test as select * from connection to access (select * from...
  2. smalek

    How to reference Macro Variable in PROC SQL

    Hi I have the following scenario. I am importing a number of files and running the same SAS code on them to obtain a workable format. I've elected to use macros in order to make the code more efficient. Here is basic layout of the code: %LET BBK=BBK_MAY; %LET BBK2=BBK_MAY2; %LET BBK3=BBK_MAY3...
  3. smalek

    Clean Imported Data

    The raw data file looks exactly as I had outlined above. Even after importing it into SAS it does not change. I need to clean it up such that it matches my desired output. S.
  4. smalek

    Clean Imported Data

    Hi I have a a raw data file when imported into SAS yields a data set with the following format: P_Num Mnemonic Methd Subsec Code Cnt 91000 SC1RPT GEL AB RPT 1...
  5. smalek

    Data formatting through infile

    Hi klaz2002 In fact the raw data file is setup such that 1 01603 TEST 1 03015 SPEC are on a separate line. Due to the number of records it would labourious to go through the raw file and bring these records back up the the parent entry. It is for this reason I would like to...
  6. smalek

    Data formatting through infile

    Hi I am importing a file through a data infile and the date field is coming in as * "01/04/09". I tried stripping the special characters with a number of manipulations but no success. Any thoughts? Also my infile is being imported in the following variable sequence Date Site...
  7. smalek

    Performing Comparisons between Observations

    WOW !!! Instant success. I never thought it would workout so easily. My sticking point was flagging the previous visits which you elegantly captured using the second proc sort. Thanks Klaz for your solution.
  8. smalek

    Performing Comparisons between Observations

    Hi I have the following data set: Pt# Visit# Time Type date X 01 1212 Adm 13/04/2009 X 02 2128 Trnsfr 13/04/2009 X 03 2258 Trnsfr 17/04/2009 X 04 2300 Trnsfr 17/04/2009 X 05 1244 Disch 18/04/2009 Y 01...
  9. smalek

    INFILE Query

    You are definitely right. It is bullet proof and it worked absolutely smoothly without any hiccups. Thanks again
  10. smalek

    INFILE Query

    Hi I have a raw file with the following layout "GERI"|""|"09/03/09"|"MA3"|"09/03/09"|""|""|""|""|"19/03/09" I woulid like to import the data directly into a data set by using infile. I wrote the following code but was unsuccessfull. data raw; infile 'test' DLM='|' DSD MISSOVER; input var1 $4...
  11. smalek

    Expand Data Set

    worked like a charm! Thanks ChrisW75
  12. smalek

    Expand Data Set

    Hi again I am back requesting help on data set expansion issue. Here is the current layout of the data: Code Value 001 15 005 25 225 10 Required output: Code Value CC 001 15 VC 001 15 VDL 001 15 FC 005...
  13. smalek

    Proc Means of Questions Sorted by Dimension

    Hi, I need some help with a problem I'm facing. I have list of questions sorted by dimension and service area. I would like to use proc means to output the list of questions with mean of questions within each dimension and service area. For example: Dimension Service Area Question Score...
  14. smalek

    Count of a specific value within a column

    Thanks kdt82 for your code. It was more efficient than my long proc means code.
  15. smalek

    Count of a specific value within a column

    Thanks for the postings klaz2002 and kdt82 but I forgot to mention a very important piece of the puzzle. The scores which fall under Ref1-4 can be either 0,1,3, or 9. My final aim is to get a count of only the score=1. For example Patient ID Ref1 Ref2 Ref3 Ref4 123564...
  16. smalek

    Count of a specific value within a column

    Hi I have a data set which contains Patient IDs and referral reasons Ref1-Ref12. The values which fall under Ref1 - Ref12 are either 1 or 0 (denoting ticked, not ticked). I would like to a breakdown of the referral reasons by the most popular and so on. Current Data set: Patient ID...
  17. smalek

    Compute Statistics for $char Variables

    Hello all, Im back this time with a question inregards to summary of $char variables. I have the following scenario: Stairs Residence CareGiver Sex Yes Appartment/Condo Yes M Yes House No F No Residential/Care...
  18. smalek

    Change displayed codes into explanation for a variable

    Hey Guys After wrestling with this problem for the past couple of days. I've decided to use proc format just becuase I found it easy to understand and code. I would like to thank dblan and ChrisW75 for their valuable posts. Cheers Guys
  19. smalek

    Change displayed codes into explanation for a variable

    Hello again I am reaching out this time to all you SAS pros for advice. I have variable with a list of codes in one file and data dictionary in another file. I would like to change it from codes to actual explanations. For example, Referral Source is being displayed in SAS table(imported) as...
  20. smalek

    Change Format of an Imported Variable

    dblan, thanks for your valuable reply. It worked like a charm Cheers

Part and Inventory Search

Back
Top