Script extracting extended attributes of a LASR library by querying a SAS 9 Metadata Server.
View code
Administration
Stored Process Source Code Extraction via Metadata
Script to extract and potentially modify the source code of Stored Processes stored in the SAS metadata server.
View code
Administration
Extracting Stored Process Source Code (SAS Metadata)
This program retrieves the source code of Stored Processes registered in the SAS 9 Metadata Server and writes it to t...
View code
Administration
Extracting User IDs by Group (SAS 9 Metadata)
Script listing user IDs for each member of a given group via the SAS 9 metadata server.
View code
Reporting
Configure Paper Size and ODS RTF Export
Example of configuring paper size (A3) for ODS RTF output.
View code
Reporting
GTL Scatter Plot with Left Labels
Definition and rendering of a custom scatter plot using Graph Template Language (GTL).
View code
Statistical
Example 3 PROC FMM: Mixed Poisson Regression
Example of using the FMM procedure to fit Poisson regression and Poisson mixture models.
View code
Administration
CAS Disk Cache Monitoring
Script for monitoring and displaying CAS disk cache information.
View code
Général
Sans titre
Script automating the creation of personalized PDF certificates and sending them via email.
View code
ETL
Download and Import Titanic Data
Retrieving the Titanic passenger CSV file from a web server and importing it into a SAS table.
View code
Reporting
Biorhythm Chart with SAS/GRAPH
Generation of a biorhythm chart (physical, emotional, intellectual) based on a birth date.
View code
Reporting
Multi-file HTML Report Generation with ODS
Script generating structured HTML output with frames listing sales by country and region.
View code
ETL
Exporting tables to Excel via LIBNAME
SAS data export script to an Excel file using the EXCEL library engine.
View code
Macro
Dynamic Creation of Vertical Macro Variables
Practical exercise to create a vertical list of macro variables during a Data Step execution.
View code
Macro
Using Macro Variable Lists for Dynamic Programs
Dynamically creating macro variables from SASHELP.CLASS dataset and displaying them in the SAS log.
View code
Général
Sans titre
Educational script illustrating how to dynamically split a table into multiple subtables based on distinct variable v...
View code
ETL
Data Transformation and Restructuring with PROC TRANSPOSE
Educational example illustrating data transposition and variable renaming.
View code
Général
Sans titre
This script lists active CAS sessions and exports the results to a local SAS table.
View code
Macro
CSV Export Macro (ex_csv)
Utility macro to export a SAS table to a CSV file via PROC EXPORT.
View code
Général
Sans titre
Script illustrating the use of loops and logical conditions within the definition of an ODS Tagset.
View code
Général
Sans titre
Utility macro for executing a SAS code snippet for each item in a defined list.
View code
ETL
Creation and Display of Internal Data
Basic script creating a dataset from manually entered lines and displaying the result.
View code
Macro
Exercise: Dynamic Creation of Macro Variables with PROC SQL
Training exercise aimed at creating a horizontal list of values in a macro variable using PROC SQL's INTO syntax.
View code
Macro
Dynamic creation of horizontal macro variable list
Script generating a list of values separated by a tilde (~) into a macro variable from a SAS table.
View code
Statistical
Correspondence Analysis: US Population 1920-1970
Example of simple correspondence analysis on US population data by region between 1920 and 1970.
View code
Général
Sans titre
Demonstration of substring extraction and data export via ODS.
View code
Export
Export CSV to Web Stream (_webout)
Generation of test data and direct export in CSV format to the web output stream.
View code
Statistical
CUSUM Macro - Recursive Residuals Analysis
SAS/IML routine calculating recursive residuals and their cumulative sums (CUSUM) to detect changes in regression par...
View code
ETL
Data Manipulation with LAG Functions
Script illustrating data creation, sorting, and the use of the LAG function to access previous observations.
View code
Administration
Deleting Users from Metadata
Program that deletes a defined list of users and their associated logins from the metadata server.
View code
Macro
Macro dirfp2sas: Listing Windows files to SAS table
Utility macro to list full file paths matching a given pattern into a SAS table.
View code
Reporting
Creating Composite Dashboards with ODS HTMLPANEL
Example of using the ODS HTMLPANEL tagset to create composite reports organizing graphs and tables in grids.
View code
Statistical
Data Simulation and Regression Analysis
This script generates a simulated dataset containing simple linear relationships, then performs several linear regres...
View code
Statistical
Chi-Square Statistical Analysis (Macro)
SAS macro to run a Chi-square test and export frequencies and probability of difference between groups.
View code
ETL
Extracting ORSALES Sales Data
Selection and copying of specific columns from the SASHELP.ORSALES example table.
View code
Statistical
Example 3 Details for PROC BOXPLOT
Example of using PROC BOXPLOT illustrating the management of extreme value display (clipping).
View code
Général
Sans titre
This SAS script generates a box plot of the average power produced by a turbine over several days, using embedded data.
View code
Statistical
Example 8 of documentation for PROC CALIS
Illustration of estimating measurement error models with PROC CALIS compared to standard linear regression.
View code
Statistical
Factor Analysis with COSAN Model and Constraints (PROC CALIS)
Example of factor analysis using the generalized covariance structure (COSAN) model with constraints on parameters.
View code
Statistical
Factor analysis with ordinal constraints via PROC CALIS
Example of using the CALIS procedure to model a factor analysis with inequality (linear) constraints on the parameters.
View code
Data Management
Generation of Test Data Sets (JES)
Script for generating multiple test tables (Contacts, TimeStamp, Poisson, Units, Fails, Rates) using static and simul...
View code
Macro
Macro appmvar - Conditional Concatenation of Macro Variables
Function-style macro to append a string to an existing macro variable.
View code
ETL
Data Simulation and Transformation via Array
Generation of simulated data and complex transformation using arrays and variable retention.
View code
Macro
Expected Error Assertion (FUTS Framework)
FUTS test framework utility macro checking if an expected error occurred during execution.
View code
Statistical
Choice Model with Nested Logit - PROC BCHOICE Example
Example of using the BCHOICE procedure to fit and compare a nested logit model and a standard logit model on transpor...
View code
Derniers codes ajoutés
Boost Performance & Security: Creating Composite Indexes and Passwords with PROC DATASETS
This example illustrates the modification of two SAS data sets using the MODIFY statement and its sub-statements. It shows how to: modify SAS files, label a SAS data set, add a read password to a SAS data set, indicate the current sort order of a SAS data set, create an index for a SAS data set, assign informats and formats to variables, rename variables, and label variables in a SAS data set.
ETL
SAS Data Step Efficiency: When to Use Explicit OUTPUT vs. Implicit Rules
Writes the current observation to a SAS dataset.
Data ManipulationCAS
Stop Struggling with Data Ingestion: Efficiently Move CSVs to Memory with PROC CASUTIL
The CASUTIL procedure offers several table and caslib management functions, including displaying table metadata, deleting files, unloading and loading tables, promoting tables, and saving tables.
ETLCAS
Beyond the WORK Library: Mastering the 4 Default SAS Libraries You Must Know
This document describes the default SAS libraries: Work (temporary), User (user), Sashelp, and Sasuser. It explains their role and behavior within the SAS Viya 4 environment.
Data Access
Seamless Integration: How to Attach Data Step Outputs Directly to SAS Viya Jobs
The SAS Viya Platform File Service allows storing, retrieving, and deleting files kept in the SAS Infrastructure Data Server database repository. This repository is not considered a complete 'file system' but contains individual files directly accessible by their file identifier (UUID).
Administration
From SAS 9 to Viya: The Ultimate Guide to Migrating User-Defined Formats to CAS
In the SAS Viya platform, you can store user-defined formats in catalogs for use in a SAS session, or you can store them in a format library on the CAS server. Format libraries are associated with a CAS session, or they can be promoted to global scope to be available to all CAS sessions. User-defined formats in a format library are server-side formats that the server uses when an analysis is performed based on formatted values. You can migrate existing user-defined formats from SAS to the SAS Viya platform.
ToolsCAS
Instant Performance Boost: Creating Indexes on the Fly with the INDEX= Data Set Option
Defines one or more indexes for a new output SAS data set.
Général
Stop Bloating Your Datasets: The Definitive Guide to Variable Selection with KEEP
Specifies variables to include in output SAS data sets.
ETLCAS
Combine and Conquer: Mixing Physical Paths and Existing Librefs in One LIBNAME Statement
Explains the concept of SAS library concatenation, allowing several libraries to be logically grouped under a single reference (libref).
Data Access
Stop Importing, Start Connecting: A Master Class in SAS/ACCESS Engines and SQL Pass-Through
This document provides examples of using SAS engines to access and process various types of external data, including delimited files, Excel files, databases (DBMS), XML, and JSON.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.