Articles in category

Macro

547 Résultats disponibles

CODE SAS
Windowing Macro for PROC PRINT

Interactive SAS macro that uses a series of windows to allow the user to specify a data set, vari...

Lire la suite
CODE SAS
Extract Paths from SASAUTOS Option

SAS macro to parse the SASAUTOS system option and extract the list of macro search paths.

Lire la suite
CODE SAS
Defining Graphic Parameters for GIF Output

SAS macro to configure GOPTIONS graphic options for generating files in GIF format.

Lire la suite
CODE SAS
Frequency Analysis on Multiple Tables with a Macro

This SAS script creates two tables (males and females) and uses a macro to perform a frequency an...

Lire la suite
CODE SAS
Extract File Name and Path from an Absolute Path

Macro-program to decompose an absolute file path into file name and parent path.

Lire la suite
CODE SAS
Macro for editing a list of items

Function-style macro that allows editing a list of space-delimited items by applying a modificati...

Lire la suite
CODE SAS
Write environment variables to a SAS dataset

Macro to write system and user environment variables to a SAS dataset.

Lire la suite
CODE SAS
Dynamic Graph Generation by Stock

This script uses a SAS macro to dynamically generate a distinct PDF report for each stock present...

Lire la suite
CODE SAS
Deleting Macros from work.sasmacr Catalog by SQL Pattern

Macro to delete macros from the work.sasmacr catalog using a user-specified SQL search pattern.

Lire la suite
CODE SAS
Utility Macro for Truncating a SAS Table

SAS macro that deletes all observations from a table while preserving its structure, indexes, and...

Lire la suite
CODE SAS
Converting Double Quotes and Commas in a String

Macro-function that converts double quotes to single quotes in a character string, after replacin...

Lire la suite
CODE SAS
Remove option modifiers from a dataset name

