Technology Tales

Notes drawn from experiences in consumer and enterprise technology

19:55, 21st March 2017

Free and open SAS references/documentation

SAS provides extensive documentation and learning resources through its official support website, which includes training materials, certification information and community forums. Additional platforms such as lexjansen.com offer user-generated papers from global conferences, while websites like robslink.com and GitHub repositories host practical examples and open-source tools. Video tutorials and community discussions further enhance accessibility to SAS knowledge, with users frequently contributing supplementary resources such as forums, blogs and historical archives. These collective efforts aim to support both novice and experienced users in mastering SAS through shared expertise and diverse learning materials.

18:23, 31st January 2017

ODS GRAPHICS Statement

The ODS GRAPHICS statement in SAS enables the creation of graphs through ODS by allowing users to activate or deactivate graphical output using the ON or OFF options. It provides various settings to customise graph appearance, including antialiasing for smoother visuals, border settings, dimensions for height and width, image format specifications and controls for tooltips and legends. Some options, such as antialiasing, are disabled by default for performance reasons when dealing with large datasets, while others like image format and maximum legend area can be adjusted to suit specific requirements. The statement also includes reset functions to revert settings to their default values, and its behaviour may vary depending on system configurations and output destinations. Detailed configuration and additional options are outlined in the SAS Output Delivery System documentation.

17:51, 27th January 2017

Sample 35864: Change line colours and styles for PROC SGPLOT output

Modifying a Style

SAS Focus Areas: Graphics

SAS graphics procedures enable users to customise the visual appearance of graphical output by modifying style elements through the TEMPLATE procedure, which can be used to create new styles based on existing ones or to adjust individual style attributes such as fonts, colours and line styles. Changes can be made at varying levels of specificity, from targeting a single style element such as GraphValueText, which controls tick mark values and legend value descriptions, to modifying the broader GraphFonts and GraphColors elements, which are referenced by multiple other elements throughout a style and can therefore produce more wide-ranging changes to output appearance.

The PROC SGPLOT procedure supports similar customisation of line colours and styles, with sample code available illustrating practical approaches to achieving this. A gallery of graphics samples covers a range of procedures including PROC SGPLOT, PROC SGPANEL, PROC SGSCATTER and PROC GPLOT, offering examples of chart types such as bar charts, area plots, bubble plots and spaghetti plots, while the Graphically Speaking blog provides additional data visualisation guidance with a focus on ODS Graphics.

11:23, 14th November 2016

One informat to rule them all: Read any date into SAS

The ANYDTDTE informat in SAS offers a versatile method for converting diverse date formats into a standardised date value, eliminating the need for multiple specific informats like DATEw. or MMDDYYw. It automatically interprets various date representations, such as "Jul 4, 1776" or "07/04/1776," by relying on the DATESTYLE system option, which defaults to the locale setting. This flexibility allows users to handle non-standardised date inputs efficiently, though interpretation of ambiguous formats like "07/04/1776" depends on regional conventions. Additional informats, such as ANYDTDTM and ANYDTTME, extend this functionality to date/time and time values, providing a unified approach to date and time processing within SAS.

12:36, 19th May 2016

Create conditional formulas in Excel

Excel provides several functions for creating conditional formulas that test whether conditions are true or false and make logical comparisons between expressions. The IF function evaluates a logical condition and returns one value when the condition is true and another value when it is false. The AND function checks whether multiple conditions are all true simultaneously, whilst the OR function determines whether at least one of several conditions is true. The NOT function reverses the logical value of its argument, turning true into false and false into true. These functions can be combined to create more complex conditional formulas that either return logical values or produce other calculations and custom values based on the evaluation of specified conditions. Practical examples demonstrate how these functions work with cell references and values to perform comparisons using operators such as greater than, less than and equality tests.

22:20, 1st March 2016

