Utility
WORK Library Consultation

Execution of the DATASETS procedure to list the contents of the temporary WORK library.

View code
Machine Learning
Training a Gradient Boosting Model for Salary Prediction

This SAS Viya script uses the Cloud Analytic Services (CAS) to train a Gradient Boosting model on the sashelp.basebal...

View code
ETL
Managing VARCHAR data in CAS

This SAS script illustrates the creation of a SAS table with long character columns, its loading into a CAS cluster w...

View code
Macro / Documentation
Code Diary Documentation Generation and HTML Conversion

Configuration and execution script for automatic documentation generation (Code Diary) and its conversion to HTML.

View code
Statistical
Advanced Descriptive Analysis with PROC MEANS

Comprehensive demonstration of PROC MEANS procedure capabilities for descriptive analysis, including default statisti...

View code
Reporting
PROC SUMMARY and PROC PRINT Analysis

This SAS script demonstrates the use of PROC SUMMARY and PROC PRINT for data analysis and display. It illustrates the...

View code
Statistical
Student's t-test on carat data

Creation of a dataset and performing a Student's t-test.

View code
File Management
Reading source code from a SASHELP catalog

Script reading the content of a SAS catalog entry (source) to display it in the log.

View code
Macro
Counting Subjects by Treatment Group

This SAS program generates the count of unique subjects per treatment group from an adsl dataset, using dummy treatme...

View code
Macro
Extracting the first element of a string with %SCAN

This SAS script demonstrates the use of the %SCAN macro function to extract the first element of a comma-delimited st...

View code
Reporting
Graphs with broken axes

This SAS script generates various graphs (bar charts and scatter plots) with examples of broken axes to handle extrem...

View code
Data Manipulation
Using SAS Numeric Functions

This SAS script demonstrates the use of several built-in numeric functions (CEIL, FLOOR, INT, ROUND) in a DATA step t...

View code
ETL
Loading and Manipulation of Baseball Data in CAS

This SAS script loads the 'baseball' dataset from the SASHELP library into a CAS library ('casuser'), then creates a ...

View code
ETL
CAS Joins with Deep Learning and Search Analytics

This SAS script initializes a CAS session and performs data joins using the dlJoin actions from the Deep Learning act...

View code
ETL
Example of GROUPBY aggregation with CASL and FedSQL

This SAS script demonstrates the use of GROUPBY actions via PROC FEDSQL and PROC CAS (with the simple.groupBy action)...

View code
Statistical
Frequency Analysis with PROC FREQTAB and CAS

This SAS script uses the Cloud Analytic Services (CAS) engine to create a table from `sashelp.baseball` and perform a...

View code
Statistics, Administration
Parallel Execution of CAS Regressions with SAS/CONNECT

This script uses SAS/CONNECT to establish and manage two distinct remote SAS sessions. It then asynchronously submits...

View code
Administration
Lilly Macro Library Refresh

This SAS macro, named AHGrefreshlilly, is designed to automate the refreshing and backup of a SAS macro library. It s...

View code
Reporting
Dynamic Column Display with PROC SQL and PROC PRINT

This SAS script dynamically retrieves column names from the SASUSER.HOUSES dataset and uses these names to selectivel...

View code
ETL, Reporting, Statistics
Product Data Analysis and Transformation

This SAS script explores, analyzes, and transforms an external product catalog dataset. It examines its structure, ge...

View code
Macro
get_append_base Macro for Structure Generation

Macro displaying in the log the SAS code to recreate the structure (formats) of a given table.

View code
Data Analysis
Descriptive Analysis of Internal Data

This SAS script creates a simple internal dataset and then performs basic descriptive analyses using PROC SQL and PRO...

View code
Statistical
Binomial Probability Analysis

This SAS script calculates and presents the probabilities of non-missing events based on a binomial distribution, var...

View code
Macro
Data Preparation for EM5BATCH

This SAS script prepares the 'workspace' and 'actions' datasets, which are used as input parameters for the '%em5batc...

View code
Macro
Macro AHGNum2date - Numeric Date Formatting

Utility macro to convert a SAS numeric value (representing a date) into a formatted character string.

View code
Macro
Windows Operating System Check

This macro checks if the operating system is Windows.

View code
Macro
AHGopenby Macro - Automated File Opening

Utility macro for searching and opening (or listing) files matching a specific mask in predefined folders based on th...

View code
Macro
AHGppt Utility Macro

Utility macro to assign a string and generate output in a DATA step.

View code
Macro
SAS Table Merge Macro (AHGmergedsn)

Utility macro to merge two SAS tables with automatic sorting and join type management (Left, Right, Full, Matched).

View code
Macro
AHGnonblank Macro - Non-empty String Check

Utility macro returning the logical inverse of the %AHGblank macro.

View code
Macro
Server Detection Macro

Checks for the presence of the string 'sddsrv' in the server's hostname.

View code
Macro
AHGLIKE Macro for Word Filtering

This macro allows filtering words from a character string by comparing each word (after removing digits) to a given w...

View code
Macro
Macro AHGlinebyline: Vertical display of words

Utility macro displaying each word from a provided list of parameters on a distinct line in the log.

View code
Macro
Macro for local macro variable creation

Definition of a utility macro to create a local macro variable whose name and value are passed as parameters.

View code
Macro
Macro AHGlocf - LOCF Imputation

SAS macro designed to implement a 'Last Observation Carried Forward' (LOCF) logic by generating an additional observa...

View code
Macro
AHGkill Macro for Deleting SAS Datasets

SAS macro to delete one or more specified datasets from a SAS library. It can target specific datasets or all dataset...

View code
Utility
CCLI Library Definition

This SAS script defines a macro that creates a SAS library ('libname') pointing to a specified path on the file system.

View code
Macro
AHGlibname Macro - Libref Extraction

Utility macro to extract the library name (libref) from a SAS table name.

View code
Macro
Font size configuration macro

Defines a macro to adjust font size and other display options.

View code
Macro
AHGforceFormat Macro - Forced variable formatting

Utility macro to modify the length and format of specific variables in a SAS table based on definitions stored in ext...

View code
Statistical
AHGfreqCore Macro - Frequency Calculation and Transposition

Utility macro to calculate frequencies (PROC FREQ), format results, and optionally transpose the output.

View code
Macro
Macro to get the number of observations in a table

This macro retrieves the number of observations (nobs) of a SAS table specified by its library and table name paramet...

View code
Macro
Definition of macro AHGgetTempVname

Definition of an empty SAS macro named AHGgetTempVname. It currently performs no operations.

View code
Macro
Macro AHGfilesindir - Listing files in a directory

Utility macro to list files in a specific directory and store the result in a macro variable.

View code
Général
Sans titre

Utility macro to retrieve the RCS (head) version of a file.

View code
Macro
AHGeqV Macro (text comparison)

This macro is a wrapper that calls the `%AHGequaltext` macro to compare two text strings provided as parameters.

View code
Macro
Macro AHGeqm

Wrapper macro to call the AHGequalmactext macro.

View code
Macro
Case-insensitive text comparison macro

Utility macro comparing two character strings without considering case.

View code
Macro
Case-insensitive text comparison

Macro comparing two character strings without considering case.

View code
Statistical
Frequency Analysis of School-Money Associations

Creation of a `school` dataset from raw multi-observation data per line, followed by a frequency analysis of `money` ...

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 Manipulation CAS
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.
ETL CAS
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.
Tools CAS
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.
ETL CAS
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.
Data Access