DOCUMENTATION
  • Software
    • Software
    • SAS Viya
    • Industries
    • Solutions
    • Products
  • Learn
    • Learn
    • Training
    • Certification
    • Academics
    • Books
    • Video Tutorials
  • Support
    • Support
    • Communities
    • Documentation
    • Developers
    • Support & Services
    • User Groups
  • About Us
    • About Us
    • Why SAS?
    • Company
    • Careers
    • Newsroom
    • Events
    • Contact Us
  • Explore
    • Explore
    • Try & Buy
    • Why SAS?
    • Customer Stories
    • Partners
    • Consulting
  • Software
  • SAS Viya
  • Industries
  • Solutions
  • Products
  • Learn
  • Training
  • Certification
  • Academics
  • Books
  • Video Tutorials
  • Support
  • Communities
  • Documentation
  • Developers
  • Support & Services
  • User Groups
  • About Us
  • Why SAS?
  • Company
  • Careers
  • Newsroom
  • Events
  • Contact Us
  • Explore
  • Try & Buy
  • Why SAS?
  • Customer Stories
  • Partners
  • Consulting
  • Contact Us
Sign In

Create Profile

My SAS

Get access to My SAS, trials, communities and more.

SAS Sites

sas.com
Support
Blogs
Communities
Developer
Curiosity
Videos

Documentation

Learn
Brand
PartnerNet
Merchandise
SAS® Help Center
SAS® Viya® Platform Programming Documentation
2026.10
|PDF 
Feedback
 
  • Welcome to SAS Programming Documentation
  • What's New
  • Learning SAS Viya Platform Programming
  • Syntax Quick Links
  • Python Programming
  • Advanced Analytics
  • Data Access
  • Cloud Analytic Services
  • SAS Language Reference
    • SAS Programmer’s Guide: Essentials
    • Base SAS Procedures
    • DATA Step Programming
    • Global Statements
    • System Options
    • Macro Language Reference
    • FedSQL Programming
    • DS2 Programming
      • DS2 Reference
      • DS2 Programmer’s Guide
    • SAS Component Objects
    • Expression Language
  • Migrating to UTF-8
  • Example Data Sets
  • SAS Code Debugging
  • Output and Graphics
  • In-Database Processing
  • Security and Administration
  • SAS Servers
  • Using the batch Plug-In for the SAS Viya CLI
  • Accessibility on the SAS Viya Platform
  • SAS Data Quality
  • SAS Job Execution Web Application Doc Link
  • SAS Job Execution Web Application
  • SAS Data and AI Studio
  • SAS Visual Analytics
  • SAS Viya Platform: Administration
  • SAS Viya Platform Operations
  • Other Resources
DS2 Programmer’s Guide
 

SAS® DS2 Programmer’s Guide

Introduction
Introduction to the DS2 Language
DS2 Concepts
DS2 Programming Semantics
DS2 Variables
DS2 Constants
DS2 Data Types
DS2 Identifiers
How DS2 Processes Nulls and SAS Missing Values
DS2 Type Conversions
DS2 Expressions
Dates and Times in DS2
DS2 Arrays
DS2 Varlists
DS2 Packages
Threaded Processing
Using DS2 and FedSQL
DS2 Input and Output
Combining Tables
Reserved Words
DS2 and CAS
DS2 in CAS: Concepts
Running DS2 Programs in CAS
Model Publishing and Scoring
Appendixes
DS2 Type Conversions for Expression Operands
DS2 Loggers
Resolving DS2 Errors
Last updated: August 17, 2026
Datenschutzerklärung Nutzungsbedingungen 
Copyright © SAS Institute Inc. All Rights Reserved