Statistical
Detailed Example 2 for PROC GLM

This SAS script uses PROC GLM to perform an analysis of variance, with a focus on calculating effect size for F-tests...

View code
Administration
List and locate SAS VA reports via REST API

This script uses the SAS Viya REST API to retrieve the list of SAS Visual Analytics reports, then determines and disp...

View code
Administration
Extracting Extended Library Attributes via Metadata

Administration script querying the metadata server to extract extended attributes of a specific SAS library.

View code
Administration
Extracting Stored Process Prompts (Metadata API)

Retrieves the list of prompts associated with Stored Processes by querying the metadata server.

View code
Macro
Retrieving Autocall Paths (SASAUTOS)

Utility macro to extract the autocall path configuration (SASAUTOS).

View code
Macro
Utility Macros and SAS Version Check

This SAS script bundles the definition of several macros: a wrapper macro for group management, a SAS version check m...

View code
Macro
Getpath Macro - File Inclusion Manager

Utility macro for dynamic file path resolution and conditional inclusion.

View code
Général
Sans titre

This SAS script defines a macro to extract the date, time, and size of a specified file by executing a 'dir' system c...

View code
Administration
Extracting Database Library Metadata

Retrieves detailed information about database libraries defined in the metadata server.

View code
Administration
Querying SAS Workload Orchestrator Job Information

This script queries the SAS Workload Orchestrator API to retrieve job information, then formats and displays the resu...

View code
Administration
Querying SAS Workload Orchestrator jobs via API

This script queries the SAS Workload Orchestrator API to retrieve information about jobs, then processes the JSON res...

View code
Administration
Extracting Job Source Paths from Metadata

Script retrieving the full source file path for each Job defined in the SAS metadata server (SAS 9 Architecture).

View code
Administration
Retrieving Metadata Libraries

SAS macro retrieving the list of libraries defined in the SAS metadata server (SAS 9) and generating an output table.

View code
Administration
Extraction of Stored Process Source Paths (SAS 9 Metadata)

Administration script (legacy SAS 9) to extract the source file paths of Stored Processes from the metadata server.

View code
Administration
Metadata Server Port and Service Extraction

Script retrieving the list of servers and connection ports configured in the SAS metadata server.

View code
Macro
File Extension Extraction Macro

Utility macro returning the extension of a file from its path.

View code
Macro
Extracting the Base Path of a File

Utility macro to extract the path of a file without its name or extension.

View code
Macro
Extract file name without extension

Utility macro to extract a file's name without its extension from a full path.

View code
Utility
Macro to retrieve a variable's label

This SAS macro dynamically retrieves the label associated with a specific variable in a SAS dataset.

View code
Macro
Macro to list dataset variables

This SAS macro provides a fast and purely macro-based method to get a list of variable names from a specified dataset...

View code
Macro
Macro _INDEXC

This macro implements a functionality similar to the DATASTEP INDEXC function, searching for the first occurrence of ...

View code
Macro
Macro _INDEXW: Word Search in a String

SAS Macro encapsulating the DATASTEP INDEXW() function to find the position of a word within a character string.

View code
Macro
Get File Extension

Gets the extension of a given filename, including the separator dot.

View code
Macro
Macro _getPgmDesc - Documentation Extraction

SASUnit utility macro designed to extract the short description of a SAS program from Doxygen (brief) tags present in...

View code
Général
Sans titre

Utility macro that returns all elements of a list, except the last one.

View code
Macro
Utility Macro _IFELSE

Utility macro implementing ternary conditional logic (If-Then-Else).

View code
SAS Functions
Date and Time Manipulation with INTNX

This SAS script demonstrates the use of the INTNX function to manipulate and format date, datetime, and time values, ...

View code
ETL
Creating and Displaying Student Data

This SAS script demonstrates the creation and manipulation of simple datasets from in-line data (datalines) for manag...

View code
Development
Hello World Example

This SAS script is a simple example of creating and displaying a 'Hello, World!' message.

View code
Statistical
Longitudinal Analysis and Mixed Model

This SAS script imports data from a longitudinal study, performs data cleaning, calculates descriptive means, visuali...

View code
ETL
Appending two CAS tables

This SAS script demonstrates how to append the content of one CAS table (CARS2) to another existing CAS table (CARS) ...

View code
ETL
Character to VARCHAR type conversion when loading into CAS

This SAS script demonstrates how to convert character variables to VARCHAR type when loading a table into CAS, in ord...

View code
Administration
Rename a CAS table

This SAS script demonstrates how to rename an existing CAS table in a SAS Viya 4 environment using PROC CAS actions.

View code
Statistical
Baseball Statistics Analysis with CAS

This SAS Viya 4 script loads baseball data from the SASHELP library into a CAS table, then performs statistical analy...

View code
ETL
Student Grades Analysis and Status Assignment

The SAS script creates two student datasets from raw data. It calculates the average scores and assigns a status base...

View code
Statistical
Monte Carlo Permutation Test with PROC IML

Performing a permutation test (Monte Carlo) to compare means between two groups using PROC IML for data generation.

View code
Statistical
Permutation (Randomization) Test for Mean Comparison

Execution of a permutation test to compare age means between two groups.

View code
Statistical
Power analysis for two means

Performs a power analysis for a two-independent-means comparison test, calculating the required total sample size and...

View code
Statistical
Power analysis for comparing two means

This SAS script uses the PROC POWER procedure to perform a power analysis to determine the necessary sample size for ...

View code
Statistical
Power Analysis for Two Means

This SAS script performs a power analysis for a two-mean comparison test, allowing the determination of statistical p...

View code
Général
Sans titre

Script performing a permutation (randomization) test to assess the statistical significance of the mean difference be...

View code
Statistical
Monte Carlo Permutation Test with PROC IML and PROC TTEST

This script implements a permutation test (randomization test) to compare the means of two groups. It generates an em...

View code
Statistical
T-Test Analysis on Tuition Fees

This SAS script performs a t-test to compare tuition fees between 'In' (internal) and 'Out' (external) students.

View code
Statistical
Univariate analysis of the difference between two measurements

This SAS script calculates the difference between two measurements ('after' and 'before') for a set of individuals an...

View code
Statistical
Permutation Test for Mean Comparison

This SAS script performs a permutation test to evaluate the difference in means between two groups (traumatized vs. n...

View code
Macro
Extract variable metadata and export to Excel

This SAS macro extracts detailed variable metadata (name, type, length, format) for one or more datasets specified in...

View code
Macro
Macro GetProgramName - Retrieving Program Path

Utility macro returning the full path and name of the currently executing SAS program.

View code
Administration
Managing SAS Session Options

Saving, temporarily modifying, and restoring SAS system options.

View code
Macro
Data Creation and Retrieval of Observation Count

Script creating a test dataset and storing its observation count in a macro variable.

View code
Général
Sans titre

Demonstration script generating synthetic data for a Tweedie distribution and fitting generalized linear models.

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