Utility

35 Résultats disponibles

Utility
Stop Hardcoding Filenames: How to Dynamically List Directory Contents in SAS

This SAS macro allows listing the names of all files in a specified folder location. It can either display the file n...

View code
Utility
Cross-Platform Binary File Copy

SAS macro to copy any file byte by byte using binary input/output streams, offering an operating system independent c...

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
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
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
Utility
Dynamic Macro Execution on Metadata

Script dynamically generating macro calls for tables whose name contains a specific pattern.

View code
Utility
Display the content of the temporary macro catalog

This script uses PROC CATALOG to list the entries (compiled macros) of the temporary 'sasmacr' catalog in the 'WORK' ...

View code
Utility
Macro lsfp2ds

Creates a SAS dataset from a list of Unix/Linux file names with full paths.

View code
Utility
Create a SAS dataset from a list of Unix/Linux files

SAS macro to list Unix/Linux filenames and write them into a SAS dataset.

View code
Utility
Export JSON from SASHELP.ORSALES

Export a SASHELP table to JSON and display it in the log.

View code
Utility
Emits an error message to a logger

This macro emits an error message to a specified logger.

View code
Utility
Sending a Debug Message to the Log

This macro sends a debug-level message to a specified logger via the log4sas_logevent function. It includes checks to...

View code
Utility
Macro to retrieve a variable's label

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

View code
Utility
Generating SAS documentation in Markdown and HTML

This SAS script uses the %code_diary and %convert_markdown_to_html macros to generate documentation from SAS files an...

View code
Utility
Definition of numeric format fmtNum

Defines a custom SAS value format named fmtNum to categorize numbers.

View code
Utility
Function F1

This script defines a simple SAS function named F1 that takes a number as input and returns this number incremented b...

View code
Utility
SAS Email Notification

This SAS script defines and uses macros to send email notifications, including the start and end execution times of a...

View code
Utility
Viewing FCMP Function Libraries

This SAS script is used to list and view the contents of an FCMP function library, specifically 'advrpt.functions'.

View code
Utility
Deletion of WORK data

This script deletes all temporary data tables (memtype=data) from the WORK library.

View code
Utility
Utility macro to delete a file

This macro allows you to delete a file from the file system if it exists.

View code
Utility
SAS Tables Deletion Demonstration

This script illustrates the use of the `%delete_dataset` macro to delete SAS tables in various ways.

View code
Utility
SAS Macro _DATA: Extracting Table Name

This SAS macro extracts the name of a table from a complete reference (library.table) or a simple one, ignoring the l...

View code
Utility
Execute a system command and capture output into a dataset

This SAS macro allows executing a local operating system command and capturing its output line by line into a new SAS...

View code
Utility
Log and Output Cleaning

This macro resets the output, log, and ODS results windows in the SAS environment.

View code
Utility
Email Address Validation with PRXMATCH and FCMP

This SAS script validates email addresses using a custom `CheckMail` function defined with `PROC FCMP` and the `PRXMA...

View code
Utility
CDM Schema Validation

SAS macro to validate the compatibility of UDM and CDM schema versions.

View code
Utility
HTTP GET Request with Basic Authentication and JSON Processing

This SAS script performs an HTTP GET request to an external URL protected by basic authentication and processes the r...

View code
Utility
SAS Catalog Scan Utility

This macro allows exploring and printing the source content of a specified SAS catalog to a text file, then displayin...

View code
Utility
WORK Library Consultation

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

View code
Utility
CCLI Library Definition

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

View code
Utility
Cleaning the WORK macro catalog

Macro to delete the compiled macro catalog in the temporary WORK library.

View code
Utility
SAS Header Options Documentation

This comment block provides a standard description of commonly used SAS options for script headers, including configu...

View code