Macro
Multiple calls to the parsemacro macro

Execution of the %parsemacro macro on a list of components.

View code
Général
Sans titre

This SAS script shows how to create a partitioned data table in an external database (likely Hadoop via SAS/ACCESS) a...

View code
ETL
SAS Table Manipulation (Filtering, Selection, and Formatting)

Fundamental DATA step examples for filtering observations, selecting variables, and applying formats.

View code
Général
Sans titre

The SAS script illustrates the use of IF-THEN/ELSE statements for conditional data processing within two distinct DAT...

View code
ETL
MERGE Operations with IN= Option

This SAS script illustrates the use of the MERGE statement with the IN= option to perform different joins between two...

View code
ETL
Executing an iterative DO loop

This script illustrates the use of an iterative DO loop in a DATA step to generate multiple output records from a sin...

View code
ETL
Retirement Savings Plan Simulation

This script simulates the growth of a retirement savings account over 6 years, considering annual contributions and c...

View code
Général
Sans titre

This script illustrates the use of PROC PRINT to display data and PROC TRANSPOSE to pivot rows and columns of the SAS...

View code
Statistical
Pain Index Calculation

SAS macro calculating the Pain Index based on the distribution of returns.

View code
Reporting
ODS HTMLPanel Report with PROC PRINT and PROC GCHART

This SAS script generates a panel-structured HTML report using ODS TAGSETS.HTMLPANEL. It features multiple PROC PRINT...

View code
Reporting
HTML Paneling Report Generation

Script generating an HTML report with multiple grid (panel) outputs via a custom tagset.

View code
ETL/Reporting
Creation of partitioned ORC data

Example of creating partitioned ORC tables with inline data, including cleaning and verification steps.

View code
Statistical
Fitting Polynomial Models with PROC ORTHOREG and GLM

This script illustrates fitting polynomial models on generated data, using PROC ORTHOREG and GLM to compare the results.

View code
Macro
OS Path Variables Management

This macro creates global macro variables to reference operating system directories based on predefined global variab...

View code
Tutorial / Reports
Understanding SAS Program Syntax

The script illustrates fundamental SAS programming concepts, including the use of comments, data manipulation via a D...

View code
Data Manipulation
Generating Current Temporal Variables

This script creates a table containing the current system date, time, and datetime.

View code
Statistical
Analysis of an Unbalanced Two-Factor Design

This SAS script performs an unbalanced two-factor analysis of variance (ANOVA) on internally created data, using the ...

View code
Statistical
ODS Documentation Example 3

This SAS script illustrates the use of the Output Delivery System (ODS) for documentation and visualization, performi...

View code
Statistical
Insurance Claims

This SAS script performs a Poisson regression to model insurance claims based on car type and age. It uses ODS to cap...

View code
Statistical
Documentation Example 5 for ODS

SAS example illustrating the capture of statistics (Chi-Square) into an output table via ODS OUTPUT.

View code
Statistical
Regression Analysis on Class and Population Data

This SAS script performs regression analyses on the internal 'sashelp.class' dataset and on a population dataset crea...

View code
Administration
Configuring OneDrive Authentication via OAuth2

One-time setup script to obtain the OAuth2 authentication tokens required for interacting with Microsoft OneDrive.

View code
ETL
Generic Variable Transformation

This SAS script demonstrates the use of `_numeric_` and `_character_` keywords to apply conditional transformations t...

View code
Administration
Session Options and Memory Configuration Overview

Script to view the current SAS session options and specifically inspect the memory configuration.

View code
Macro
Macro to count numeric variables in a dataset

Function-type macro to return the number of numeric variables in a SAS dataset.

View code
Reporting
Multi-Column Report Generation

This SAS script generates a multi-column report using ODS RTF (or PDF/PS) and PROC PRINT to display data from `sashel...

View code
Général
Sans titre

Script performing a survival analysis with automatic generation of graphs exported in HTML format.

View code
Reporting
Multi-Panel HTML Reports with ODS Tagsets

Generation of a complex HTML report organizing graphs and tables into grids (rows and columns) using ODS HTMLPANEL.

View code
Reporting
ODS Escape Characters Demonstration

Script illustrating the use of ODS escape characters for text formatting (superscript, subscript) in reports.

View code
Administration
List available ODS styles

This SAS script lists the ODS styles available in the SAS environment using both PROC TEMPLATE and PROC SQL.

View code
Statistics
Comparison of Group Means

This SAS script compares group means using the TTEST procedure, utilizing internal data defined by `datalines`.

View code
Statistical
Documentation Example 1 for PROC NPAR1WAY

This SAS script demonstrates the use of PROC NPAR1WAY to perform non-parametric analyses on arthritis data, including...

View code
Statistical
PROC NPAR1WAY Example: Exact Wilcoxon Test

Example script from SAS/STAT documentation illustrating the use of PROC NPAR1WAY to perform a Wilcoxon test with exac...

View code
Statistique
Example documentation for PROC NPAR1WAY

Example of using PROC NPAR1WAY for non-parametric analysis with reaction data.

View code
Statistics
Non-parametric Analysis with PROC NPAR1WAY

This SAS script uses PROC NPAR1WAY to perform non-parametric analyses on an internal dataset. It presents examples of...

View code
Macro
Managing Numeric Date Conversions with FCMP

This SAS script demonstrates the creation and use of FCMP functions to convert SAS date values into numeric format (Y...

View code
Statistical
Calculation of statistical functions with DATA step

This SAS script calculates and displays cumulative distribution function (CDF) values and the inverse quantile functi...

View code
Macro
Macro to Count Variables

SAS Macro to get the number of variables in a specified SAS dataset.

View code
Macro
Macro nvars - Number of Variables

Utility macro returning the number of variables in a given SAS table.

View code
Statistical
Documentation Example 4 for PROC NLMIXED

This SAS script uses PROC NLMIXED to model count data with a Poisson-Normal model.

View code
Statistical
Example 6 of documentation for PROC NLMIXED

This SAS script is a documentation example for PROC NLMIXED, simulating a nested random effects linear model.

View code
Général
Sans titre

This SAS script demonstrates a getting started example for the NLMIXED procedure, fitting a logistic growth curve mod...

View code
Statistical
PROC NLMIXED Getting Started Example 2

Getting started example for PROC NLMIXED, logistic-normal modeling of binomial data from a multicenter clinical trial.

View code
Macro
Macro to get the number of observations

This macro returns the number of observations for a specified SAS dataset.

View code
Macro
SAS Macro for Comma Removal

Functional macro to replace commas with spaces in a character string.

View code
Général
Sans titre

Function-style macro to remove duplicates from a space-delimited list of items.

View code
Macro
Macro `now` for timestamp

Function-style macro to return the current timestamp.

View code
Statistique
Robust Regression with PROC NLIN (IRLS) and PROC ROBUSTREG

Example comparing a manual implementation of robust regression (IRLS) via PROC NLIN and the use of the dedicated PROC...

View code
Statistical
Example 4 for PROC NLIN: Influence of Parameterization on Curvature

This script illustrates how different parameterizations of a nonlinear model affect the curvature and statistical pro...

View code
Statistical
Documentation Example 6 for PROC NLIN - ODS Graphics and Diagnostics

This SAS script illustrates the use of PROC NLIN for nonlinear regression analysis, generating ODS graphics and detai...

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