comp.soft-sys.sas - The SAS statistics package.
1. SAS and LSF
Hello, Does someone know if LSF v7 is supported by SAS? And does it work well with previous jobs definitions? Thks! Xavier
Hi all When using the Produc Suite for SAS (Process Manager Server and Client, and the Platform LSF) with the calendar: Is there a possibility to retrieve the calendar date from within a SAS job (NOT the execution date but the active date for this job in the calendar!) ? Thanks Patrick
Hi All, I have two problems, and I really hope you can help me. The first problem is that I want to take the Log of a time variable (format is hhmm6.), but the answer returned is wrong. I have used the following code: /* p is a time variable with format hh:mm5.*/ data 'C:\Vijay Data\Research project\Project\Data\craw4'; set craw3_1; ln_aa=log(p); format ln_aa hhmm5.; run; For example if p=45:00 (hh:mm) then ln_aa equals 00:00 (hh:mm) but I want it to read 3.807. The answer I want is in units of hours, how can I get this answer? The second problem is that I want manipulate data in a way that will allow me to use a formula. Let me clarify this by using an example, if I had two variables (x and y) and I want a data step to calculate the following equation: (Embedded image moved to file: pic09961.pcx) how would I do it? Any help would be grateful appreciated. Regards Vijay Reddi Senior Quality Assurance Statistician Tel:+44 (0)1223 423232 (235) Fax:+44 (0)1223 426926 _________________________________________________________________________________ The information contained in this e-mail is confidential and may be privileged. It is intended for the addressee only. If you are not the intended recipient, please delete this e-mail immediately. The contents of this e-mail must not be disclosed or copied without the consent of the sender. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the Company. The Company does not take any responsibility for the views of the author. No contracts may be concluded on behalf of the Company or any of it's subsidiaries or divisions by means of email communications. Although we have taken steps to ensure that this email and attachments are free from any virus, we cannot accept any responsibility for viruses so email attachments should be virus-checked on receipt.
Arthur, I don't think my code has problem either. However, when I mergered the 6 data files, the final data format shown some ID with the double line and some don't. I'm not sure how I can find the data format problem in the 6 files then solve it. When I check each data file, they look fine with their ID. Is it the problem to merge too many data files and multiple times? because some same variables are in different files. Thanks, could you or someone help me to solve the double line problem? Or if it is double line, how I could correct it in SAS? Thanks much. Jane Arthur Tabachneck < XXXX@XXXXX.COM > wrote: Jane, I ran your code, as shown below, and did obtain the results I think you are seeking: data f1; input id var1 var2 $; cards; 1.1 12 a 1.2 15 b ; data f2; input id var3 $ var4; cards; 1.1 f 1 1.2 m 2 ; data f3; input id var5 var6; cards; 1.1 120 0 1.2 100 1 ; data f1; set data1; proc sort; by id; data f2; set data2; proc sort; by id; data f3; set data3; proc sort; by id; data all; merge f1 f2 f3; by id; run; Results: Obs id var1 var2 var3 var4 var5 var6 1 1.1 12 a f 1 120 0 2 1.2 15 b m 2 100 1 Art ---------- On Tue, 26 Sep 2006 14:14:57 -0700, jn mao wrote: >I did use MERGE. Also I did sort by. > Thanks for your helps. > > My code is: > > data f1; > set data1; > proc sort; > by id; > > data f2; > set data2; > proc sort; > by id; > > data f3; > set data3; > proc sort; > by id; > > data all; > merge f1 f2 f3; > by id; > run; > > I'm not sure if merging data from too many files could cause ids mess up. If the final merged data file have the double line for the same id, how could I fix it with SAS code? > > Thanks, > Jane > > >Yu Zhang wrote: > Did you use MERGE By or SET BY? these two will give you different output. Base on what you need, Merge by should be used. > > Also, if you can provide your code, people here may unsderstand your problem better. > > > HTH > > > > On 9/26/06, jn mao wrote: Hello SAS-Ls, > >I have 6 data files from different data source for the same subjects, which means the 6 data files with different variables are for the same subjects. As I need diffenerent variables from different files, I merge them all together. They all have identical ids. However, when I did merge them by id, the double row for the same ID are happened and the different variables are saved in different row for the same subject. For eg, > >file 1 >id var1 var2 >1.1 12 a >1.2 15 b > >file 2 >id var3 var4 >1.1 f 1 >1.2 m 2 > >file 3 >id var5 var6 >1.1 120 0 >1.2 100 1 > >.... > >After I merge them, >data are >id var1 var2 var3 var4 var5 var6 >1.1 12 a . . . . >1.1 . . f 1 120 0 >1.2 15 b . . . . >1.2 . . m 2 100 1 > > I need all data on the same row for the each subject/each ID. Could someone help me solve it? Thank much. > >Jane > > > >--------------------------------- >Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. > > > > > >--------------------------------- >How low will we go? Check out Yahoo! Messenger low PC-to-Phone call rates. --------------------------------- Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.