09-01-2015
JakeAZ
Calcite | Level 5
Member since
02-25-2012
- 10 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by JakeAZ
Subject Views Posted 1100 07-30-2012 08:32 AM 1214 07-29-2012 03:29 PM 1465 02-27-2012 11:57 AM 1465 02-26-2012 02:31 PM 2263 02-26-2012 01:15 PM 2263 02-26-2012 01:02 PM 2263 02-26-2012 12:03 PM 846 02-26-2012 05:28 AM 1633 02-25-2012 10:11 PM 2301 02-25-2012 08:35 PM -
Activity Feed for JakeAZ
- Posted Re: Hunting Down Problem Cases in a Large Data set on SAS Procedures. 07-30-2012 08:32 AM
- Posted Hunting Down Problem Cases in a Large Data set on SAS Procedures. 07-29-2012 03:29 PM
- Posted Re: ODS Reporting Questions on SAS Procedures. 02-27-2012 11:57 AM
- Posted Re: ODS Reporting Questions on SAS Procedures. 02-26-2012 02:31 PM
- Posted Re: Combining Variables on SAS Procedures. 02-26-2012 01:15 PM
- Posted Re: Combining Variables on SAS Procedures. 02-26-2012 01:02 PM
- Posted Re: Combining Variables on SAS Procedures. 02-26-2012 12:03 PM
- Posted ODS Reporting Questions on ODS and Base Reporting. 02-26-2012 05:28 AM
- Posted ODS Reporting Questions on SAS Procedures. 02-25-2012 10:11 PM
- Posted Combining Variables on SAS Procedures. 02-25-2012 08:35 PM
07-30-2012
08:32 AM
Thanks KSharp. By Blank/Null I am on referring to all the cases where CLOSE is . When I take the highest (MAX) CLOSINGS_ID. CASE_ID CLOSING_DT_1 CLOSING_DT_2 CLOSINGS_ID CLOSE 111 . ##### 1 7-Dec-11 111 7-Oct-11 . 2 7-Oct-11 111 . 3 . 111 . . 4 . So, when I take the MAX CLOSINGS_ID and group by CASE_ID I'm actually dropping a close date when I should pick it up. CASE_ID CLOSING_DT_1 CLOSING_DT_2 CLOSINGS_ID CLOSE 111 . . 4 . The output I need is just a data set. is the above helpful? Thanks.
... View more
07-29-2012
03:29 PM
Hi all-- I am working with a very large data set and I need to identify some problem cases. I have to find the cases which are being dropped where the MAX of CLOSINGS_ID for the CASE_ID group is BLANK/NULL and an earlier CLOSE date (a calculated variable) has been picked up. The cases I’m trying to hunt down look like this: CASE_ID CLOSING_DT_1 CLOSING_DT_2 CLOSINGS_ID CLOSE 111 . 7-Dec-11 1 7-Dec-11 111 7-Oct-11 . 2 7-Oct-11 111 . 3 . 111 . . 4 . I am using these two programs below. One with the HAVING clause and then one without the HAVING clause and then trying all sorts of different ways to combine them together to find with cases which are dropped when the have HAVING clause is used. I can’t figure it out. I just want a list of all these problem cases. Is there a way to do this is Base SAS as well as using Proc SQL as well? Any help is greatly appreciated!! Proc sql; create table With_HAVING as select distinct CASE_ ID, CLOSING_DT_1, CLOSING_DT_2 CLOSINGS_ID, case when CLOSING_DT_2 gt .then CLOSING_DT_2 when CLOSING_DT_1 gt . then CLOSING_DT_1 end as CLOSE from DATA_HAVE group by CASE_ ID, CLOSINGS_ID having CLOSINGS_ID =max(CLOSINGS_ID) ;quit; Proc sql; create table With_NO_HAVING as select distinct CASE_ ID, CLOSING_DT_1, CLOSING_DT_2 CLOSINGS_ID, case when CLOSING_DT_2 gt .then CLOSING_DT_2 when CLOSING_DT_1 gt . then CLOSING_DT_1 end as CLOSE from DATA_HAVE ;quit;
... View more
02-27-2012
11:57 AM
This is great. Thanks I'm sorry I have one last question. Some the sections in my report a not separating out properely and unding up under different titles. How do a let sas know to when to start I new page ? I'll have TITLE Section A Table 1 Table 2 Table 3 new page TITLE A table 4 table 6 but table 6 should be under Section B table 7 but table 7 should be under Section B next page TITLE Section B table 8 Here I question want Q1 and Q2 inn the servcies section proc tabulate data=Want (where=(question in('Q1','Q2'))); title 'SERVICES '; class question name responce; classlev question program_name responce1; tables Question=' ', name =' '*(n pagepctn*f=pctfmt.) all*(n pagepctn*f=pctfmt.), responce1=' ' all / row=float box={label='Count^{newline 1}Overall^_%}'; keylabel all='Total' n=' ' pagepctn=' '; keyword all n pagepctn; run; ***here I need to let sas know I want to start a new page for these tables but continue the page numbering*/ proc tabulate data=Want (where=(question in('Q5','Q7,Q10'))); title 'SERVICES '; class question name responce; classlev question name Responce1; tables Question=' ', name =' '*(n pagepctn*f=pctfmt.) all*(n pagepctn*f=pctfmt.), responc1=' ' all / row=float box={label='Count^{newline 1}Overall^_%}'; keylabel all='Total' n=' ' pagepctn=' '; keyword all n pagepctn; run;
... View more
02-26-2012
02:31 PM
Hi Cynthia. Thanks for your help. If you don't mind have some questions. 1. When I run this my proc tabulate tables beginning at the bottom of the title page. When I turn startpage to "no" only one table generates on each page. 2 I'm still having trouble with the page numbers. I can't seem to figure out how to start the numbering on the secound page. 3.if you have anymore adive on footers, that would be really great. here is my code: ods listing close; options leftmargin="1 in" topmargin="1 in" rightmargin="1 in"; options nodate number center ps=60 ls=150 pageno=1; title; ods pdf file='Z:\SAS\test.pdf' startpage=no; ods escapechar='^'; proc report data=work.Title noheader nowd style={rules=none frame=void just=r cellspacing=0 cellpadding=4pt}; column line; define line /right style(column)={font_weight=bold font_face=Arial foreground=black}; run; proc tabulate............................. Thanks again.
... View more
02-26-2012
01:15 PM
Hi. No not the sum. I just want to combine all the responces (no, yes, ect.) into one variable for each of the variable sets. this is what I want I trying to do: varA1 varA2 varA 3 VaraTotal offce1 yes yes no yes office2 no yes no no office2 yes yes no yes yes yes no no no Thank you for your help.
... View more
02-26-2012
01:02 PM
Hi Art. Thanks. It looks like it didn't work. When I ran your code each of the variables had a sum for all the responces and not the sperate responces. I tried this and i also does not work. data work.QAsFeq2 (keep=/*Quest_*/ Program_Name PhysicalT PhysicalOngT EducationT EducationOngT EmotionalT: EmotionalOngT SocialT SocialOngT); set work.QAsFeq; array a (*) Physical: ; array b (*) Education:; array c (*) Emotional:; array d (*) Social:; array e (*) PhysicalOng:; array f (*) EducationOng:; array g (*) EmotionalOng:; array h (*) SocialOng:; do i=1 to dim (*); PhysicalT=dim(a); EducationT=dim(b); EmotionalT=dim(c); SocialT=dim(d); PhysicalOngT=dim(e); EducationOngT=dim(f); EmotionalOngT=dim(g); SocialOngT=dim(h); output; end; run;
... View more
02-26-2012
12:03 PM
Hi Art. Thank you for your help. I have a question though. I am trying to write this so the code will count the amount of variables for me. I the I should use DIM but I'm not sire how to use it. data want (keep=Quest_ Program_Name PhysicalT PhysicalOngT EducationT EducationOngT EmotionalT: EmotionalOngT SocialT SocialOngT); set work.have array a (*) Physical: ; array b (*) Education:; array c (*) Emotional:; array d (*) Social:; array e (*) PhysicalOng:; array f (*) EducationOng:; array g (*) EmotionalOng:; array h (*) SocialOng:; do i=1 to dim(); PhysicalT=a(i); EducationT=b(i); EmotionalT=c(i); SocialT=d(i); PhysicalOngT=e(i); EducationOngT=f(i); EmotionalOngT=g(i); SocialOngT=f(i); output; end; run;
... View more
02-26-2012
05:28 AM
Hi-- I’ve put together a report, which uses a series of Proc tabulate statements. I’m having trouble figuring out a few basic finishing touches. I have been looking through the documentation and been having some trouble. I would like to have a cover page with the title of the report and with the title styled. I would like I footer with a text and the pagenumber left justified. So obviously I don’t want a page number on the cover page. Thanks!
... View more
02-25-2012
10:11 PM
Hi-- I’ve put together a report, which uses a series of Proc tabulate statements. I’m having trouble figuring out a few basic finishing touches. I have been looking through the documentation and been having some trouble. I would like to have a cover page with the title of the report and with the title styled. I would like I footer with a text and the pagenumber left justified. So obviously I don’t want a page number on the cover page. Thanks!
... View more
02-25-2012
08:35 PM
Hi-- I am relatively new to SAS and I'm stuck. I have a dataset with sets of variables, which have to be combined. You can see in the table below -- I have a varA set and a varB set. Office varA1 varA2 varA3 varB1 varB2 varB3 Office A Yes No . No No Yes Office B . Yes Sometimes Yes No No Office C No Sometimes Yes Yes . Yes Office D . Yes Yes Yes No No I need to combine all the varA’s into one variable and allthe varB’s into one variable. So, the data set should look like this: Office varATotal varBTotal Office A Yes No Office A No No Office A . Yes Office B . Yes Office B Yes No Office B Sometimes No Office C No Yes Office C Sometimes . Office C Yes Yes Office D . Yes Office D Yes No Office D Yes No The other part to this is that there are many datasets that I have to run, so varA could go up to 9 in one dataset but only be 3 in another. Any help is very appreciated. Thanks
... View more