Michael A. Raithel, drawing on over 32 years of SAS programming experience, presents a humorous take on typical SAS interview question lists with his own collection of 21 deliberately absurd questions and answers. His satirical examples include asking what SAS stands for (the national anthem), whether the DROP or KEEP statement is more powerful (DROP has gravity on its side), and how to run a RUN statement (click the run icon). The list parodies common interview preparation materials by mixing genuine SAS concepts with wordplay, such as noting that PROC THIRTEEN is a mythical procedure, explaining that sorted data sets do not need sorting, and observing that most programmers use the SUBSTR function to extract substrings. Raithel also includes legitimate technical knowledge disguised as jokes, such as the distinction between DO WHILE (evaluated at the top) and DO UNTIL (evaluated at the bottom) loops, which he nicknames stalactite and stalagmite DO statements respectively. His post concludes by warning readers to be wary of lists claiming to show top SAS interview questions, which he suggests are often created by authors lacking substantial programming knowledge or simply generating clickbait. The blog also contains several practical programming tips in other entries, including how to retrieve process ID's on Unix and Linux systems using the SYSJOBID macro variable, how to concatenate SAS libraries dynamically using INSERT and APPEND options, how to identify SAS file types by their extensions, and how to create data sets in different operating system formats using the OUTREP option.

10:38, 10th February 2016

SAS trick: get the LIBNAME statement to create folders for you

Creating directories in SAS using the DLCREATEDIR function allows users to generate folders programmatically, which can be useful for organising output files or managing data storage. However, challenges may arise, such as setting appropriate permissions on Unix systems, which often require external commands like chmod or adjusting umask settings before the SAS session begins. Deleting directories created through this method involves first removing all contents within the folder, as the FDELETE function can only remove empty directories. When exporting data to Excel using PROC EXPORT, ensuring the correct path is specified is crucial, particularly when combining macro variables and directory names. Users must also be mindful of syntax, such as avoiding incorrect function names like DCCREATE, which may lead to errors. These steps, along with proper configuration of SAS options like DLCREATEDIR, help streamline workflows involving file management and data export.

10:36, 10th February 2016

Sorting data in SAS: can you skip it?

In the context of SAS programming, the necessity of sorting data has evolved with the integration of database technologies. When working with Base SAS datasets, sorting remains a common practice to enable BY-group processing, as many procedures rely on ordered data. However, when connecting to external databases, implicit sorting is often handled by the database engine itself, eliminating the need for explicit PROC SORT steps. This shift reduces computational overhead and streamlines workflows, particularly with large datasets. Discussions among users highlight scenarios where manual sorting in SAS might still be preferable, such as when custom collation sequences are required or when performance tests reveal unexpected outcomes. Alternatives like indexing offer trade-offs, balancing initial setup costs against repeated data access. The key takeaway for programmers is to understand the data source and procedure requirements, opting for implicit sorting when possible but retaining control where necessary. As SAS continues to adapt, the line between traditional data manipulation and modern database practices blurs, demanding a nuanced approach to optimise both efficiency and accuracy.

16:23, 4th December 2015

List or delete hidden files from command prompt

Files and folders on Windows can be marked with a hidden attribute that prevents them from appearing in normal directory listings or in Explorer. The dir command with the /A:H switch displays hidden files in a specified directory, while adding /S extends the search to include subdirectories and /B formats the output as a simple list. To show only hidden folders rather than files, the command uses /A:DH instead. Deleting hidden files requires the del command with the /A:H parameter, as attempting deletion without specifying this attribute will result in a file not found error. Individual hidden files can be removed by name, or all hidden files in a directory can be deleted at once using a wildcard, with the /S switch enabling deletion across subdirectories as well. When working with hidden folders, the rmdir command can remove them after generating a list with dir, though caution is necessary as mistakes can lead to permanent data loss.

20:15, 29th October 2015

Grid by Example

This online resource serves as a comprehensive learning platform for CSS Grid Layout, offering a variety of educational materials including short video tutorials that demonstrate different aspects of the specification, small examples showcasing individual features such as Subgrid, and ready-to-use pattern templates with fallback options for older browsers. The site provides a structured guide to help beginners start learning, links to additional articles and conference presentations, and a weekly email newsletter focused on CSS Layout resources. Created and maintained by Rachel Andrew, the platform also includes a GitHub repository where visitors can ask questions about Grid Layout and report browser bugs, whilst offering information about related projects and tools developed by the same creator.

  • 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.