You are here: Fearntech »

Author : Admin

Querying SAS option status in Base SAS

Some SCL functions are available to Base SAS but you cannot use the SCL functions OPTGETN and OPTGETC to find out what the current status of certain SAS Options are.

In this case you can use the OPTSAVE and OPTLOAD Base SAS procedures.

For example, if you wanted to query the current MPRINT and NOTES option settings so that you could change the options temporarily and then return them to the original values then you could use the following Base SAS code:

* Retain the current MPRINT and NOTES options in a dataset *;
proc optsave out=_sysoptions (where=(optname in ('MPRINT' 'NOTES')));
run;

* Force the options to not display generated macro code/notes *;
options nomprint nonotes;

.. other SAS macro code here ...

* Reset the options back to their original values *;
proc optload data=_sysoptions;
run;

You might want to do this where an external SAS macro called a sub-macro and the external macro may have the MPRINT/NOMPRINT and NOTE/NONOTES options set. You could then force the options to not display macro code and program notes while the sub-macro is running, but return the settings to their original values after sub-macro execution is complete.

Samphire Cargo ‘brochure’ website launched

A simple ‘brochure’ style website has been launched for Samphire Cargo, a freight forwarding company located in Dover, UK. As a simple one page site, this site represented the perfect opportunity to try out the 960 grid system approach to prototyping and implementing websites. The 960 grid system makes it easier to translate Photoshop and Illustrator designs into a working website, meaning that the transition from a mockup in Photoshop to a working HTML/CSS document is quicker and means we can keep our prices down – very important in the current economic climate…

Fearntech Results System used for 2009 Canterbury 10 Mile Road Race

Our Results System developed in 2006 for local athletics club (Invicta East Kent Athletics Club) was successfully used again today for their big event of the year, the Barretts Canterbury 10 Mile Road Race. The event had nearly 1000 entrants this year, although the driving rain meant that the number running on the day was around 750. The men’s race was won by Adrian Mussett (Colchester Harriers) in a time of 0:52:31, the Ladies race was won by Helen Decker (Ipswich Jaffa Running Club) in a time of 1:00:23.

This year’s event was the first time that Invicta had used their new chip/tag electronic timing equipment which greatly increased the speed with which we were able to get the prize list out. In fact, we had 600 runners in the system before we had managed to enter 100 using the parallel manual recording system! The only complication was around 10 runners that either did not run with their tag or ran with it in their hand (needs to be attached to shoe), all of which were picked up by the manual recording.

All in all, a successful day for the race and for our own involvement. We have also picked up some enquiries about our new Sports Club website system from race participants, and development of this will be our key focus for our Sports sector work this year.

Using PROTECTSPECIALCHARS in SAS ODS to allow HTML tags

How to use PROTECTSPECIALCHARS to allow HTML tags in your data when using HTML ODS in SAS.

When sending output to the HTML destination using PROC REPORT a number of the usual attributes are not available. For example the FLOW attribute on the DEFINE statement. It can therefore be necessary to include HTML tags within the data to be interpreted when the HTML page is viewed in a browser.

The problem is that if for example you enter ‘<BR />’ into your data then SAS will protect the characters and your output will actually be converted into character entities eg. ‘&lt;BR /&gt;’. The solution is to use the protectspecialchars attribute within style definitions, which when set to OFF causes SAS to ignore special characters and output exactly as entered.

An example PROC REPORT statement is shown below, note how the protectspecialchars is only being applied to the data in this case and so any special characters in column headers will still be protected.

proc report data=mydata nowindows
style (header) = [font_face=helvetica font_size=2]
style (column) = [font_face=helvetica font_size=1
protectspecialchars=off];

Adding parameters to the OnAction property of Excel buttons

Sometimes you need to pass parameters via a button in Excel but the standard OnAction property syntax does not allow this. If you try .OnAction=”myProc(99,’Some text’)” you will receive an error. But there is a way to get around this.

You can add a parameter to the OnAction property of the button. If you had a procedure like this:

Sub myProc(id As Integer, myText As String)
MsgBox (id & " " & myText)
End Sub

You can set the OnAction property of a button as follows:

sheet1.Shapes(1).OnAction = "'myProc 99,""Some text""'"

Careful with the quotes and double quotes, you need single quotes around the entire procedure call and parameters, you need repeated double quotes around strings. Separate parameters with commas.

Kindergarten English teaching website launched

Website launched for Bee-Smart Englisch Für Kinder. German website offering English language tuition for Kindergarten children.