03-02-2021
JerryLeBreton
Pyrite | Level 9
Member since
07-14-2013
- 88 Posts
- 1 Likes Given
- 7 Solutions
- 55 Likes Received
-
Latest posts by JerryLeBreton
Subject Views Posted 670 05-15-2018 03:08 AM 1770 04-26-2018 11:31 PM 1811 04-26-2018 07:03 PM 1531 12-11-2016 11:31 PM 1555 12-08-2016 10:22 PM 15144 05-24-2016 10:04 PM 2595 05-24-2016 07:51 PM 2274 05-24-2016 12:04 AM 2628 05-23-2016 09:12 PM 3204 05-23-2016 12:18 AM -
Activity Feed for JerryLeBreton
- Got a Like for Re: External HTML and Proc Stream, how to remove all streamDelim newline?. 09-23-2022 02:08 PM
- Got a Like for Re: can I display 2 proc tabs side by side?. 04-27-2021 10:15 AM
- Posted Stored Process not executing automatically in VA report on SAS Visual Analytics. 05-15-2018 03:08 AM
- Posted Re: Colouring proc tabulate columns by column classification value on SAS Programming. 04-26-2018 11:31 PM
- Posted Colouring proc tabulate columns by column classification value on SAS Programming. 04-26-2018 07:03 PM
- Got a Like for Re: how to combine multiple observations into one. 08-15-2017 04:54 PM
- Posted Re: Capturing, and displaying, Crosstab selection values on SAS Visual Analytics. 12-11-2016 11:31 PM
- Posted Capturing, and displaying, Crosstab selection values on SAS Visual Analytics. 12-08-2016 10:22 PM
- Got a Like for Re: Parsing CamelCase. 06-02-2016 01:53 PM
- Got a Like for Re: How to Merge Two Datasets with Different Variables, but ResponseIDs in Different Orders. 05-24-2016 10:10 PM
- Posted Re: How to Merge Two Datasets with Different Variables, but ResponseIDs in Different Orders on SAS Data Management. 05-24-2016 10:04 PM
- Posted Re: Parsing CamelCase on SAS Programming. 05-24-2016 07:51 PM
- Got a Like for Re: PROC TRANSPOSE with conditions. 05-24-2016 11:18 AM
- Posted Re: exclude records on SAS Programming. 05-24-2016 12:04 AM
- Got a Like for Re: Parsing CamelCase. 05-23-2016 09:17 PM
- Posted Re: Parsing CamelCase on SAS Programming. 05-23-2016 09:12 PM
- Liked Re: PROC TRANSPOSE with conditions for Tom. 05-23-2016 01:57 AM
- Got a Like for Re: PROC TRANSPOSE with conditions. 05-23-2016 12:21 AM
- Posted Re: PROC TRANSPOSE with conditions on SAS Programming. 05-23-2016 12:18 AM
- Got a Like for Re: How Do I Sum a column that is a calculated by two other columns. 05-18-2016 12:31 AM
-
Posts I Liked
Subject Likes Author Latest Post 3 -
My Liked Posts
Subject Likes Posted 1 12-10-2015 11:12 PM 1 12-07-2015 06:26 PM 1 11-25-2013 07:35 PM 1 05-24-2016 07:51 PM 2 05-24-2016 10:04 PM
03-04-2021
09:46 AM
What if none of the variable are the same... meaning if we didn't have responsIDs in both table and only one table.
... View more
05-15-2018
03:08 AM
Hi All I have added a stored process object to the first tab/section of a VA (7.1) report. And it will not run automatically when the report starts up. The stored process (it has no prompts) will run, and display its output, just fine when another object is selected or the section is otherwise refreshed. And if it is moved to another section it also executes as soon as that tab is opened (but I need it on the initial tab). Any ideas?? Thanks Jerry
... View more
04-27-2018
12:46 PM
Hi: Well, the nice thing about PROC REPORT is that you can calculate just about any numbers with any formula and not just pctsum<denom>. Here are a bunch of PROC REPORT and ODS papers that might help you: Booth, Allison McMahill. 2010. "Evolve from a Carpenter’s Apprentice to a Master Woodworker: Creating a Plan for Your Reports and Avoiding Common Pitfalls in REPORT Procedure Coding." Link: http://support.sas.com/resources/papers/proceedings10/133-2010.pdf. Booth, Allison McMahill. 2011. "Beyond the Basics: Advanced REPORT Procedure Tips and Tricks Updated for SAS 9.2." Link: http://support.sas.com/resources/papers/proceedings11/246-2011.pdf. Booth, Allison McMahill. 2012. "PROC REPORT Unwrapped: Exploring the Secrets behind One of the Most Popular Procedures in Base SAS Software." Link: http://www.pharmasug.org/proceedings/2012/TF/PharmaSUG-2012-TF20-SAS.pdf. Booth, Allison McMahill. 2007. "Beyond the Basics: Advanced PROC REPORT Tips and Tricks." Link: http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf. Eslinger, Jane. 2015. "The REPORT Procedure: A Primer for the Compute Block." Link: https://support.sas.com/resources/papers/proceedings15/SAS1642-2015.pdf. Zender, Cynthia L. 2008. "Creating Complex Reports." Link: http://www2.sas.com/proceedings/forum2008/173-2008.pdf. Zender, Cynthia L., and Allison M. Booth. 2013. "Turn Your Plain Report into a Painted Report Using ODS Styles." Link: http://support.sas.com/resources/papers/proceedings13/366-2013.pdf. Zender, Cynthia L. 2014. "Paper SAS388-2014, Sailing Over the ACROSS Hurdle in PROC REPORT." Link: http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf. Zender, Cynthia L. 2008. "Creating Complex Reports." Link: http://www2.sas.com/proceedings/forum2008/173-2008.pdf Zender, Cynthia L. 2017. "Paper SAS431-2017 Go Ahead and _BREAK_-down: Advanced COMPUTE Block Examples" Link: https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf Zender, Cynthia L. 2014. "That's All Right: More Complex Reports" Link: http://support.sas.com/resources/papers/proceedings16/SAS5762-2016.pdf Cynthia
... View more
12-12-2016
01:49 AM
Hi Jerry,
It's unfortunate to hear you're not able to achieve what you need. Did you look at Tricia's post where she used text for KPIs in a dashboard from a pie chart object? The same could be done for a title using a precision layout on the section.
Hope me this helps or another member has alternative suggestions.
Kind Regards,
Michelle
... View more
05-24-2016
07:51 PM
1 Like
@dhrumil_patel wrote: A couple questions: (1) Why do you have to start at the second character position? (2) Does a blank argument for the charlist include all alphanumeric character? (Couldn't find this answer in the SAS Documentation of the findc function.) If you start at the first character, the answer will include the Make of the vehicle. And leaving the charlist argument blank effectively means 'any character(s)'. The modifiers U and S stipulate what to search for. The doco for the FINDC function is quite good. @Oh, and use @FreelanceReinhard 's suggestion to wrap a LEFT function around the result to finish the job properly.
... View more
05-23-2016
06:32 PM
1 Like
Why use proc transpose?
data HAVE;
input PATIENT_ID:$3. VISIT_CODE $ 7.;
cards;
101 LP28M72
101 LP23M66
101 LP22M64
101 LP29M64
102 SR66F76
102 SR62F76
102 SR61F76
102 SR69F76
102 SR77F76
103 JH23F56
103 JH43F56
run;
data WANT;
array VAR [3] $7;
retain VAR:;
set HAVE;
by PATIENT_ID;
keep PATIENT_ID VAR:;
if first.PATIENT_ID | VISIT_NB=3 then VISIT_NB=0;
VISIT_NB+1;
VAR[VISIT_NB]=VISIT_CODE;
if last.PATIENT_ID | VISIT_NB=3 then do;
do while (VISIT_NB < 3);
VISIT_NB+1;
VAR[VISIT_NB]='UNUSED';
end;
output;
end;
run;
... View more
05-12-2016
02:52 AM
1 Like
And just for fun, and improved performance, you should be able to do the whole job with PROC REPORT: proc report data=CARTEL.Employee_Telephony_agg out=final_aec(drop=_break_) ;
where QUEUE_CD in ('NAT_AEC' 'NAT_AEI' 'NAT_BVL' 'CLK_AECa_AustElectoralCommissionFedElectionServ')
and EVENT_DT >='02May2016'd;
col EVENT_DT TOTAL_CALLS TALK_TIME WORK_TIME HOLD_TIME EXTENDED_WORK_TIME AHT;
define event_dt / group;
define TOTAL_CALLS / analysis sum ;
define TALK_TIME / noprint analysis sum ;
define WORK_TIME / noprint analysis sum ;
define HOLD_TIME / noprint analysis sum ;
define EXTENDED_WORK_TIME / noprint analysis sum ;
define AHT / computed format=mmss.;
compute AHT ;
AHT = sum(TALK_TIME.sum, WORK_TIME.sum, HOLD_TIME.sum, EXTENDED_WORK_TIME.sum) / TOTAL_CALLS.sum;
endcomp;
rbreak after / summarize;
run; (Not tested)
... View more
03-09-2016
10:22 AM
Dear PG, I have used the above code on a simple report, is there any possible way that I can do the same thing on multiple reports at a time by merging them and using a seperate column called title based on word search to categorise which document the word was from. Thank You Bhavana
... View more
12-10-2015
11:12 PM
1 Like
Not sure exactly how you have the components stitched together, but have you come across this excellent paper: http://support.sas.com/resources/papers/proceedings14/1738-2014.pdf . I found it a really useful as I was getting to grips with proc stream.
... View more
12-09-2015
04:30 PM
@JerryLeBreton, that is a great idea.. the community team and I were talking about doing just that soon.
Thanks for all the suggestions 🙂
Lainie
... View more
12-08-2015
06:15 PM
Well that was a brain buster but here is , I have style=[font_size=3 ] sprinkled all over the place to get it done ods layout gridded width=12in columns=2 ; ods region width=5in; proc tabulate data=WORK.HRIR99991 style=[font_size=3 ]; class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC; classlev BUSINESS_UNIT_DESC / style=[font_size=3]; keylabel Sum = " "; keyword n / style=[font_size=3]; table BUSINESS_UNIT_DESC=' ' * {style=[font_size=3 ]} ALL=' ' * {style=[font_weight=bold font_size=3 ]}, N='Count'/ contents = ' ' misstext=' ' box={label="Record Count" style=[font_size=3 ]} ; run; ods region width=5in; proc tabulate data=WORK.HRIR99991 missing contents = ' ' style=[font_size=3 ]; class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC; classlev BUSINESS_UNIT_DESC / style=[font_size=3]; var fte / style=[font_size=3]; keylabel Sum = " "; table BUSINESS_UNIT_DESC=' ' * {style=[font_size=3 ]} ALL=' ' * {style=[font_weight=bold font_size=3 ]}, fte/ contents = ' ' misstext=' ' box={label="FTE COUNT" style=[font_size=3 ]}; run; ods layout end;
... View more
12-08-2015
10:26 AM
Here is a slightly modified version that will take care of wrong dataset/variable name:
%macro vtype(dsname=, varname=);
%if %sysfunc(exist(&dsname)) %then %do;
%let dsid = %sysfunc(open(&dsname));
%let varnum = %sysfunc(varnum(&dsid,&varname));
%if &varnum <=0 %then %do;
%put W A R N I N G: VARNAME parameter is invalid Please pass appropriate values.;
%end;
%else %do;
%let vartyp = %sysfunc(vartype(&dsid,&varnum));
%if &vartyp = C %then %do;
%let outputflag=Charater;
%end;
%else %if &vartyp = N %then %do;
%let outputflag=Numeric;
%end;
proc sql noprint;
select count(*) into :notmissing from &dsname where &varname is not missing;
quit;
%if ¬missing = 0 %then %put W A R N I N G: All &varname &outputflag. values are missing;
%else %do; %put N O T E: Atleast some &varname &outputflag. values are not missing; %end;
%end;
%end;
%else %put W A R N I N G: DSNAME parameter is invalid Please pass appropriate values.;
%mend vtype;
... View more
12-02-2015
09:31 AM
Jerry you are a genious, thanks it worked, I will add this to my coding tips list
... View more