Function-type macro that cleans a character string by removing option modifiers (e.g., where, dro...

Lire la suite
CODE SAS
commaparms - Add commas to macro parameters

Function-style macro to reinsert commas between macro parameters in a character string.

Lire la suite
CODE SAS
SAS Macro for Table Version Retrieval (`AHGtabver`)

This macro allows retrieving the version number of a table or component by executing an external ...

Lire la suite
CODE SAS
Assertion of a Non-Empty Dataset

Generates an event if a specified dataset does not exist or is empty (contains no observations).

Lire la suite
CODE SAS
Test of the SASUnit assertMustFail macro

This script is a test scenario for the SASUnit `%assertMustFail` macro, designed to validate that...

Lire la suite
CODE SAS
Utility macro to determine the extension of SAS catalogs

Macro that determines the SAS catalog file extension (.sas7bcat, .sc2, etc.) based on a SAS versi...

Lire la suite
CODE SAS
Verification of Macro Calling Sequence

Verifies if SASUnit framework internal macros, such as 'initScenario' and 'Assert', are called in...

Lire la suite
CODE SAS
Macro _COUNT: Count Elements in a List

A SAS macro that counts and returns the number of individual elements in a list of values.

Lire la suite
CODE SAS
Macro to check for dataset existence

This macro, _dsexist, returns 1 (true) if a SAS dataset exists and 0 (false) otherwise. It includ...

Lire la suite
CODE SAS
Macro to display a dataset

SAS Macro that encapsulates the PROC PRINT procedure to display the content of a dataset with for...

Lire la suite
CODE SAS
Utility Macro for Interacting with an External System (RCS)

SAS macro that generates and executes external commands to interact with a Revision Control Syste...

Lire la suite
CODE SAS
Post-generation analytical graph annotation

Script demonstrating an advanced technique to add custom annotations to a graph generated by an a...

Lire la suite
CODE SAS
String Analysis Macro

This SAS macro allows you to split a character string into words or phrases according to specifie...

Lire la suite
CODE SAS
Multiple calls to the parsemacro macro

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

Lire la suite
CODE SAS
Macro A

Macro A does everything you could wish for.

Lire la suite
CODE SAS
OS Path Variables Management

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

Lire la suite
CODE SAS
Macro to count numeric variables in a dataset

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

Lire la suite
CODE SAS
Managing Numeric Date Conversions with FCMP

This SAS script demonstrates the creation and use of FCMP functions to convert SAS date values in...

Lire la suite
CODE SAS
Macro to Count Variables

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

Lire la suite
CODE SAS
Macro nvars - Number of Variables

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

Lire la suite
CODE SAS
Macro to get the number of observations

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

Lire la suite
CODE SAS
SAS Macro for Comma Removal

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

Lire la suite
CODE SAS
Macro `now` for timestamp

Function-style macro to return the current timestamp.

Lire la suite
CODE SAS
Utility Macro _version and String Management

Script containing macro utilities for SAS version management and string handling.

Lire la suite
CODE SAS
NEXT Graphic Configuration Macro

Macro defining global graphic options for the 'nxtcolor' device.

Lire la suite
CODE SAS
NEXTLPR Printing Macro

Defines a macro to configure the SAS graphical environment for printing via the 'lpr' system comm...

Lire la suite
CODE SAS
mv_jobflow macro test for task orchestration

This SAS script is a comprehensive test case for the `mv_jobflow` macro, a task orchestration too...

Lire la suite
CODE SAS
Macro Variable Existence Check with Scope

Checks the existence of a SAS macro variable, optionally limiting the search to a specific scope.

Lire la suite
CODE SAS
Cross-Platform Code Retrieval Macro

Generic macro to retrieve SAS code (Viya jobs, SAS 9 stored processes, or SASjs programs) based o...

Lire la suite
CODE SAS
Macro mcrTwo Call

Invoking macro %mcrTwo with a specific parameter.

Lire la suite
CODE SAS
Hello World with Macro Variable

Introductory script displaying a personalized message in the SAS log.

Lire la suite
CODE SAS
SAS Viya Job Code Retrieval Test

Unit test script validating the creation of a SAS Job and the retrieval of its source code using ...

Lire la suite
CODE SAS
Unit test for the mf_wordsinstr1andstr2 macro

Test script validating the functionality of the 'mf_wordsinstr1andstr2' macro by string comparison.

Lire la suite
CODE SAS
Unit test for the mf_wordsinstr1butnotstr2 macro

Unit test script verifying the functionality of the word exclusion macro.

Lire la suite
CODE SAS
CST Framework Initialization and CDISC-SDTM Table Creation

Script for initializing the CST framework and configuring it for the CDISC-SDTM standard.

Lire la suite
CODE SAS
Macro makehash - Hash Object Initialization

In-datastep utility macro to quickly initialize and configure a SAS Hash object.

Lire la suite
CODE SAS
Macro Maxlengths - Calculation of String Lengths

Utility macro to determine the actual maximum data length contained in character variables of a S...

Lire la suite
CODE SAS
Company Name Resolution Macro

Macro displaying the full name of a company based on its abbreviation.

Lire la suite
CODE SAS
WHEROBS Macro - Filtered Observation Count

SAS macro to count the number of observations in a table by applying an optional WHERE filter.

Lire la suite
CODE SAS
Dynamic Recursive Execution of SAS Files

Macro to include and execute all SAS programs located in a directory and its subdirectories.

Lire la suite
CODE SAS
Directory Inspection using SAS Macro Functions

Macro script to list and count files in a given directory.

Lire la suite
CODE SAS
Data Dictionary Generation (CodeBook) via Macro

SAS macro to extract table metadata and export it to CSV.

Lire la suite
CODE SAS
Listvar Macro: Extracting and Sorting Variable Metadata

Utility macro to list SAS table variables and create an output table containing their metadata so...

Lire la suite
CODE SAS
Autocall Macros Configuration and Testing

Script illustrating the definition of local macros, modifying the macro search path (sasautos), a...

Lire la suite
CODE SAS
Using the IN operator and MINDELIMITER in SAS macros

Example of using the IN operator in a macro with a custom delimiter.

Lire la suite
CODE SAS
Macro Code Capture and Formatting via MFILE

This script configures SAS to capture macro-generated code into an external file. It cleans the e...

Lire la suite
CODE SAS
Unit test for the sas_set_index macro

Technical validation script for the %sas_set_index macro.

Lire la suite
CODE SAS
Macro hasvarsc - Checking for presence of character variables

Macro function that returns true (1) if a dataset contains all character variables specified in a...

Lire la suite
CODE SAS
Macro-Variable Manipulation and Arithmetic Operations

Example of using the %LET and %PUT macro statements to define variables and display results.

Lire la suite
CODE SAS
Dynamic HTML Report Generation via Macros

Set of macros to dynamically generate an HTML page containing links to SAS libraries and system f...

Lire la suite
CODE SAS
Dynamic Creation of Vertical Macro Variables

Practical exercise to create a vertical list of macro variables during a Data Step execution.

Lire la suite
CODE SAS
Using Macro Variable Lists for Dynamic Programs

Dynamically creating macro variables from SASHELP.CLASS dataset and displaying them in the SAS log.

Lire la suite
CODE SAS
CSV Export Macro (ex_csv)

Utility macro to export a SAS table to a CSV file via PROC EXPORT.

Lire la suite
CODE SAS
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 SQ...

Lire la suite
CODE SAS
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.

Lire la suite
CODE SAS
Macro dirfp2sas: Listing Windows files to SAS table

Utility macro to list full file paths matching a given pattern into a SAS table.

Lire la suite
CODE SAS
Macro appmvar - Conditional Concatenation of Macro Variables

Function-style macro to append a string to an existing macro variable.

Lire la suite
CODE SAS
Expected Error Assertion (FUTS Framework)

FUTS test framework utility macro checking if an expected error occurred during execution.

Lire la suite
CODE SAS
AHGvar2arr Macro: Converting a Variable into an Array of Macro Variables

SAS macro transforming the values of a variable from a dataset into a series of indexed global ma...

Lire la suite
CODE SAS
Check Numeric Type of a Variable (Macro AHGvarisnum)

Utility macro checking if a specific variable in a given table is of numeric type.

Lire la suite
CODE SAS
Macro AHGvarlabel - Variable Label Formatting

Utility macro generating a formatted list of variable names and their labels from a given SAS table.

Lire la suite
CODE SAS
AHGwords Macro - List Generation by Substitution

Utility macro generating a series of character strings by replacing a wildcard character (by defa...

Lire la suite
CODE SAS
AHGworkout Macro: Copying and Filtering Tables

Utility macro for copying a set of tables from a source library to a target library with optional...

Lire la suite
CODE SAS
Word Substring Extraction Macro (AHGscanSubstr)

Utility macro to extract a sequence of words from a character string based on the SCAN function's...

Lire la suite
CODE SAS
AHGsetvarLen Macro: Variable Length Modification

Utility macro to modify the length of an existing variable in a SAS table while preserving the or...

Lire la suite
CODE SAS
Metadata Search via Grep

Utility macro to search for a specific entry in a text metadata file using a grep system command.

Lire la suite
CODE SAS
Differential Snapshot of WORK Datasets

Utility macro to identify newly created SAS tables in the WORK library between two steps.

Lire la suite
CODE SAS
Sans titre

Utility macro for splitting the content of a string variable into multiple new variables using a ...

Lire la suite
CODE SAS
AHGtran Macro - Data Preparation and Iteration

Utility macro preparing a temporary sub-table with specific variables before invoking an external...

Lire la suite
CODE SAS
Macro for Retrieving Table Names

Macro generating a list of all datasets present in a given SAS library via a global macro variable.

Lire la suite
CODE SAS
AHGlibpath Macro - Retrieving the Physical Path of a Library

Utility macro to retrieve the system path associated with a given SAS libref.

Lire la suite
CODE SAS
AHG Utility Macros for String Manipulation

Definition of three utility macros (AHGstartwith, AHGtestANDcut, AHGmask) for string manipulation...

Lire la suite
CODE SAS
QC Validation Macro AHGQCpassed

Utility macro to mark an object as having passed Quality Control (QC).

Lire la suite
CODE SAS
AHGrefreshfolder Macro for file processing by extension

Macro for traversing specified folders and performing operations on files filtered by extensions.

Lire la suite
CODE SAS
AHGscanReplace Macro - String Segment Replacement

Utility macro to replace the n-th word or segment of a character string with a specified new value.

Lire la suite
CODE SAS
Generation of unique temporary filename (AHGgettempfilename)

Utility macro to generate a unique filename by checking its non-existence on the file system.

Lire la suite
CODE SAS
Word Index Search Macro in a List

Utility macro returning the position (index) of a specific word within a character string treated...

Lire la suite
CODE SAS
Initialize variables and clean up for batch comparison

Initializes global variables and deletes temporary files for batch comparison.

Lire la suite
CODE SAS
Macro AHGkeepN - Sequential filtering by group

SAS macro to retain a specific range of observations (from m to n) for each group defined by sort...

Lire la suite
CODE SAS
AHGkeepvar Macro: Variable Selection by Position

Utility macro to create a table by retaining only the variables specified by their position (inde...

Lire la suite
CODE SAS
AHGaddordvar Macro - Sort Variable Creation

Utility macro generating SAS code to create a normalized sort variable from an alphanumeric varia...

Lire la suite
CODE SAS
Alignment and Formatting Macro using Regular Expressions

SAS macro to align and format character strings containing numbers and parentheses using regular ...

Lire la suite
CODE SAS
Left-Right Justified Alignment Macro

Utility macro for aligning text left and right over a defined width.

Lire la suite
CODE SAS
AHGarea_grp Macro - Calculation of Sum of Squares by Group

Definition of a SAS macro to calculate an aggregated statistic (sum of squares of sums divided by...

Lire la suite
CODE SAS
Sum of Squares Calculation Macro

SAS macro calculating the sum of squares for a given variable in a table and storing the result i...

Lire la suite
CODE SAS
Macro AHGcheckdic - Grep Command Generation

Utility macro generating formatted 'grep' shell commands based on the content of a SAS table.

Lire la suite
CODE SAS
SAS Macro for Left Justification of Text

This SAS macro, named `_lj`, is designed to left-justify text based on the specified line size, h...

Lire la suite
CODE SAS
Macro _NULL: Determining the System's Null Device

This macro provides the null device path (_NULL) adapted to the current operating system (Unix or...

Lire la suite
CODE SAS
Dataset Option Extraction Macro

Utility macro to isolate and return the 'options' part of a SAS dataset name provided as a string.

Lire la suite
CODE SAS
_pdfjam Macro for Merging PDF Files

This SAS macro uses the external utility 'pdfjam' to merge a main PDF file with a series of seque...

Lire la suite
CODE SAS
Using the Macro Facility to Generate CAS DATA Step Code

This article explains how to use the SAS macro facility to dynamically generate SAS DATA Step cod...

Lire la suite
CODE SAS
String Reversal Macro and Variable Tests

SAS script defining a macro to reverse a character string and performing simple tests to display ...

Lire la suite
CODE SAS
Comparison of IF vs. WHERE filtering in a macro

Script generating test data and executing a macro to repeatedly compare two filtering methods (IF...

Lire la suite
CODE SAS
GET Function (Expression Engine Language)

The GET function returns the element at a specified index within an Expression Engine Language (E...

Lire la suite
CODE SAS
Autocall Macro Libraries Configuration

Configuring search paths for custom SAS macros.

Lire la suite
CODE SAS
Extracting PROC FREQ statistics via text file

SAS macro extracting a specific statistic from PROC FREQ results by redirecting output to a text ...

Lire la suite
CODE SAS
Creating and Testing a SAS Web Service for Object Sending

This SAS script uses macros to create and test a web service named 'sendObj'. The service is desi...

Lire la suite
CODE SAS
Test of the ms_getusers macro

Unit test script for the ms_getusers macro, validating user extraction and variable scope managem...

Lire la suite
CODE SAS
Test of the ms_deletefile macro

Unit test script to validate the functionality of the ms_deletefile macro.

Lire la suite
CODE SAS
Macro mp_wait4file - Wait for file availability

Utility macro suspending program execution until a target file appears or a timeout expires.

Lire la suite
CODE SAS
Recursive Directory Scan

SAS macro that recursively scans a directory tree to list all subfolders and files.

Lire la suite
CODE SAS
SAS library write speed test macro

This macro evaluates write speed by creating a temporary dataset of a specified size in a SAS lib...

Lire la suite
CODE SAS
Workload Generation for Performance Testing

Macro executing a series of SAS processes (Data Step, SQL, Sort, Summary) for a determined durati...

Lire la suite
CODE SAS
Key-Value Manager in a Dataset

This SAS macro, `%mp_setkeyvalue`, allows storing and managing key-value pairs in a specified SAS...

Lire la suite
CODE SAS
Macro mp_perflog - Performance Logging

Utility macro to record performance checkpoints (message, job ID, timestamp) in a SAS table.

Lire la suite
CODE SAS
Generating an MD5 hash expression

SAS macro to generate an MD5 hash expression for a set of character and numeric variables, intend...

Lire la suite
CODE SAS
Table Locking Mechanism Test via Macros

This script is a test program for a SAS table locking macro system. It verifies the creation of a...

Lire la suite
CODE SAS
Generating DDL for a SAS table

Wrapper macro to generate the DDL (Data Definition Language) for a specific SAS table, allowing t...

Lire la suite
CODE SAS
Test of the mp_ds2cards and mp_assert macros

This SAS script tests the functionality of the `mp_ds2cards` macro, which converts a SAS dataset ...

Lire la suite
CODE SAS
SAS Macro mp_dropmembers

Macro to delete SAS tables and views without generating warnings in the log. Useful for condition...

Lire la suite
CODE SAS
Extraction of Formatted Distinct Values

This macro extracts formatted distinct values of a specific variable from a SAS dataset.

Lire la suite
CODE SAS
Macro to create SQL dictionary views

This macro dynamically creates views in a specified SAS library (default WORK) for all entries in...

Lire la suite
CODE SAS
Managing Core SASjs Tables (mp_coretable)

Centralized management macro for defining permanent tables (DDL) of the sasjs/core library.

Lire la suite
CODE SAS
Test of the `dostuff` macro with `mp_assertscope`

This script tests a macro named `dostuff` that manipulates global macro variables. It uses the te...

Lire la suite
CODE SAS
Binary File Concatenation

Macro to concatenate the content of multiple files in binary mode.

Lire la suite
CODE SAS
Get the last modification date of a dataset

Function-type macro that returns the date and time of the last modification of a SAS dataset, wit...

Lire la suite
CODE SAS
Retrieve Metadata Objects (mm_getobjects)

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

Lire la suite
CODE SAS
Recursive directory creation macro

SAS macro to recursively create directories on the operating system.

Lire la suite
CODE SAS
Macro %mixcase for mixed case text formatting

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

Lire la suite
CODE SAS
Annotation Macro for Missing Data

This macro generates an annotation dataset to visualize observations with missing values for X or...

Lire la suite
CODE SAS
Min_Member_Length Macro

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

Lire la suite
CODE SAS
Checking for SASHDAT file existence in CAS

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

Lire la suite
CODE SAS
Macro for writing a text file

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

Lire la suite
CODE SAS
Macro for extracting unique words between two strings

This SAS macro compares two space-separated character strings and returns the words present in th...

Lire la suite
CODE SAS
Extract common words from two strings

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

Lire la suite
CODE SAS
Macro Variable Verification (mf_verifymacvars)

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

Lire la suite
CODE SAS
Removing Trailing Characters from String

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

Lire la suite
CODE SAS
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 ...

Lire la suite
CODE SAS
Test of the mf_getvarcount macro

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

Lire la suite
CODE SAS
Unique Fileref Generation

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

Lire la suite
CODE SAS
Extract SAS Format Name

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

Lire la suite
CODE SAS
Get the SAS library engine type

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

Lire la suite
CODE SAS
Dynamic determination of an application's root location

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

Lire la suite
CODE SAS
DateTime Format Selection (mf_fmtdttm)

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

Lire la suite
CODE SAS
mf_existfunction Macro

Checks the existence of a specific SAS function.

Lire la suite
CODE SAS
Checking for variable existence in a dataset (mf_existvarlist)

This macro checks if all variables specified in 'varlist' exist in a given SAS dataset referenced...

Lire la suite
CODE SAS
String Deduplication

Macro to remove duplicates from a string based on a specified delimiter.

Lire la suite
CODE SAS
Macro definition with nested call

Defines a macro named `mcrTwo` that takes a parameter to dynamically call another macro. It displ...

Lire la suite
CODE SAS
Detecting Maximum Indices of Titles and Footnotes

Utility macro to identify the highest numbers used for titles and footnotes in the current SAS se...

Lire la suite
CODE SAS
Cleanup and Initialization Macro (utl_mbegin)

This utility macro, named `utl_mbegin`, is designed to initialize the execution environment of a ...

Lire la suite
CODE SAS
Loading Macro Library from GitHub

Initialization script that dynamically downloads and compiles a suite of SAS macros from a public...

Lire la suite
CODE SAS
Macro Marvel Messages

SAS macro displaying superhero quotes in the log.

Lire la suite
CODE SAS
Markcode Macro - Interactive Execution and Visualization (Legacy)

Utility macro designed for classic interactive SAS environments (Display Manager) to submit buffe...

Lire la suite
CODE SAS
Macro markdsn - Interactive table opening

Utility macro designed to open a SAS table (dataset) whose name is stored in the system clipboard...

Lire la suite
CODE SAS
Creating and Assigning a Temporary Library

This macro checks for the existence of the 'c:\tempwork' directory and creates it if necessary on...

Lire la suite
CODE SAS
Test SAS macros and message display

This SAS script is a simple example of testing macros and displaying messages in the SAS log. It ...

Lire la suite
CODE SAS
SDTM Date Creation --DTC

This SAS macro generates an SDTM-formatted date variable (--DTC) from date and time components pr...

Lire la suite
CODE SAS
Macro Variable Manipulation and Data Creation

This SAS script demonstrates the creation of an internal dataset and the use of various macro fun...

Lire la suite
CODE SAS
Path Test Macro

Analysis and demonstration of using the %SYSFUNC(DEQUOTE) macro to handle character strings with ...

Lire la suite
CODE SAS
Print and Frequency Test Macro

This SAS script defines a global macro variable and a macro to display version information and ex...

Lire la suite
CODE SAS
Deletion of compiled macros

Utility macro to delete compiled macros from the current session (WORK library).

Lire la suite
CODE SAS
Sans titre

Provides a %mabbrev macro-function that mimics REXX's 'abbrev' function, allowing to check if one...

Lire la suite
CODE SAS
Generic Utility Macro m_utl_xxx

Utility macro for a generic function. Provides a brief and detailed description of the macro's fu...

Lire la suite
CODE SAS
m_val_xxx Validation Macro Skeleton

Basic structure for a validation macro with integrated Doxygen documentation.

Lire la suite
CODE SAS
m_uc_xxx Macro Definition Template

This file is a standardized template for creating SAS macros, including a detailed documentation ...

Lire la suite
CODE SAS
Logging Macro m_log_xxx

SAS macro skeleton for logging, containing only the definition structure and documentation.

Lire la suite
CODE SAS
Generic header macro m_hdr_xxx

Standardized header macro for SAS scripts, facilitating documentation and parameter management su...

Lire la suite
CODE SAS
Macro template m_cst_xxx

Definition skeleton for a custom SAS macro, including standardized header documentation.

Lire la suite
CODE SAS
Interactive Input via Macro Window (Legacy)

Defines and attempts to display a textual interactive window for parameter input.

Lire la suite
CODE SAS
SAS CALC Macro for Descriptive Analysis

This SAS macro, named CALC, validates variables in a specified dataset and executes the PROC MEAN...

Lire la suite
CODE SAS
SAS Variable Name Cleaning and Normalization

This SAS script illustrates three implementations of a '%fixname' macro, whose objective is to cl...

Lire la suite
CODE SAS
Simple Conditional Macro

This SAS script defines and uses a simple macro that takes a parameter and displays a correspondi...

Lire la suite
CODE SAS
Company Name Display Macro

This SAS macro displays the full name of a company based on an abbreviation provided as a paramet...

Lire la suite
CODE SAS
Company Greeting Macro

This macro displays a company name or a generic phrase in the SAS log based on the provided argum...

Lire la suite
CODE SAS
Secure extraction of the first character of a macro variable with %SUPERQ

Demonstrates the importance of the %SUPERQ macro function for manipulating strings containing spe...

Lire la suite
CODE SAS
Geographic location macro by state code

Simple macro displaying the geographic region associated with a state code in the SAS log.

Lire la suite
CODE SAS
Conditional State WHERE Macro

Defines and executes a SAS macro that determines a geographic region (Southeast, Northwest, Unkno...

Lire la suite
CODE SAS
Geographic Region Determination Macro

Simple macro displaying a geographic region in the log based on a given state code.

Lire la suite
CODE SAS
Defining and calling the where macro

Definition of a simple macro using conditional logic to display a geographical region in the log ...

Lire la suite
CODE SAS
Handling special characters in macros

Example of using the quoting functions %STR and %NRSTR.

Lire la suite
CODE SAS
Managing space delimiter in %QSCAN

Illustration of using the %str function to define a space as a delimiter in the %qscan macro func...

Lire la suite
CODE SAS
Name Processing Macro

This script defines and uses a SAS macro to reorder a full name (format 'Last Name, First Name') ...

Lire la suite
CODE SAS
Name Reordering Macro

SAS macro to reorder a full name (Last Name, First Name) to First Name Last Name.

Lire la suite
CODE SAS
String manipulation macro

This SAS macro takes a full name (in 'Last Name, First Name' format) as input, reverses the order...

Lire la suite
CODE SAS
Name extraction and reformatting

This script defines and calls a SAS macro to extract the first name and last name from a 'Last Na...

Lire la suite
CODE SAS
String Manipulation with %SCAN Macro

This SAS script defines and executes a macro that manipulates a full name string (format 'Last Na...

Lire la suite
CODE SAS
Name Reorganization Macro

This SAS script defines a macro to reorganize a full name provided as 'Last Name, First Name' int...

Lire la suite
CODE SAS
Macro Deletion with %SYSMACDELETE

Illustration of deleting a macro definition and subsequent call attempt.

Lire la suite
CODE SAS
Analysis of the SAS Macro Catalog

This SAS script examines system options related to macro storage and lists the contents of a spec...

Lire la suite
CODE SAS
lsfp2sas Macro - Listing Unix/Linux files into SAS

Utility macro for listing Unix/Linux files matching a specific pattern and storing this list in a...

Lire la suite
CODE SAS
List files with full path (Unix)

Function-type macro that returns the list of files in a directory on a Unix system, with their fu...

Lire la suite
CODE SAS
lscmd Macro - List files in a Unix directory

Function-style macro returning the list of members in a Unix directory via the 'ls -1' command.

Lire la suite
CODE SAS
Ljustify Macro

SAS macro to left-justify all character variables in a dataset.

Lire la suite
CODE SAS
SAS Macro Testing and Management

This script demonstrates the use of the %listmacro macro to inspect and manage SAS macros, integr...

Lire la suite
CODE SAS
SAS File Listing Macro

This script contains a SAS macro to list files in a given directory, including its subdirectories...

Lire la suite
CODE SAS
list2format Macro

Creates a SAS numeric format based on a list of values provided as a parameter.

Lire la suite
CODE SAS
Test of the _mkDir macro-program

This script is a SASUnit unit test for the _mkDir macro-program, which is used to create director...

Lire la suite
CODE SAS
Macro _MIN: Find the Minimum

SAS macro that determines the minimum between two expressions, similar to the MIN() function of t...

Lire la suite
CODE SAS
Macro _MAX for Maximum

This macro implements a function similar to the DATA STEP's MAX() function, returning the maximum...

Lire la suite
CODE SAS
Macro _LS for LINESIZE

Utility macro to retrieve the value of the SAS system option 'LINESIZE'.

Lire la suite
CODE SAS
Macro _LIB for extracting library name

This macro extracts the SAS library name from a full data set reference, or returns 'work' by def...

Lire la suite
CODE SAS
Utility Macros for Data Analysis and SAS Metadata Manipulation

This script provides a set of three SAS macros. The 'DissGraphMakerLogOdds' macro performs in-dep...

Lire la suite
CODE SAS
Example of Data Creation and Conditional Macro

This SAS script illustrates the internal creation of datasets via DATA STEP and the definition/ca...

Lire la suite
CODE SAS
Log Formatting and Time Tracking Macro

Utility macro to generate clean and framed log messages, including execution time calculation and...

Lire la suite
CODE SAS
Creating a left-aligned title

SAS macro to generate a left-aligned report title.

Lire la suite
CODE SAS
Lafootnote Macro

Creates a left-aligned footnote in SAS outputs.

Lire la suite
CODE SAS
Macro Variable Management

This SAS script illustrates the declaration, assignment, and display of macro variables.

Lire la suite
CODE SAS
Functional macro for ISO 8601 format

This functional macro generates a character string in ISO 8601 format (YYYY-MM-DDTHH:MM:SS) from ...

Lire la suite
CODE SAS
Definition of ISO formats for date and time

This SAS macro defines custom formats for dates and times according to the ISO 8601 standard, spe...

Lire la suite
CODE SAS
Macro addvar - Text variable splitting

SAS macro designed to manage and split text variables exceeding a specified maximum length (defau...

Lire la suite
CODE SAS
Macro jjqcclean - Cleaning the working environment

Utility macro to clear the WORK library and reset the DOMAIN variable.

Lire la suite
CODE SAS
Generation of a Delimited List of Numbers

Macro to create a delimited list of integers.

Lire la suite
CODE SAS
SAS Name Validity Check

Functional macro to check if a character string is a valid SAS name according to naming rules.

Lire la suite
CODE SAS
File Reference Testing and Management

This SAS script tests the functionalities of creating, verifying, and deleting file references (f...

Lire la suite
CODE SAS
Test of the %ismacroref macro function

This script tests the %ismacroref macro function to check for the presence and absence of macro v...

Lire la suite
CODE SAS
Extract ISO 8601 Date Part

Function-style macro to extract the date part from an ISO 8601 standard datetime text value.

Lire la suite
CODE SAS
Creating macro variables with leading zeros via PROC SQL

Script generating a series of numbered macro variables (name01 to name19) from the data in the SA...

Lire la suite
CODE SAS
Issue a Warning Message via Log4SAS

Utility macro to send a warning message to a specified Log4SAS logger.

Lire la suite
CODE SAS
Utility Macro _LAST

Generates a logical expression to identify the last observation of a BY group or the last global ...

Lire la suite
CODE SAS
Issuing fatal message via log4sas

SAS macro to issue a FATAL level message to a specified log4sas logger.

Lire la suite
CODE SAS
LOG4SAS Information Message Emission Macro

This SAS macro emits an informational message to a specified LOG4SAS logger, including parameter ...

Lire la suite
CODE SAS
Macro to issue a trace message

This SAS macro issues a trace message to a specific logger using the `log4sas_logevent` function ...

Lire la suite
CODE SAS
Issues an error message in an 'assert' to a logger

Issues an error message within an assertion to a logger.

Lire la suite
CODE SAS
Assertion Log4SAS information message

Emits an assertion information message to a logger.

Lire la suite
CODE SAS
Warning Macro for SASUnit Assertion

This internal SASUnit macro emits a warning message via a logger, specifically during an assertio...

Lire la suite
CODE SAS
SAS Macro Definition and Verification

This script illustrates the definition of a simple SAS macro and the verification of its registra...

Lire la suite
CODE SAS
Using %EVAL and %SYSEVALF Functions

Demonstrates the use of the %EVAL and %SYSEVALF macro functions to perform arithmetic calculation...

Lire la suite
CODE SAS
Using the %INDEX macro function

This SAS script illustrates the use of the %INDEX macro function to search for a substring within...

Lire la suite
CODE SAS
Using the %SYSEVALF Macro Function

This SAS script demonstrates the use of the %SYSEVALF macro function to evaluate arithmetic and l...

Lire la suite
CODE SAS
Definition of the Prtlast macro

This script defines a utility macro named %prtlast that displays data from the most recently crea...

Lire la suite
CODE SAS
Unit Test of the Import Macro

Technical validation script for the %import macro.

Lire la suite
CODE SAS
Using the IFC macro function for OS detection

Example of using the `ifc` function via `%sysfunc` to execute immediate conditional logic in the ...

Lire la suite
CODE SAS
Macro Import - Dependency Management

Fundamental utility macro for intelligent import and dependency management of SAS macro files.

Lire la suite
CODE SAS
Graphic Resizing Macro

SAS macro to resize graphic parameters (size and position) while maintaining the aspect ratio of ...

Lire la suite
CODE SAS
Test of the %hasprefix macro

This SAS script is a set of unit tests to validate the behavior of the %hasprefix macro, which de...

Lire la suite
CODE SAS
Variable verification in a dataset

This function-type macro returns '1' if a dataset contains all variables specified in a user-prov...

Lire la suite
CODE SAS
Search and Navigation Method for VIEWTABLE

This method, designed for use within a VIEWTABLE class (SAS/AF), intercepts commands to search fo...

Lire la suite
CODE SAS
Greenbar style macro for ODS

This macro implements a 'greenbar' effect (alternating colored rows) to improve the readability o...

Lire la suite
CODE SAS
Verification of global macro variable existence

Function-style macro that returns 'true' (1) if all specified global macro variables exist in the...

Lire la suite
CODE SAS
List of Global Macro Variables

This function-style macro returns a list of the names of current SAS global macro variables.

Lire la suite
CODE SAS
Extracting and Managing ODS Styles

This SAS script extracts the list of available ODS styles, exports them to Excel, then re-imports...

Lire la suite
CODE SAS
SAS/Graph Post-processing

Post-processing macro for SAS/Graph operations. The provided code is a macro skeleton.

Lire la suite
CODE SAS
GHI macro definition

Definition of a simple macro displaying a message in the log to verify autocall.

Lire la suite
CODE SAS
Git Repository Installation and Loading Macros

Two macros to clone a Git/GitHub repository and automatically load the contained SAS macros.

Lire la suite
CODE SAS
SAS Code Inclusion Macro from GitHub

This SAS macro allows the inclusion and execution of SAS code files stored in a specified GitHub ...

Lire la suite
CODE SAS
Delete entries from a graphics catalog

The GKILL macro deletes entries from a graphics catalog. This is useful when PROC GREPLAY is used...

Lire la suite
CODE SAS
Retrieving Autocall Paths (SASAUTOS)

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

Lire la suite
CODE SAS
Utility Macros and SAS Version Check

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

Lire la suite
CODE SAS
Getpath Macro - File Inclusion Manager

Utility macro for dynamic file path resolution and conditional inclusion.

Lire la suite
CODE SAS
File Extension Extraction Macro

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

Lire la suite
CODE SAS
Extracting the Base Path of a File

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

Lire la suite
CODE SAS
Extract file name without extension

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

Lire la suite
CODE SAS
Macro to list dataset variables

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

Lire la suite
CODE SAS
Macro _INDEXC

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

Lire la suite
CODE SAS
Macro _INDEXW: Word Search in a String

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

Lire la suite
CODE SAS
Get File Extension

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

Lire la suite
CODE SAS
Macro _getPgmDesc - Documentation Extraction

SASUnit utility macro designed to extract the short description of a SAS program from Doxygen (br...

Lire la suite
CODE SAS
Utility Macro _IFELSE

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

Lire la suite
CODE SAS
Extract variable metadata and export to Excel

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

Lire la suite
CODE SAS
Macro GetProgramName - Retrieving Program Path

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

Lire la suite
CODE SAS
Data Creation and Retrieval of Observation Count

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

Lire la suite
CODE SAS
SAS Unit Test Template

Code skeleton for writing unit tests.

Lire la suite
CODE SAS
SQL Logical Condition Generator

Utility macro to generate a string of logical conditions (WHERE clause) from lists of columns and...

Lire la suite
CODE SAS
GenFmt Macro: Dynamic Format Generation (Legacy)

Old macro generating a SAS format from a data table by writing the format code to an external file.

Lire la suite
CODE SAS
Dynamic column width calculation for export

Utility script analyzing metadata and content of the SASHELP.CLASS table to determine maximum var...

Lire la suite
CODE SAS
Aligned Text Formatting Macro

Utility macro to build a line of text with elements aligned to the left, center, and right.

Lire la suite
CODE SAS
FORMCHAR Macro for Formatting Character Management

SAS Macro to configure the FORMCHAR system option, allowing selection between standard characters...

Lire la suite
CODE SAS
Begin and End of Month Functions (BeginMonth, EndMonth)

This SAS script defines two custom FCMP functions, BeginMonth and EndMonth, to determine the firs...

Lire la suite
CODE SAS
fixlen Macro: Numeric String Length Adjustment

Macro to adjust a character string (representing a number) to a fixed length for display purposes.

Lire la suite
CODE SAS
Documentation Generation via Code Diary

Configuration and execution script for the `%code_diary` macro to automatically generate technica...

Lire la suite
CODE SAS
Retrieving the format search path (fmtsearch)

Function macro that returns the complete and normalized list of format catalogs defined in the fm...

Lire la suite
CODE SAS
Utility macro for managing the FMTSEARCH option

Checks for the presence of a library in the FMTSEARCH option and adds it if specified.

Lire la suite
CODE SAS
FILEREF Existence Check

This macro checks if a SAS fileref has been assigned and if the associated external file exists, ...

Lire la suite
CODE SAS
FIND_WORD Utility Macro

Macro function returning the ordinal position (nth word) of a specific word in a sentence.

Lire la suite
CODE SAS
Macro for calling the FIND method of a hash object

This SAS macro, designed for use within a DATA STEP, encapsulates the call to the FIND method of ...

Lire la suite
CODE SAS
Factorial Calculation with PROC FCMP

Script defining and using custom functions for factorial calculation via PROC FCMP.

Lire la suite
CODE SAS
SAS Macro for Capturing and Displaying a Log Section

This SAS macro allows capturing a specific section of the SAS log (from a specified marker to the...

Lire la suite
CODE SAS
Conditional Code Deactivation via Macro Variables

Technique for dynamically activating or deactivating a SAS code block using macro variables to ge...

Lire la suite
CODE SAS
Interaction Expansion Macro (Bar Operator)

Set of macros simulating the bar operator '|' used in statistical procedures to automatically gen...

Lire la suite
CODE SAS
GLM Formula Expansion Macros

Set of SAS macros to expand linear model specifications (vertical bar notation) into a full list ...

Lire la suite
CODE SAS
Unit test of the _getAbsPathComponents macro

Unit test script for the _getAbsPathComponents macro, validating the extraction of the filename a...

Lire la suite
CODE SAS
Search for program in autocall libraries

Searches for a specific program file in autocall libraries and returns the identifier of the libr...

Lire la suite
CODE SAS
Test of the _getAutocallNumber macro

Unit test script for the _getAutocallNumber macro verifying the resolution of macro search paths ...

Lire la suite
CODE SAS
Searching for .html/.htm endings with regular expressions

This SAS script uses regular expression (PRX) functions to detect if character strings end with '...

Lire la suite
CODE SAS
SAS _FILE Macro to remove quotes

This SAS script defines a `%_file` macro that takes a character string as an argument and removes...

Lire la suite
CODE SAS
Macro _FINFO - Extended File Information

Utility macro to retrieve detailed file information (date, permissions, size) via a system command.

Lire la suite
CODE SAS
Utility Macro _FIRST

Generates a SAS logical expression to identify the first observation of a BY group or the first g...

Lire la suite
CODE SAS
File Variable Initialization (_FN)

Macro determining the name and path of the currently executing SAS program to initialize global o...

Lire la suite
CODE SAS
Test of the _executeCmdFile macro

Unit test script for the SASUnit _executeCmdFile macro.

Lire la suite
CODE SAS
Macro _EXIST - File Existence Check

Simple SAS macro to check for the existence of a file or directory on the file system.

Lire la suite
CODE SAS
Directory Existence Check

SAS macro to check if a given directory exists and is accessible.

Lire la suite
CODE SAS
Checks for the existence of a variable in a dataset

Macro-function that checks if a variable, with an optional type, exists in a SAS dataset.

Lire la suite
CODE SAS
Simple Inclusion Macro

This script defines a simple SAS macro that displays a message in the log when called.

Lire la suite
CODE SAS
OS Command File Execution

Executes an operating system command file via a SAS macro.

Lire la suite
CODE SAS
SAS Macro for the Number of Observations in a Table

This utility macro returns the number of observations in a SAS dataset specified by its identifie...

Lire la suite
CODE SAS
Using SAS Macro Variable Lists to Create Dynamic Data-Driven Programs

This SAS script is designed to extract student names from the SASHELP.CLASS dataset, concatenate ...

Lire la suite
CODE SAS
Dynamic data segmentation via vertical macro variables

Script using a macro to dynamically divide the SASHELP.CARS table into several sub-tables based o...

Lire la suite
CODE SAS
Creating a list of macro variables with PROC SQL

Exercise showing how to dynamically create a horizontal list of macro variables with PROC SQL.

Lire la suite
CODE SAS
Using SAS Macro Variable Lists to Create Dynamic Data-Driven Programs

Creates a simple macro variable at runtime using the SQL procedure to extract the weight of a spe...

Lire la suite
CODE SAS
Dynamic Macro-Variable Creation with PROC SQL

Exercise to create a macro-variable at runtime using the PROC SQL INTO clause.

Lire la suite
CODE SAS
Using SAS macro variable lists to create dynamic data-driven programs

Creating a macro variable at runtime from the DATA step.

Lire la suite
CODE SAS
Dynamic creation of macro variables via Data Step (Exercise 01)

Practical exercise aimed at creating a macro variable at runtime using a Data Step.

Lire la suite
CODE SAS
ETL Verification and Process Abort

Utility macro to check system return codes (SYSCC) and SQL return codes (SQLRC) and abort the SAS...

Lire la suite
CODE SAS
equals.sas

Function-style macro for DATA STEP to compare two numerical values and determine if they are equa...

Lire la suite
CODE SAS
Macro %EQUESUFF to suffix a list of words with an equal sign

This function-style macro adds an equal sign to the end of each element in a list of words or var...

Lire la suite
CODE SAS
Wrapper for Windows 7 environment variables extraction

Macro wrapper to save Windows 7 environment variables into a SAS table.

Lire la suite
CODE SAS
Macro to ensure a string ends with a specific character

Function-style macro that ensures a non-null value assigned to a macro variable ends with a speci...

Lire la suite
CODE SAS
env2sas

Macro to write system and user environment variables to a SAS table.

Lire la suite
CODE SAS
Remote Submission End Macro

Utility macro to end a remote submission and close the session if a connection is defined.

Lire la suite
CODE SAS
Macro to draw an ellipse

This SAS macro generates the coordinates for drawing an ellipse, taking into account the center, ...

Lire la suite
CODE SAS
Macro eanend - Enhanced Analysis Shutdown

Utility macro used to terminate an analysis or debugging session (probably initiated by a corresp...

Lire la suite
CODE SAS
Macro %Dups for duplicate management

Utility macro to identify duplicates and isolate unique records in a SAS table.

Lire la suite
CODE SAS
Generate a date scale for SAS/GRAPH

SAS macro to generate the start, end and step values for a date scale intended for SAS/GRAPH, bas...

Lire la suite
CODE SAS
Macro _escapeblanks (Escaping blanks)

Documented macro to escape blanks with backslashes under Linux/AIX, although the current implemen...

Lire la suite
CODE SAS
Automated Data Comparison Macro

Defines and uses an '%autocompare' macro to compare two datasets, identify differences, and prese...

Lire la suite
CODE SAS
Trace the location of an autocall macro

This script configures autocall macro libraries in SAS and demonstrates the use of a built-in mac...

Lire la suite
CODE SAS
Dynamic creation of macro variables using SYMPUTX

This script illustrates the use of the CALL SYMPUTX routine to create macro variables whose names...

Lire la suite
CODE SAS
dsall.sas - Dataset List Expansion

Utility macro to expand the _ALL_ notation in a dataset list into all datasets present in the spe...

Lire la suite
CODE SAS
dsc_echofile_tolog Macro

Utility macro to display the content of external files (via filerefs) directly in the SAS log.

Lire la suite
CODE SAS
Wrapper Macro for DOSUBL

A utility macro for executing SAS code via the DOSUBL function.

Lire la suite
CODE SAS
Dquote Macro: Adding Double Quotes

Utility macro to enclose a character string in double quotes while protecting special characters.

Lire la suite
CODE SAS
Macro dropmodifiers

Utility macro to use in a Data Step to remove modifiers (dataset options) from a variable contain...

Lire la suite
CODE SAS
Dropvars Macro

Utility macro to delete a list of unwanted variables from one or more SAS datasets.

Lire la suite
CODE SAS
Directory Existence Check

SAS macro to check if a specified path corresponds to an existing directory.

Lire la suite
CODE SAS
dirfp2ds

Lists full path (Windows) filenames into a SAS dataset.

Lire la suite
CODE SAS
Macro dirfpq - List of files with full path (Windows)

Macro returning a list of files from a Windows directory with their full paths, based on a specif...

Lire la suite
CODE SAS
Count the number of observations in a dataset

SAS macro-function to determine the number of observations in a specified dataset.

Lire la suite
CODE SAS
List files from a directory into a SAS dataset

SAS macro to list file names from a specified directory (via a pattern) into a SAS dataset.

Lire la suite
CODE SAS
List Directory Content

Function-type macro that returns the list of members in a directory on a WINDOWS platform.

Lire la suite
CODE SAS
Unit tests for macro %dep

Test or demonstration script for a utility macro named %dep.

Lire la suite
CODE SAS
Test of the %depall macro

This SAS script tests the behavior and assertions of the `%depall` macro using the assertion macr...

Lire la suite
CODE SAS
Unit test for the depby macro

Test script to validate the functionality of the %depby macro.

Lire la suite
CODE SAS
String Dequoting

Function-style macro to remove matching quotes at the beginning and end of a macro string and ret...

Lire la suite
CODE SAS
Error Return Code Management

SAS macro to capture and propagate the highest error code encountered during the execution of an ...

Lire la suite
CODE SAS
Macro deleteSasmacN - Cleaning numbered SASMAC catalogs

Macro deleting all numbered 'sasmacr#' catalogs in the WORK library, without deleting the main 's...

Lire la suite
CODE SAS
Delete entries from a graphics catalog

This macro deletes specific entries or all entries from a SAS graphics catalog.

Lire la suite
CODE SAS
Macro Variable Existence Check (Defined)

Macro checking if a macro variable is defined in the global environment.

Lire la suite
CODE SAS
Macro variable existence check (defined)

Macro function that determines if a specific macro variable is defined in the global environment.

Lire la suite
CODE SAS
Macro _DIRCHAR for directory character

This macro returns the appropriate directory separator character for the operating system.

Lire la suite
CODE SAS
DROPMISS Macro - Deleting Empty Variables

SAS macro to delete variables from a table that contain no data (only missing values).

Lire la suite
CODE SAS
Deletion of Temporary Datasets

Utility macro to delete specific temporary datasets (starting with 'DATA') from the WORK library.

Lire la suite
CODE SAS
Macro for Dynamic Formatting

This macro dynamically applies SAS formats to specified variables, based on the existence of pre-...

Lire la suite
CODE SAS
DeBlackHole Debug Macro

Utility macro designed to reset the SAS interpreter in case of persistent syntax errors (open quo...

Lire la suite
CODE SAS
DBMSlist Macro - Batch Database Querying

SAS macro designed to query a relational database using values from a SAS dataset as filtering cr...

Lire la suite
CODE SAS
SAS Table Existence Assertion Macro

Utility macro used in unit tests to verify the existence (or non-existence) of a given SAS table ...

Lire la suite
CODE SAS
Explicit Test Failure Registration

Macro to explicitly record a test as failed with an optional message.

Lire la suite
CODE SAS
Temporary File Name Generation

Macro to create a unique temporary file name in a specific folder.

Lire la suite
CODE SAS
Dynamic CSV export macro csv_vnext

Utility macro to export a SAS dataset to a delimited file (CSV) using a DATA _NULL_ step and the ...

Lire la suite
CODE SAS
SAS Macro for Centered Title with Form Feed

This SAS macro creates a centered page title and adds a form feed character at the far right (FFx).

Lire la suite
CODE SAS
Numeric variable categorization macro (cut)

This SAS macro categorizes a numeric variable into user-defined classes (bins). It creates a new ...

Lire la suite
CODE SAS
Space Cleaning Command Macro

Command-type macro to replace multiple spaces with single spaces.

Lire la suite
CODE SAS
Test Macro for Cross-Referencing

Test macro designed to demonstrate and validate the cross-referencing functionality of macro call...

Lire la suite
CODE SAS
Cross-reference Test Macro

This SAS macro, named 'CrossReferenceTest2', is a component of the SASUnit test framework. It cre...

Lire la suite
CODE SAS
Test macro for cross-referencing

Simple test macro to demonstrate cross-referencing and numerical parameter evaluation.

Lire la suite
CODE SAS
Creation of EXA Test Data Table

Macro to create the EXA test database table for the SASUnit framework.

Lire la suite
CODE SAS
TSU Test Data Table Creation Macro

SAS macro to create a test data table named 'tsu' in a specified library. This table is used to s...

Lire la suite
CODE SAS
Pre-processing macro for a unit test

This macro prepares the environment for test execution. It cleans up previous test artifacts, inv...

Lire la suite
CODE SAS
Creation of the test database

Creates a test database for the SASUnit framework.

Lire la suite
CODE SAS
Creation of the SASUnit test case table

Macro creating the 'cas' table intended to store test case metadata and results within the SASUni...

Lire la suite
CODE SAS
Code Diary Documentation Generation

Script for configuring and executing the generation of technical documentation from SAS code.

Lire la suite
CODE SAS
AHG Macro Analysis and Metadata Creation

This SAS script analyzes code files to identify and extract macro names starting with 'ahg', then...

Lire la suite
CODE SAS
SAS Hash Object Definition Macro

Utility macro to declare, instantiate, and initialize a SAS Hash object from a dataset.

Lire la suite
CODE SAS
String List Formatting Utility (CQUOTE)

Converts a space-separated list of values into a comma-separated quoted list.

Lire la suite
CODE SAS
List Conversion and Formatting Macro

This utility macro converts a list of elements (provided as a delimited string) into a new format...

Lire la suite
CODE SAS
Macro %compress for string management

This SAS macro encapsulates the COMPRESS function to remove specified characters from a text stri...

Lire la suite
CODE SAS
Colnames Macro: List Variables (R-style)

Utility macro simulating R's colnames() function to list variables of a SAS table located in the ...

Lire la suite
CODE SAS
Macro to replace the last comma with ' and '

This macro replaces the last occurrence of the sequence ', ' (comma-space) with ' and ' in a give...

Lire la suite
CODE SAS
Global Test Execution

This script initializes the environment via autoexec and launches all tests defined by the %test ...

Lire la suite
CODE SAS
Macro assertTrue - Check if a condition is true

SASUNIT Macro to evaluate a condition and assert that it is true, handling numeric and character ...

Lire la suite
CODE SAS
cmd2sas Macro

SAS macro to execute a local system command and write its output to a data set.

Lire la suite
CODE SAS
Macro Management and Exploration via SAS Catalog

This SAS script defines, stores, copies, and lists macros contained within a SAS macro catalog.

Lire la suite
CODE SAS
Simple Macro Definition and Call

This SAS script defines a simple macro named 'test' that creates an empty dataset 'test'. The mac...

Lire la suite
CODE SAS
Numeric String Alignment Macro

SAS macro to vertically align character variables representing numbers based on separators (dot, ...

Lire la suite
CODE SAS
Variable Reordering / Selection Macro

Main SAS macro (`%chn_dt_ordvar`) designed to reorder a dataset by placing a specified set of var...

Lire la suite
CODE SAS
Utility Macro chn_ut_0

Utility macro returning a specific string if the first parameter provided is empty.

Lire la suite
CODE SAS
Conditional String Emission Macro

Utility macro that generates a specific character string only if a test variable is not empty.

Lire la suite
CODE SAS
Token Counting Macro

This SAS macro counts the number of tokens (words) in a given string, using a specified delimiter.

Lire la suite
CODE SAS
Execution and Reporting Pilot Script (Chapter 8)

Orchestrator script that cleans the environment, loads a series of external SAS programs, and def...

Lire la suite
CODE SAS
Autocall Library Verification

Simple macro to verify the proper functioning of the autocall library by writing a message to the...

Lire la suite
CODE SAS
Macros for Canonical Naming and Versioning Management

Script defining utility macros for normalizing names via handlers and checking SAS version.

Lire la suite
CODE SAS
Case Replacement Macro

Function-style macro to force the case of a specific substring within a source string.

Lire la suite
CODE SAS
CAT Macro: Concatenation of Variable Values

This SAS macro concatenates the values of a list of variables into a single output variable, usin...

Lire la suite
CODE SAS
Macro for dynamic macro re-execution with dataset parameters

This macro allows repeated execution of another macro by passing parameters dynamically read from...

Lire la suite
CODE SAS
Documentation Automation with Code Diary

Configuration and execution script to generate SAS project documentation in Markdown and HTML for...

Lire la suite
CODE SAS
Graphic Shape Drawing Macros (Brackets, Arcs, Lines)

This SAS script defines three utility macros (%bracket, %arcpie, %line) to facilitate the drawing...

Lire la suite
CODE SAS
Test macro with log display

Defines a simple macro that writes the value of its parameter to the SAS log and configures log d...

Lire la suite
CODE SAS
Remove the last BY title and store it in a macro variable

Macro to remove the last title if it's a title generated by a 'BY' clause and store its content i...

Lire la suite
CODE SAS
Deletion of macro variables and macros

Macro for deleting macro variables (potentially macro variable arrays) and, optionally, compiled ...

Lire la suite
CODE SAS
Macro boxanno - Scatter plot annotation with box plots

Set of macros (boxaxis and boxanno) to create annotation datasets for adding univariate box plots...

Lire la suite
CODE SAS
Creation of Base Datasets

This SAS script defines a `%basedatasets` macro that creates three temporary datasets (Customer, ...

Lire la suite
CODE SAS
Retrieve a numeric attribute from a dataset

Macro-function to retrieve the value of a numeric attribute from a SAS dataset (e.g., number of o...

Lire la suite
CODE SAS
Retrieve a numeric attribute from a dataset

Macro-function to retrieve a numeric attribute from a SAS dataset, such as the number of observat...

Lire la suite
CODE SAS
Malformed Macro with Log Messages

Analysis of a simple SAS macro, named 'whaaat', illustrating formatting issues such as poor inden...

Lire la suite
CODE SAS
Test of the assertref macro

Unit test script for the %assertref assertion macro.

Lire la suite
CODE SAS
Macro assert_not_exist - Table non-existence assertion

Test macro generating an event if a specified SAS table exists.

Lire la suite
CODE SAS
Macro assert_not_fileexist - Assertion for file absence

Generates an event if a specified file exists, used to validate that a file should not be present.

Lire la suite
CODE SAS
Macro assert_not_null - Non-Nullity Assertion

Test utility macro generating an event if the specified argument is null or has zero length.

Lire la suite
CODE SAS
Macro assert_not_zero - Non-nullity Assertion

Generates an event (error/alert) if the argument value is equal to zero.

Lire la suite
CODE SAS
Macro assert_null - Non-null value assertion

Test macro checking if an argument is not null and generating an event accordingly.

Lire la suite
CODE SAS
Macro assert_zero - Null Value Assertion

Unit test macro checking if a given value is equal to zero and generating an event in case of fai...

Lire la suite
CODE SAS
Unit Tests with Assertions

Demonstration script for unit tests using assertion macros.

Lire la suite
CODE SAS
assertManual Macro

SAS Macro for handling manual assertions in the SASUnit testing framework.

Lire la suite
CODE SAS
Test program for _getpgmdesc with brief tag

Unit test script defining a simple macro, used to validate the processing of Doxygen documentatio...

Lire la suite
CODE SAS
Macro assert_exist - Table existence verification

Unit test macro verifying the existence of a SAS table and generating an event in case of failure.

Lire la suite
CODE SAS
Sans titre

Unit test macro verifying the presence of a physical file and generating an event if it is absent.

Lire la suite
CODE SAS
Substring Extraction After Target Character

SAS functional macro to extract the part of a string located after the first occurrence of a targ...

Lire la suite
CODE SAS
Allocation Macro for Read-Only Libraries (allocr)

Example macro to allocate data and format libraries in read-only mode for a specific clinical stu...

Lire la suite
CODE SAS
AHGwt Macro - Writing to a file

Utility macro to write a specific character string to a text file.

Lire la suite
CODE SAS
AHGzero Macro for Numeric Formatting

This macro formats a given number into a character string of a specified length, using the %SYSFU...

Lire la suite
CODE SAS
Formatting Macro for Clipboard

SAS Macro to read clipboard content, format it, and save it to a text file for Microsoft Word.

Lire la suite
CODE SAS
Decimal Point Alignment Macro (aligndp.sas)

This SAS macro, designed for use in a DATA step, formats a numeric variable into a character vari...

Lire la suite
CODE SAS
Macro allafter

This function-style macro returns the part of a character string that follows the first occurrenc...

Lire la suite
CODE SAS
AHGwhere Utility Macro

Macro systematically returning the value 1, likely acting as an 'always true' condition.

Lire la suite
CODE SAS
Macro Iteration AHGwildall

Utility macro that iterates over a list of words to execute the %AHGwild macro on each of them.

Lire la suite
CODE SAS
Operating System Detection (Windows/Unix)

Utility macro to determine if the SAS execution environment is Windows or Unix.

Lire la suite
CODE SAS
Windows Temporary Path Macro

Macro defining a Windows-specific temporary directory path.

Lire la suite
CODE SAS
Word Relationship Management

This SAS macro manages word relationships by storing and deduplicating them in a SAS table 'allst...

Lire la suite
CODE SAS
AHGtime Macro for Timestamp Capture

Utility macro recording the current time in a dynamic global macro variable.

Lire la suite
CODE SAS
AHGuncompress Macro - Character Retention

Utility macro that allows retaining only specified characters in a text string, acting as a posit...

Lire la suite
CODE SAS
AHGupdir Macro - Go up in the directory tree

Utility macro to go up one or more levels in a directory hierarchy.

Lire la suite
CODE SAS
Selection of temporary dataset names by prefix

This macro allows selecting temporary dataset names (libname WORK) that start with a specified st...

Lire la suite
CODE SAS
Macro to list macros by prefix

This macro lists all SAS macros whose names start with a specified prefix and stores their names ...

Lire la suite
CODE SAS
AHGuseLabel Macro - Variable Renaming by Label

This SAS macro allows renaming variables in a dataset using their label as the basis for the new ...

Lire la suite
CODE SAS
User Path Definition Macro

Defines a macro that returns a network path specific to the current user.

Lire la suite
CODE SAS
AHGsome Utility Macro

Defines a utility macro called AHGsome, which checks if a given character string is not empty usi...

Lire la suite
CODE SAS
Study Day Calculation Macro

SAS macro calculating the study day (duration) between two given dates.

Lire la suite
CODE SAS
AHGsubsetdsn In-place Filtering Macro

SAS macro to filter an existing dataset, replacing it with a subset based on a globally provided ...

Lire la suite
CODE SAS
String Normalization Macro AHGtabnoStr

Utility macro to replace dots and spaces with underscores in a character string.

Lire la suite
CODE SAS
AHGtag Macro

Utility macro for generating simple HTML or XML tags.

Lire la suite
CODE SAS
Iterative Substring Extraction Macro

Utility macro sequentially extracting a defined number of segments from a character string.

Lire la suite
CODE SAS
AHGscanxy Macro for Substring Extraction

This utility macro extracts a specific element from a character string using coordinate-based (x,...

Lire la suite
CODE SAS
Sans titre

This macro initializes all numeric variables to '.' (missing) and all character variables to '' (...

Lire la suite
CODE SAS
AHGsethashvalue Macro - Hash Value Assignment

Utility macro for assigning a value to a specific key (handle) in a 'hash' type data structure si...

Lire la suite
CODE SAS
AHGsetprint Macro: Merging and Formatting SAS Tables

Macro for combining (stacking) multiple SAS tables while standardizing variables to character for...

Lire la suite
CODE SAS
Definition of the AHGshortpath macro

Definition of a SAS macro named AHGshortpath. Currently empty.

Lire la suite
CODE SAS
Macro AHGRTFtotxt - RTF Conversion and Parsing

Utility macro designed to convert an RTF file into a flat text file or a SAS dataset. It cleans R...

Lire la suite
CODE SAS
RTF to Text File Conversion

SAS macro to convert an RTF file to a plain text file by cleaning up formatting tags.

Lire la suite
CODE SAS
Macro to configure Autocall macro paths

SAS macro that dynamically configures the SASAUTOS system option to define autocall macro search ...

Lire la suite
CODE SAS
Definition of the AHGsavecommandline macro

Definition of an empty SAS macro with parameters.

Lire la suite
CODE SAS
AHGsavedsn Macro - Table backup with suffix

Macro for duplicating a SAS table by adding a suffix to the output table name.

Lire la suite
CODE SAS
Nested String Parsing Macro

Utility macro for extracting substrings from a string with nested delimiters.

Lire la suite
CODE SAS
AHGscanDim Macro - Sequential Word Extraction

Macro extracting a sequence of three words from a character string based on a calculated index.

Lire la suite
CODE SAS
QC Bug Assignment Macro

SAS macro to assign one or more bug IDs to a specified user with an optional due date, potentiall...

Lire la suite
CODE SAS
Random Suffix Generation (AHGrandom Macro)

Utility macro generating a pseudo-random numeric string based on a normal distribution, with spec...

Lire la suite
CODE SAS
Random String Generation

This SAS macro generates a random string of uppercase letters (from A to X) of a specified length...

Lire la suite
CODE SAS
AHGremoveSlash Macro

This macro removes a slash ('/' or '\') from the end of a string.

Lire la suite
CODE SAS
AHG Logs/Reports Visualization

This macro dynamically constructs a logging or report file path, modifies it, and then opens it f...

Lire la suite
CODE SAS
AHGprocMeansBy Macro - Statistics by segments

Utility macro to calculate statistics on data segments (defined by a 'by' variable) and consolida...

Lire la suite
CODE SAS
PROC PRINT Macro for Printing

This macro simplifies the use of PROC PRINT for printing datasets.

Lire la suite
CODE SAS
AHGPtoL Display Macro

Simple macro displaying the content of a parameter in the SAS log.

Lire la suite
CODE SAS
SAS Pure Table Name Extraction (AHGpureName Macro)

Utility macro to extract the root name of a SAS table, ignoring dataset options (such as WHERE or...

Lire la suite
CODE SAS
Macro AHGpush - Concatenation of values in a macro variable

Utility macro for adding a value to a list stored in a macro variable.

Lire la suite
CODE SAS
ahgputc Macro: INPUT Conversion with Default Format

Utility macro applying the INPUT function to a variable with automatic default format management.

Lire la suite
CODE SAS
Format application macro and left alignment

Utility macro to format a variable and left-align the result.

Lire la suite
CODE SAS
AHGputvar Macro

Debugging macro to insert markers into the log, with an incomplete display instruction.

Lire la suite
CODE SAS
Macro _begin for IN: operator

SAS _begin macro that generates a list of items for the IN: operator, designed to replace the %_i...

Lire la suite
CODE SAS
Macro _BIN: Generating IN Operators

Utility macro designed to generate lists of values for the IN() operator in a more robust way tha...

Lire la suite
CODE SAS
Analysis of the _BY macro

This SAS macro, named _BY, is designed to dynamically manipulate the list of variables used in a ...

Lire la suite
CODE SAS
Change Directory (OS-independent)

SAS macro to change the current directory in an OS-independent manner (Unix/Windows).

Lire la suite
CODE SAS
Runtime Environment Verification (_checkRunEnvironment)

Validation macro checking if the operating system and SAS version are supported.

Lire la suite
CODE SAS
Counting Subjects by Treatment Group

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

Lire la suite
CODE SAS
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 ...

Lire la suite
CODE SAS
get_append_base Macro for Structure Generation

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

Lire la suite
CODE SAS
Data Preparation for EM5BATCH

This SAS script prepares the 'workspace' and 'actions' datasets, which are used as input paramete...

Lire la suite
CODE SAS
Macro AHGNum2date - Numeric Date Formatting

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

Lire la suite
CODE SAS
Windows Operating System Check

This macro checks if the operating system is Windows.

Lire la suite
CODE SAS
AHGopenby Macro - Automated File Opening

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

Lire la suite
CODE SAS
AHGopenbystr Macro - File Search via Perl

SAS macro invoking a system command to execute an external Perl file search script.

Lire la suite
CODE SAS
Macro for displaying variables (AHGpm)

Utility macro designed to display the names and values of a list of macro variables passed as an ...

Lire la suite
CODE SAS
Substring Position Search (Case-Insensitive)

Macro returning the case-insensitive position of a substring within a string.

Lire la suite
CODE SAS
AHGppt Utility Macro

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

Lire la suite
CODE SAS
F-statistic P-value Calculation Macro (AHGprintF)

Macro calculating a probability (p-value) from an F-distribution and invoking a utility macro %AH...

Lire la suite
CODE SAS
AHGmacAndvalue Macro for Key-Value Pairs

This SAS macro parses a string containing key-value pairs and assigns these values to macro varia...

Lire la suite
CODE SAS
Macro Existence Check

Utility macro checking if a specific macro already exists in the SAS session.

Lire la suite
CODE SAS
SAS Table Merge Macro (AHGmergedsn)

Utility macro to merge two SAS tables with automatic sorting and join type management (Left, Righ...

Lire la suite
CODE SAS
Conditional Management of the MPRINT Option

Utility macro to re-enable the MPRINT option based on the value of a global variable.

Lire la suite
CODE SAS
Count observations in a table

This macro counts the number of observations in a specified SAS table. If the table does not exis...

Lire la suite
CODE SAS
NOMPRINT Option Management (AHGnomprint)

Utility macro disabling the MPRINT option and managing a global counter.

Lire la suite
CODE SAS
AHGnonblank Macro - Non-empty String Check

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

Lire la suite
CODE SAS
Server Detection Macro

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

Lire la suite
CODE SAS
AHGLIKE Macro for Word Filtering

This macro allows filtering words from a character string by comparing each word (after removing ...

Lire la suite
CODE SAS
Macro AHGlinebyline: Vertical display of words

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

Lire la suite
CODE SAS
Macro for local macro variable creation

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

Lire la suite
CODE SAS
AHGlocalusermac Macro

Locally declares existing global macros.

Lire la suite
CODE SAS
Macro AHGlocf - LOCF Imputation

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

Lire la suite
CODE SAS
AHGLtoP Macro: Vertical List Display

Utility macro to display elements of a horizontal list (delimited string) vertically in the SAS log.

Lire la suite
CODE SAS
ID Increment Macro

SAS macro to increment a global counter and generate a formatted ID with a prefix.

Lire la suite
CODE SAS
AHGidx Macro

Wrapper macro calling the AHGin macro by reversing the order of the main parameters.

Lire la suite
CODE SAS
AHGin Macro - Substring Search

Functional macro returning the position of a substring within a string, with optional case handling.

Lire la suite
CODE SAS
Macro variable incrementation

Utility macro for incrementing the value of an existing macro variable.

Lire la suite
CODE SAS
Finding the Second Delimiter in a String

This custom SAS macro finds the position of the second specified delimiter within a character str...

Lire la suite
CODE SAS
Macro variable initialization

Utility macro to initialize a list of macro variables to an empty value.

Lire la suite
CODE SAS
AHGkill Macro for Deleting SAS Datasets

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

Lire la suite
CODE SAS
AHGlibname Macro - Libref Extraction

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

Lire la suite
CODE SAS
Font size configuration macro

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

Lire la suite
CODE SAS
AHGforceFormat Macro - Forced variable formatting

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

Lire la suite
CODE SAS
Macro AHGformatvar - Applying formats to a dataset

Utility macro for applying SAS formats to a specified dataset.

Lire la suite
CODE SAS
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 an...

Lire la suite
CODE SAS
Definition of macro AHGgetTempVname

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

Lire la suite
CODE SAS
AHGgetwords Macro

Utility macro to extract a specified number of words from a character string.

Lire la suite
CODE SAS
AHGhashvalue Macro - Hash Value Retrieval

Retrieves a value associated with a specific key in a hash-like structure implemented via macro v...

Lire la suite
CODE SAS
Macro AHGfilesindir - Listing files in a directory

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

Lire la suite
CODE SAS
AHGeqV Macro (text comparison)

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

Lire la suite
CODE SAS
Exclude elements from a string

Macro that allows filtering specific words or substrings from a main string using a given delimiter.

Lire la suite
CODE SAS
String obfuscation macro

This SAS macro takes a character string as input and returns a transformed string by applying a s...

Lire la suite
CODE SAS
Extracting File Name from a Path

This utility macro extracts the base filename from a full path, handling both Unix (/) and Window...

Lire la suite
CODE SAS
Macro AHGeqm

Wrapper macro to call the AHGequalmactext macro.

Lire la suite
CODE SAS
Case-insensitive text comparison macro

Utility macro comparing two character strings without considering case.

Lire la suite
CODE SAS
Case-insensitive text comparison

Macro comparing two character strings without considering case.

Lire la suite
CODE SAS
AHGdefault Utility Macro

Defines a utility macro to assign a default value to a specified macro variable if it is currentl...

Lire la suite
CODE SAS
Macro AHGdim - Dimension Calculation

Utility macro calculating a dimension rounded up to the nearest integer, based on a count of elem...

Lire la suite
CODE SAS
File Inclusion Macro in SAS Studio

Utility macro designed to include SAS files (code) from predefined directories ('&kanbox\allover'...

Lire la suite
CODE SAS
Bin folder download macro

Wrapper macro calling %AHGzipdown to download a specific folder.

Lire la suite
CODE SAS
Temporary File Management Macro for Comparison

This SAS macro manages the creation or opening of temporary files and the deletion of a macro var...

Lire la suite
CODE SAS
AHGdownsysMac System Download Macro

Macro encapsulating a call to zip and download SAS files from a specific directory.

Lire la suite
CODE SAS
AHGdsn Macro - Table Filtering and Duplication

Utility macro to create a new SAS table from an existing table by applying an optional filter.

Lire la suite
CODE SAS
Clear AHG Report Macros

Defines a macro to clear macros whose name starts with a specified prefix.

Lire la suite
CODE SAS
Comparison of Versioned Files AHGcmpWithSys

This SAS macro allows the comparison of two versions of a specified file, potentially managed by ...

Lire la suite
CODE SAS
ahgD Delimiter Utility Macro

Macro conditionally inserting a delimiter.

Lire la suite
CODE SAS
AHGdatanodupkey Deduplication Macro

SAS macro to sort a table and remove records with duplicate keys.

Lire la suite
CODE SAS
Macro for Current Date and Time

This macro generates a macro variable containing the current date and time, formatted according t...

Lire la suite
CODE SAS
Getting the current date and time

Utility macro to get the current system date and time and store them in a specified SAS macro var...

Lire la suite
CODE SAS
Indirect macro variable resolution

Utility macro allowing indirect resolution of a macro variable.

Lire la suite
CODE SAS
ahgarr List Element Extraction Macro

Utility macro to extract a specific element from a list stored in a macro variable.

Lire la suite
CODE SAS
Versioned Autoexec Include Macro

Utility macro to dynamically include a specific autoexec file based on a version number.

Lire la suite
CODE SAS
AHGbareName Macro

Utility macro to extract the 'bare name' of a dataset or file.

Lire la suite
CODE SAS
Extracting the Base Name of a Dataset

Utility macro to extract the base name of a dataset, whether or not it is prefixed by a library.

Lire la suite
CODE SAS
AHGblank Macro

Macro to check if a character string is empty or contains only spaces.

Lire la suite
CODE SAS
Macro to load dataline data into macro variables

This macro reads data lines provided via `datalines` and stores them in a series of numbered macr...

Lire la suite
CODE SAS
Macro AHGaddBase - Adding a constant to a list

Utility macro to add a base value (constant) to each numeric element of a list.

Lire la suite
CODE SAS
AHGaddcomma Utility Macro

Macro replacing spaces with commas (or another separator) in a character string.

Lire la suite
CODE SAS
Definition of the ahgaddfmtby macro

Utility macro to duplicate a variable and apply a standard numeric format to it in a dataset.

Lire la suite
CODE SAS
Conditional addition of trailing slash

Utility macro to add a directory delimiter to the end of a path if necessary.

Lire la suite
CODE SAS
Macro to add entry to CDARS system metadata

SAS macro to add a unique entry (identified by 'tot') to a metadata file (`reports.meta`), integr...

Lire la suite
CODE SAS
AHGaddvars Macro: Adding and Formatting Variables

Utility macro to apply formats to a list of variables in a SAS table, creating these variables if...

Lire la suite
CODE SAS
Macro to add words after deletion

This utility macro combines deleting words from a phrase with adding new words to the end, using ...

Lire la suite
CODE SAS
Age calculation from dates

This SAS macro calculates a person's age in full years based on their date of birth and a referen...

Lire la suite
CODE SAS
Date Management with FCMP Functions

This SAS script defines and uses FCMP functions to manipulate dates by adding or subtracting mont...

Lire la suite
CODE SAS
Unit Test Template for sas_str_pool_add

Script skeleton for writing unit tests.

Lire la suite
CODE SAS
Add a path to SASAUTOS

Concatenates a macro library to the sasautos path.

Lire la suite
CODE SAS
Conditional Utility Macro ahg0

Macro that returns a specific character string if an input parameter is empty.

Lire la suite
CODE SAS
Conditional Execution Utility Macro

Macro executing a SAS statement if a specified parameter is not empty.

Lire la suite
CODE SAS
Forced termination of SAS program (_ABEND)

This SAS script defines an _ABEND macro that allows a SAS program to be stopped depending on the ...

Lire la suite
CODE SAS
Documentation Generation and HTML Conversion

Script configuring and executing the code_diary macro to generate project documentation, followed...

Lire la suite
CODE SAS
Test program for _getpgmdesc

Test program for the _getpgmdesc functionality using 'brief' documentation tags.

Lire la suite
CODE SAS
Utility macro library for table management and interface

Script defining utility macros to delete, copy, and inspect SAS tables, as well as an interface c...

Lire la suite