Administration
Creating a Metadata Folder

SAS macro to create a folder in the SAS metadata repository. It uses system calls to execute an external command and ...

View code
Général
Sans titre

Macro retrieving the list of available metadata object types on a SAS metadata server (OMR).

View code
Macro
Retrieve Metadata Objects (mm_getobjects)

Macro to retrieve a list of objects of a specific type from the SAS metadata server (SAS 9 legacy).

View code
Administration
Deleting a Stored Process via Metadata

SAS macro for deleting a Stored Process using its metadata path as a reference. It interacts directly with the SAS me...

View code
Administration
Deleting a Library via SAS Metadata

SAS macro to delete a library definition from the metadata server (OMR) using its name.

View code
Statistical
mlmsumry Macro for Linear Models Analysis (GLM)

SAS macro facilitating the extraction and formatting of multivariate and univariate test statistics from the GLM proc...

View code
Administration
Delete a Metadata Document

SAS macro for deleting a 'Document' type object from the SAS metadata repository using its full path.

View code
Macro
Recursive directory creation macro

SAS macro to recursively create directories on the operating system.

View code
Statistical
Getting Started Example for PROC MIXED

This script is a simple example illustrating the use of PROC MIXED for mixed linear models analysis, using internal d...

View code
Statistical
Documentation Example 9 for PROC MIXED: Examination of Test Components

This script illustrates the use of the LCOMPONENTS option in the MIXED procedure to examine hypothesis tests (L matri...

View code
Statistical
Influence Analysis in a Heterogeneous Variance Model (PROC MIXED)

Example of using the MIXED procedure to fit a one-factor classification model with heterogeneous variances and perfor...

View code
Statistical
PROC MIXED Example: Known G and R Matrices

Example of genetic analysis with PROC MIXED using known G and R covariance matrices on artificial data.

View code
Statistics
Documentation Example 1 for PROC MIXED - Split-Plot Design

Example of analyzing a split-plot design with PROC MIXED.

View code
Statistical
Likelihood Surface Plot with PROC MIXED

Example illustrating how to generate and visualize a likelihood surface from a linear mixed model.

View code
Statistical
Isotonic contrasts with PROC MIXED

This SAS script demonstrates the use of PROC MIXED for the analysis of isotonic contrasts on ordered mean values, usi...

View code
Macro
Macro %mixcase for mixed case text formatting

SAS macro to convert a character string to mixed case, capitalizing the first letter of each word and handling specia...

View code
ETL
Reading and Correcting Delimited Data with Missing Delimiters

This SAS script illustrates how to handle and correct the reading of delimited data files when some delimiters are mi...

View code
Macro
Annotation Macro for Missing Data

This macro generates an annotation dataset to visualize observations with missing values for X or Y variables in a sc...

View code
Macro
Min_Member_Length Macro

This macro takes a delimited list and returns the minimum length of any member in that list.

View code
Statistics
Documentation Example 19 for PROC MI

Documentation example for PROC MI, illustrating the analysis of missing data patterns and the configuration of multip...

View code
Statistical
Example 17 for PROC MI: Multiple Imputation with MNAR adjustment

Demonstration of multiple imputation using the MNAR statement in PROC MI to adjust imputed values based on a monotoni...

View code
Statistics
Documentation Example 16 for PROC MI

Example of using PROC MI with the FCS method and adjustments for Missing Not At Random (MNAR) data.

View code
Statistical
Example 15 of documentation for PROC MI

This SAS script demonstrates the use of the PROC MI procedure for multiple imputation of missing data, specifically u...

View code
Statistical
Example 12 for PROC MIANALYZE: MNAR Sensitivity Analysis

This script illustrates a sensitivity analysis using the MNAR (Missing Not At Random) statement in the MI procedure, ...

View code
Macro
Checking for SASHDAT file existence in CAS

Macro checking if a .sashdat format table exists in a specified CAS library.

View code
Utility
Check for Folder Existence on SAS Drive

This macro checks if a specified folder exists on SAS Drive. It returns '1' if the folder exists and '0' if it does n...

View code
Utility
Checking for File Existence on SAS Drive

This SAS macro checks if a specified file exists on SAS Drive. It returns 1 if the file is found and 0 otherwise. The...

View code
Utility
Defining HTTP Headers for SASjs/server

This SAS macro defines custom HTTP headers for SASjs server responses. It works by writing the specified headers to a...

View code
Test
Test of the mfs_httpheader macro

This script tests the functionality of the `%mfs_httpheader` macro which is used to define HTTP headers. It verifies ...

View code
Macro
Macro for writing a text file

This macro allows creating or appending content to a text file using only SAS macro functions. It can write up to 10 ...

View code
Test
Test of the mf_writefile macro

This SAS script is a unit test for the `%mf_writefile` macro. It validates its ability to create, overwrite, and appe...

View code
Macro
Macro for extracting unique words between two strings

This SAS macro compares two space-separated character strings and returns the words present in the first string (`Str...

View code
Macro
Extract common words from two strings

SAS macro to identify and return common words from two space-separated character strings.

View code
Macro
Macro Variable Verification (mf_verifymacvars)

Checks if a set of macro variables exist and contain non-empty values.

View code
Macro
Removing Trailing Characters from String

SAS macro to remove a specific trailing string from another string if present.

View code
Utility
Macro mf_mkdir - Recursive Directory Creation

This SAS macro, `mf_mkdir`, creates a directory on the file system, including all necessary intermediate directories,...

View code
Utility
List dataset variables

This macro returns the list of variables in a SAS dataset, with options to format the output (delimiter, quotes) and ...

View code
Test
Unit test of the mf_getvarlist macro

This SAS script tests the functionality of the `mf_getvarlist` macro by checking its behavior with different options ...

View code
Macro
Getting the format of a SAS variable

SAS macro that returns the format of a specified variable from a SAS dataset (table or view). It can also assign a de...

View code
Macro
Test of the mf_getvarcount macro

Unit test script verifying variable counting in a SAS table via the mf_getvarcount macro.

View code
Général
Sans titre

Utility macro to determine the SAS user ID based on the session context (Viya Compute, Stored Process, or Workspace S...

View code
Utility
Generate a unique SAS libref

This macro generates a unique SAS libref by appending a numeric suffix to a given prefix, to avoid library name confl...

View code
Macro
Unique Fileref Generation

SAS macro that assigns and returns an unused temporary fileref, circumventing issues with native fileref recognition ...

View code
Utility Macro
String Formatting with Delimiters and Quoting

This macro adds custom quotes and/or delimiters to an existing character string, segmenting it according to an input ...

View code
Macro
Extract SAS Format Name

Macro to extract the base name of a SAS format, ignoring its length and decimals.

View code
Macro
Get the SAS library engine type

This macro returns the engine type of a specified SAS library.

View code
Macro
Dynamic determination of an application's root location

SAS macro to dynamically identify the root path (appLoc) of a SASjs application in the SAS logical folder tree.

View code
Macro
DateTime Format Selection (mf_fmtdttm)

Macro determining the optimal date/time format (E8601DT26.6 or DATETIME19.3) based on the SAS environment version to ...

View code
Test
Unit Tests for %mf_getapploc

This script executes a series of unit tests to validate the behavior of the `%mf_getapploc` macro, which is designed ...

View code
Macro
mf_existfunction Macro

Checks the existence of a specific SAS function.

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