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 Chris Miller 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. sasbuddy

    SAS help

    Hi, Considering the files you are talking about are flat files; I can give you a hint. Follow the steps below, 1. Create a SAS dataset say beforeRun; by reading the complete single line into one variable (say txt_1) and create anohter varaible called obs_no which will have value of observation...
  2. sasbuddy

    show the first of the month

    This is simple Use INTNX() function. The syntax would look like this: strt_date = INTNX('month',logged_date,0,'B'); You can visit https://sites.google.com/site/sasbuddy/sas-date-function-intnx-with-example for further reference Regards, sasbuddy http://sites.google.com/site/sasbuddy/
  3. sasbuddy

    SASS Naming convenventions

    Hi As per my knowledge one can use Camel case naming convention in SAS. however while recognizing SAS doesn't care about the case of the variable names. You can follow the link http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001392879.htm sasbuddy...
  4. sasbuddy

    Hi, I was wondering if anyone co

    Hi, Its possible to do like that; What I understood from your information is that; there are series of steps which you want to carry out for diiferent values as output (say 10000 different values). You can do it as following; Step 1: Put all the code (series of steps in one macro lets say...
  5. sasbuddy

    Hi everyone, I am new in this forum

    Dear dearsamuna, Please look at the code I have provided at your other query regarding the same question. I am sure it will work; and all the best. sasbuddy http://sites.google.com/site/sasbuddy/
  6. sasbuddy

    Plzzz Need Help

    Hi, This can be done using the macro code. The sample code would be like below; data temp; infile datalines; input SampleId $11. sal dob mmddyy10. phone $9. ; datalines; 10-1xxx-001 37645 04/23/1978 728364539 10-2xxx-002 38746 05/23/1967 938746355 10-4yyy-511 49875 01/11/1987 938874653...
  7. sasbuddy

    sas coding

    Hi, It seems there no direct solution to this problem as your priname variable is of variable length. I suggest you to go back to the source program which generates your data file. If it is getting generated out of some DBMS, its easy to insert a proper delimiting character between two...
  8. sasbuddy

    Code for Multiple Occurrences

    Hi, I am not clear on the last part you have mentioned " The other reason it is wrong is because if procedure 2 and 3 are in the same episode then the "is blank" needs to address that epi3 should be "2" and not "1". " But for converting adding time into date; I can say the following. You have...
  9. sasbuddy

    using a macro variable to scan another macro variable

    I am not exactly clear with the requiremnt; But hopefully it would work fine using call symput instead of using %let in macro code. I would suggest use a data _NULL_ statement inside that use call symput plain scan function. sasbuddy http://sites.google.com/site/sasbuddy/
  10. sasbuddy

    Format Decimals Where One Doesn't Exist

    Many a times format in SAS wont directly get applied to EXCEL. Better use the format in EXCEL itself. sasbuddy http://sites.google.com/site/sasbuddy/
  11. sasbuddy

    Syntax error updating a table with a Join

    Hi It seems you are in some sort of confusion. Updateing a master dataset using a another dataset and Joining two datasets are completely distinct operations. In addition to that the code you have used do cater to any of those requirements. 1. for updating a master dataset using anohter...
  12. sasbuddy

    Date comparisions

    Are you sure you have the dataset called "AdmitDate" at your work library and Do you want to read the data from that Dataset? If yes then please change the order of input and set statement. sasbuddy http://sites.google.com/site/sasbuddy/
  13. sasbuddy

    proc sql update error expecting a set

    HI, Please try following code. PROC SQL; create table leads as select slmbrs.*, mbrs.pcpno, prov.parent, prov.pfstnam, prov.plstnam from WORK.leads slmbrs, DWH.MEMBERS mbrs, DWH.PROVIDER prov where slmbrs.HFMemberID = mbrs.membno and mbrs.pcpno = prov.provno; quit; data leads(drop=pcpno...
  14. sasbuddy

    proc sql update error expecting a set

    Hi, It seems there is problem with the syntax; you should you corelated subquery for this, as shown below. CODE : PROC SQL; UPDATE WORK.YODDAYODDA slmbrs SET slmbrs.pcpid = (select mbrs.pcpno where slmbrs.HFMemberID = mbrs.membno), slmbrs.pcpparent = (select prov.parent where mbrs.pcpno =...
  15. sasbuddy

    HOW TO RETAIN A VALUE IN A GROUP WHEN A CONDITION IS TRUE

    Refer the following program, for desired output. data t; input X Y $; cards; 1 A 1 A 1 A 1 D 1 J 2 B 2 B 2 D 2 C 2 C 3 A 3 D 4 A 4 B 4 D 4 C 4 D 4 R 4 R ; run; proc sort data =t; by X; run; data t (drop=flag); set t; retain flag 0; by x; if first.x...
  16. sasbuddy

    How to convert date in order to match another date?

    Hi Katrin IF you observe the PROC CONTENTS output; you can see that AdmitDate variable has got format datetime22.3 while HospDischDate havent got any format. But I dont see any reason which would create problem in any kind of calculations. Suppose you want to get difference between Hospital...
  17. sasbuddy

    Time format

    Request you to make sure that you use appropriate variables names. This should work. sasbuddy http://sites.google.com/site/sasbuddy/
  18. sasbuddy

    Time format

    There could be multiple ways to do it. Considering the input variable is in character format then you can use following expressions tm = timepart(dhms(00,substr(time,1,2),substr(time,3,2),00)); put tm =time8.; sasbuddy http://sites.google.com/site/sasbuddy/
  19. sasbuddy

    SAS/EG managing high volume of data and SAS/EG metadata managing high

    Hi As per as my knowledge is concerned; I can give you my opinions as folllows, About handling large volume of data - this capability depends on the background infrastructure i.e. work space server where SAS EG runs the code. It depends on the capacity of CPU and memory provided on that...
  20. sasbuddy

    Century Portion of Date Not Displaying Dates Correctly

    Hi, if your input data is like '310117' and if you read it using yymmdd6. format with YEARCUTOFF = 1920. then It will give the date as 1931-01-17 and if you have '130117' as source data then the output with above code is 2013-01-17. The way YEARCUTOFF option works is like; it takes next 100...

Part and Inventory Search

Back
Top