Technology Tales

Notes drawn from experiences in consumer and enterprise technology

11:54, 4th November 2019

Using Colours in R

The statistical programming language R provides multiple methods for specifying colours in visual outputs, including colour names, hexadecimal codes, RGB values in both 0-255 and 0.00-1.00 ranges and index numbers referencing a predefined list. A comprehensive list of 657 colour names, excluding white which appears first, is organised alphabetically and corresponds to specific index positions, with some duplicates to account for regional spelling variations or numbering conventions. This data are accessible through an embedded Google Sheet and available for download in Excel or PDF formats, licensed under a Creative Commons Attribution 4.0 International Licence, allowing free use and adaptation provided proper attribution is given to the source.

16:22, 18th October 2019

Raw SAS

The Raw SAS blog is a long-running resource covering the history and practical application of SAS software, spanning posts from 2012 through to 2025. It features a series of articles documenting early issues of "SAS Communications", a newsletter dating back to 1973 that chronicled the formative years of the SAS Project Group, including the transition of SAS into a private company, the emergence of early user groups and the development of successive SAS releases. Alongside this historical content, the blog also covers technical topics such as running SAS on CentOS, managing log locations and working with the SASjs framework, which includes a command-line interface, a server component and a library of over 200 documented macros aimed at SAS application developers.

15:41, 18th October 2019

Modernising Legacy SAS SCL / AF Applications

Legacy SAS/AF applications, developed using the SCL language within Base SAS, were widely used for creating user interfaces but faced challenges such as outdated user experience, security risks, scalability issues and limited support due to the rarity of SCL expertise. Modernisation efforts focus on migrating these applications to HTML5-based web apps, which integrate seamlessly with existing SAS infrastructure and leverage enterprise authentication mechanisms for security. This approach separates frontend design from backend SAS logic, enabling the reuse of core data processing components while replacing the original SCL interface with modern web technologies. A key tool in this transition is the SCL Transcoding Kit, which allows SCL code to be converted into SAS programs for execution in stored processes or job execution services, eliminating reliance on legacy catalogs and AF licences. This method preserves the functionality of original applications while improving maintainability, scalability and user interaction, ensuring continued operation within contemporary IT environments.

20:02, 6th September 2019

The COALESCE function: PROC SQL compared with PROC IML

The COALESCE function in SAS is designed to return the first non-missing value from a list of variables, streamlining processes that would otherwise require multiple conditional statements. An example illustrates its utility in selecting a valid phone number from several potential sources, such as a student's mother's, father's, or home phone number, by prioritising non-missing entries. This function is available in Base SAS and can be utilised within PROC IML, eliminating the need for custom code to replicate its functionality. By leveraging existing Base SAS capabilities, users can efficiently handle missing data across different procedures, demonstrating the flexibility of integrating foundational SAS tools into advanced analytical environments.

13:03, 31st August 2019

Groovy Tutorial

Groovy is an object-oriented, Java-based programming language that supports both static and dynamic typing, functional programming, operator overloading, regular expressions and native compatibility with markup languages such as XML and HTML. First released in January 2007, the language is fully interoperable with Java, allowing developers to use existing Java libraries, and it provides a strong environment for creating Domain-Specific Languages through in-language macros, AST transformations and meta-programming capabilities. It is considered relatively straightforward to learn, particularly for those already familiar with Java, and is used by major companies including Google, Microsoft, IBM, Amazon and Netflix. Experienced Groovy developers in America can command annual salaries of around $120,000, reflecting strong demand in the industry. Those wishing to get started with the language are advised to have a basic working knowledge of Java along with fundamental computing skills such as navigating directories and working with files.

20:23, 29th August 2019

How to set default Java version on Ubuntu / Debian

To set the default Java version on Ubuntu or Debian systems, users can first list installed versions using the update-java-alternatives --list command. They then select the desired version through the update-alternatives --config java interface, which allows manual configuration of the default interpreter. After making changes, the system's environment variables should be updated to reflect the new selection and the current version can be verified with java -version. This process ensures compatibility with applications requiring specific Java implementations and helps manage multiple versions installed on the same system.

14:14, 11th June 2019

JavaRanch

JavaRanch serves as a community hub for Java programming discussions, offering forums, learning resources and interactive elements such as games and book recommendations. The platform includes sections for troubleshooting, certification guidance and technical queries, alongside links to related topics like permaculture and sustainable living. A journal provides updates, articles and reviews, while the site maintains a focus on fostering collaboration among users through its structured yet approachable environment.

14:43, 22nd January 2019

How to change your working directory for SAS with the DLGCDIR DATA step function

The DLGCDIR DATA step function in SAS allows users to programmatically change the working directory for their SAS session, applicable to both Windows and UNIX/Linux environments, provided the specified directory exists and has write or update permissions. This function temporarily alters the working directory for the current session, though an autoexec file can be used to automate this change on subsequent SAS invocations. Users are advised to define output directories explicitly in ODS statements, as DLGCDIR does not affect these settings. Some limitations exist, such as the function not influencing directory listings accessed via INFILE pipes or the X command, which may require alternative workarounds like combining commands within the FILENAME statement or using the CALL SYSTEM function to ensure persistent directory changes across operations.

16:45, 16th January 2019

Working with Dates and Times Using the ISO 8601 Basic and Extended Notations

ISO 8601 is a standardised system for representing dates, times, durations and intervals, using a defined set of formatting symbols and notation styles. In SAS, both basic and extended notations are supported, with the basic form using compact sequences such as yyyymmdd or hhmmss, and the extended form introducing separators like hyphens and colons, for example yyyy-mm-dd or hh:mm:ss.

A range of named formats handles the writing of date, time and date-time values, including those with time zone offsets or UTC indicators, while separate formats manage durations and intervals derived from character data. Durations follow a structure beginning with P, with a T separating date and time components, and can be expressed either in fixed-length notation or using labelled components such as years, months and days. Where components are omitted, they can be represented using a hyphen or the letter x depending on the format used, and where lower-order components are zero or insignificant, values may be truncated at the last meaningful component.

SAS also normalises duration components that exceed their standard maximum values, carrying the overflow into the next higher component, though date-time values falling outside expected ranges produce an error rather than being normalised. Ending components in durations, date-time values and intervals may optionally include a fractional element, separated by a period or comma and followed by up to three digits.

11:25, 15th January 2019

Have you created Scalable Vector Graphics with SAS?

Scalable Vector Graphics (SVG) is a vector-based image format supported by modern web browsers that allows graphics to be scaled or resized without any loss of resolution, removing the need to produce multiple versions of the same image. SAS has supported SVG output through its SAS/GRAPH product since the SAS 9.2 release, with compatibility limited to traditional procedures such as PROC GPLOT and PROC GCHART. From SAS 9.3 onwards, Base SAS also gained the ability to produce SVG output through SG procedures like SGPLOT and SGPANEL, as well as through ODS Graphics. Output can be generated as a standalone SVG file, an HTML file or, in SAS 9.4, an HTML5 file with the SVG embedded directly within it. SAS 9.4 also introduced the ability to create animated SVG images for the web using the SVG device driver alongside new options on the OPTIONS statement, with support across a range of procedures including PROC GCHART, PROC GPLOT and PROC GMAP.

  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.