comp.soft-sys.sas - The SAS statistics package.
Hi all Is it possible to debug a SAS program in SEG, like the option /debug in SAS ? I have SEG 2.1 on Windows and SAS 9.1.3 on UNIX. Thanks Christophe Paratte www.paratte.net
> %do i=1 %to 4; > var&i.=itm(&i.); this resolves to: var4=itm(4); whereas the dimension of your array is hardcoded as 3 > %a(array=%str(array itm(3) sbp_bc sbp_be sbp_bx ),ord=1); Ron Fehd the array or macro maven CDC Atlanta GA USA RJF2 at cdc dot gov > -----Original Message----- > From: Rathindronath > I have a part of a program as follows: > > %macro a(array=,ord=); > %do i=1 %to 4; > data g&i.(keep=patid var&i.) ; > &array.; > set part&ord.; > var&i.=itm(&i.); > run; > > proc summary data=g&i. nway; > var var&i.; > output out=mn&i.(drop=_type_ _freq_) n=n mean=mean std=std > median=med > min=min max=max; > run; > > proc transpose data=mn&i. out=tmn&i.(rename=(col1=col&i.)); > run; > > data tmn&i.; > set tmn&i.; > if upcase(_name_)='N' then order=1; > else if upcase(_name_)='MEAN' then order=2; > else if upcase(_name_)='STD' then order=3; > else if upcase(_name_)='MED' then order=4; > else if upcase(_name_)='MIN' then order=5; > else if upcase(_name_)='MAX' then order=6; > run; > > proc sort data=tmn&i.; > by order; > run; > %end; > > data all&ord.; > merge %do i=1 %to 4; > tmn&i. > %end;; > by order; > item=&ord.; > run; > > %mend; > %a(array=%str(array itm(3) sbp_bc sbp_be sbp_bx ),ord=1); > %a(array=%str(array itm(3) dbp_bc dbp_be dbp_bx ),ord=2); > %a(array=%str(array itm(3) hrt_bc hrt_be hrt_bx ),ord=3); > %a(array=%str(array itm(3) temp_bc temp_be temp_bx ),ord=4); > > > > I HAVE THE FOLLOWING ERROR FOR EACH MACRO: > > > ERROR: Array subscript out of range at line 13 column 78. > sbp_bc=124 sbp_be=111 sbp_bx=112 PATID=10001 SITE=10 var4= > _ERROR_=1 _N_=1 > NOTE: The SAS System stopped processing this step because of errors. > NOTE: There were 1 observations read from the data set WORK.PART1. > WARNING: The data set WORK.G4 may be incomplete. When this step was > stopped there were 0 observations and 2 variables. > NOTE: DATA statement used: > real time 0.01 seconds > cpu time 0.01 seconds > > > HOW CAN I FIX THE ERROR? THANKS EVERYONE > >
I think this is what I would expect. There is no love lost between the space on my hard drive and BMP files. I find them to be extremely inefficient and prefer one of the compressed formats, selecting the level of compression the task will bear. This also means I specify an output file name and use an appropriate SAS/Graph driver for the output. The default behaviour is useful only to demonstrate that the graph generation works and that the email engine is correctly configured. Depending on an approach that delivers bloat mails puts my work at risk of not being read due to file sizes and email filtering rules. So in answer to question 1; no. Which means that my answer to question 2 is also no. You should bear in mind though that I don't consider my work to be part of the "average" community, especially when so many people are performing D & M stat analyses, and a lot of others produce ad-hoc and one-off analysis and reporting. Good luck in solving your issue. Kind regards David -----Original Message----- From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of Nat Wooding Sent: Wednesday, 15 August 2007 12:32 AM To: XXXX@XXXXX.COM Subject: Emailing SAS Graphs using the pull down option -- SAS 9.1 under Windows Version: 9.1, TS1M3 under Win XP Pro If one creates a graph using SAS Graph and then clicks on File/Send Mail. a new message will be created in one's email system and the graph will appear as an attached BMP file. This is a nice feature since the alternative would be to export the file, go to email, open a new message, and attach the file. However -- and this is my main gripe -- there appears to be no option for naming the attached file. A second gripe is that one can only add one graph using this feature. Question1: Does anyone else use this method of emailing a graph Question2: Are you, too, bugged by this limitation in naming the attachment. I have opened a track with tech support (US 6611975) but I thought that I would poll the group and see what the SAS community feelings are. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 ----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
Hi all, We are trying to use this option to pass user context information to the database for Fine Grain Access Control. We were able to pass a simple insert statement through this method that inserts a number in table as: DBLIBINIT='Insert into Y values (3)' This works also: DBLIBINIT='BEGIN epi.ins_num(3); END;' We were not able to pass an insert that uses a character value like: DBLIBINIT='Insert into Y values ('A')' DBLIBINIT='BEGIN epi.ins_char('A'); END;' It doesn't seem to matter how we quote the value. Our actual requirement is to pass this: DBLIBINIT= 'BEGIN epi.epi_clearance ('STD','20083','SE'); END;' Can somebody explain what the solution is for this?