Validation macro checking if the operating system and SAS version are supported.
View code
Test
Test of the _checkRunEnvironment.sas macro
This script is a unit test for the SAS macro `_checkRunEnvironment.sas`, which is part of the SASUnit testing framewo...
View code
ETL
Data Creation and WORK Library Management
The script creates a temporary SAS dataset named THREEROWS and executes PROC DATASETS on the WORK library.
View code
Data Management
Creation of format for US states
Definition of a custom format associating numeric codes with state names.
View code
Data Management
Definition of Custom Formats for States and Sex
Creation of two SAS formats to convert numeric codes into explicit labels.
View code
Data Manipulation
Monetary Data Formatting
Script for creating a cost table and applying a monetary format.
View code
ETL
Applying COMMA Numeric Format
Creation of a dataset and application of a thousands separator format.
View code
ETL
Creation and formatting of monetary data
Creation of a table with formatted monetary values and metadata analysis.
View code
ETL
BMI Calculation via Data Step
Simple Body Mass Index (BMI) calculation with output to the log.
View code
Reporting
Data Visualization with PROC CHART
This SAS script illustrates the creation of in-line datasets and the use of the PROC CHART procedure to generate vari...
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
ETL
Creating and Displaying the CEREAL Dataset
This SAS script creates a `work.cereal` dataset using embedded data via `datalines`, then displays the content of thi...
View code
Administration
Management and Connectivity to the SAS/SHARE Server
This document describes examples of managing a SAS/SHARE server (starting, stopping) and accessing remote data via a ...
View code
Général
Sans titre
Examples of htmSQL scripts (legacy web technology) integrating SAS SQL results into HTML pages.
View code
Général
Sans titre
This SAS script uses the HTTP procedure to send an HTTP request to a web server. The request body is defined inline w...
View code
Configuration
Configuring SAS Log Colors (Legacy)
Customizing the colors of error and warning messages in the SAS log via Display Manager commands.
View code
Connectivity
Connect to Snowflake via LIBNAME
This script establishes a connection to a Snowflake database using a LIBNAME statement and the SAS/ACCESS interface.
View code
ETL
Creation of the THREEROWS table
Creation of a simple SAS table with data included in the code.
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 ManipulationCAS
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.
ETLCAS
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.
ToolsCAS
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.
ETLCAS
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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.