0% found this document useful (0 votes)
11 views

21968912

The document provides information about various SAS certification prep guides available for download, including titles, ISBNs, and links to access them. It emphasizes the availability of instant digital products in multiple formats such as PDF, ePub, and MOBI. Additionally, it includes details on copyright, usage rights, and the structure of the prep guides, which cover essential topics for SAS programming certification.

Uploaded by

enfysmyhrayn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

21968912

The document provides information about various SAS certification prep guides available for download, including titles, ISBNs, and links to access them. It emphasizes the availability of instant digital products in multiple formats such as PDF, ePub, and MOBI. Additionally, it includes details on copyright, usage rights, and the structure of the prep guides, which cover essential topics for SAS programming certification.

Uploaded by

enfysmyhrayn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Download the Full Ebook and Access More Features - ebooknice.

com

(Ebook) SAS certification prep guide : base


programming for SAS 9. by SAS SAS SAS ISBN
9781635269949, 1635269946

https://ebooknice.com/product/sas-certification-prep-guide-
base-programming-for-sas-9-10984456

OR CLICK HERE

DOWLOAD EBOOK

Download more ebook instantly today at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) SAS Certification Prep Guide: Base Programming for SAS 9 by SAS Institute
ISBN 9781635263732, 1635263735

https://ebooknice.com/product/sas-certification-prep-guide-base-programming-for-
sas-9-6823614

ebooknice.com

(Ebook) SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by
SAS ISBN 9781607649243, 1607649241

https://ebooknice.com/product/sas-certification-prep-guide-base-programming-for-
sas-9-third-edition-4419544

ebooknice.com

(Ebook) SAS Certification Prep Guide Advanced Programming for SAS ® 9, Fourth
Edition by SAS Institute ISBN 9781629593548, 1629593540

https://ebooknice.com/product/sas-certification-prep-guide-advanced-programming-
for-sas-9-fourth-edition-5043522

ebooknice.com

(Ebook) SAS Certification Prep Guide: Advanced Programming for SAS 9 by Institute,
SAS(Creator) ISBN 9781629593548, 9781629593579, 9781629593586, 9781629593593,
1629593540, 1629593575, 1629593583, 1629593591

https://ebooknice.com/product/sas-certification-prep-guide-advanced-programming-
for-sas-9-22123270

ebooknice.com
(Ebook) SAS® Certified Specialist Prep Guide: Base Programming Using SAS® 9.4 by SAS
ISBN 9781642951790, 164295179X

https://ebooknice.com/product/sas-certified-specialist-prep-guide-base-
programming-using-sas-9-4-10553550

ebooknice.com

(Ebook) Base SAS 9.2 Procedures Guide by SAS Publishing ISBN 9781599947143,
1599947145

https://ebooknice.com/product/base-sas-9-2-procedures-guide-1790080

ebooknice.com

(Ebook) Step-by-Step Programming with Base SAS 9.4, Second Edition by SAS Institute
ISBN 9781629598949, 1629598941

https://ebooknice.com/product/step-by-step-programming-with-base-sas-9-4-second-
edition-11317772

ebooknice.com

(Ebook) Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4 by SAS Institute ISBN
9781590472040, 1590472047

https://ebooknice.com/product/base-sas-9-1-procedures-guide-
volumes-1-2-3-and-4-2141800

ebooknice.com

(Ebook) SAS 9.2 Output Delivery System User's Guide by SAS Publishing ISBN
9781599945910

https://ebooknice.com/product/sas-9-2-output-delivery-system-user-s-
guide-2200442

ebooknice.com
SAS Certification Prep
®

Guide: Base Programming


for SAS 9, Fifth Edition
®

SAS® Documentation
August 23, 2018
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2018. SAS® Certification Prep Guide: Base Programming for
SAS®9, Fifth Edition. Cary, NC: SAS Institute Inc.
SAS® Certification Prep Guide: Base Programming for SAS®9, Fifth Edition
Copyright © 2018, SAS Institute Inc., Cary, NC, USA
ISBN 978-1-63526-994-9 (Hard copy)
ISBN 978-1-63526-991-8 (Epub)
ISBN 978-1-63526-992-5 (Mobi)
ISBN 978-1-63526-993-2 (PDF)
All Rights Reserved. Produced in the United States of America.
For a hard copy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.
For a web download or e-book: Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this
publication.
The scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal and
punishable by law. Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrighted
materials. Your support of others' rights is appreciated.
U.S. Government License Rights; Restricted Rights: The Software and its documentation is commercial computer software developed at private
expense and is provided with RESTRICTED RIGHTS to the United States Government. Use, duplication, or disclosure of the Software by the
United States Government is subject to the license terms of this Agreement pursuant to, as applicable, FAR 12.212, DFAR 227.7202-1(a), DFAR
227.7202-3(a), and DFAR 227.7202-4, and, to the extent required under U.S. federal law, the minimum restricted rights as set out in FAR
52.227-19 (DEC 2007). If FAR 52.227-19 is applicable, this provision serves as notice under clause (c) thereof and no other notice is required to be
affixed to the Software or documentation. The Government’s rights in Software and documentation shall be only those set forth in this Agreement.
SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414
September 2018
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.
Other brand and product names are trademarks of their respective companies.
P1:certpgbp
Contents

How to Prepare for the SAS Base Programming for SAS®9 Exam . . . . . . . . . . . . . . . . vii
Accessibility Features of the SAS Certification Prep Guide . . . . . . . . . . . . . . . . . . . . . . xi

Chapter 1 • Setting Up Practice Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Accessing Your Practice Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 2 • Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Basics of the SAS Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
SAS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Referencing SAS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Chapter 3 • Accessing Your Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25


SAS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Viewing SAS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Chapter 4 • Creating SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33


Referencing an External Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The IMPORT Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Reading and Verifying Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Using the Imported Data in a DATA Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Reading a Single SAS Data Set to Create Another . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Reading Microsoft Excel Data with the XLSX Engine . . . . . . . . . . . . . . . . . . . . . . . . . 47
Creating Excel Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Writing Observations Explicitly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Chapter 5 • Identifying and Correcting SAS Language Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 59


Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Correcting Common Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Chapter 6 • Creating Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75


Creating a Basic Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Selecting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Identifying Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Sorting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Generating Column Totals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Specifying Titles and Footnotes in Procedure Output . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Assigning Descriptive Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Using Permanently Assigned Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Chapter 7 • Understanding DATA Step Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109


How SAS Processes Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Compilation Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
iv Contents

Execution Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115


Debugging a DATA Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Testing Your Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Chapter 8 • BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129


Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Preprocessing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
FIRST. and LAST. DATA Step Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Chapter 9 • Creating and Managing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141


Creating Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Modifying Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Specifying Lengths for Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Subsetting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

Chapter 10 • Combining SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163


How to Prepare Your Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Methods of Combining SAS Data Sets: The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
One-to-One Reading: Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Concatenating: Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Match-Merging: Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Match-Merge Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Renaming Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Excluding Unmatched Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Chapter 11 • Processing Data with DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193


The Basics of DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Constructing DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Nesting DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Iteratively Processing Observations from a Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Conditionally Executing DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

Chapter 12 • SAS Formats and Informats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211


Applying SAS Formats and Informats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
The FORMAT Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Defining a Unique Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Associating User-Defined Formats with Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Chapter 13 • SAS Date, Time, and Datetime Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227


SAS Date and Time Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Reading Dates and Times with Informats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Example: Using Dates and Times in Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Displaying Date and Time Values with Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

Chapter 14 • Using Functions to Manipulate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239


The Basics of SAS Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
SAS Functions Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Converting Data with Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Manipulating SAS Date Values with Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Contents v

Modifying Character Values with Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263


Modifying Numeric Values with Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Nesting SAS Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

Chapter 15 • Producing Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295


The MEANS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
The FREQ Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

Chapter 16 • Creating Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323


The Output Delivery System (ODS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Creating HTML Output with ODS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Creating PDF Output with ODS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Creating RTF Output with ODS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Creating EXCEL Output with ODS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

Appendix 1 • Quiz Answer Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347


Chapter 2: Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Chapter 3: Accessing Your Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Chapter 4: Creating SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Chapter 5: Identifying and Correcting SAS Language Errors . . . . . . . . . . . . . . . . . . . 350
Chapter 6: Creating Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Chapter 7: Understanding DATA Step Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Chapter 8: BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Chapter 9: Creating and Managing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Chapter 10: Combining SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Chapter 11: Processing Data with DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Chapter 12: SAS Formats and Informats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Chapter 13: SAS Date, Time, and Datetime Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Chapter 14: Using Functions to Manipulate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Chapter 15: Producing Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Chapter 16: Creating Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
vi Contents
vii

How to Prepare for the SAS


Base Programming for
SAS®9 Exam

Requirements and Details

Requirements
To complete examples in this book, you must have access to SAS windowing
environment, SAS Enterprise Guide, or SAS Studio.

Exam Objectives and Updates to This Book


The current exam objectives and a list of any updates to this book are available at
www.sas.com/certify. Exam objectives are subject to change.

Take a Practice Exam


Practice exams are available for purchase through SAS and Pearson VUE. For more
information about practice exams, see www.sas.com/base_programmer_cert.

Registering for the Exam


To register for the SAS Base Programming for SAS®9 exam, see the SAS Global
Certification website at www.sas.com/certify.

Additional Resources for Learning SAS Programming

From SAS Software

Help • SAS ®9: Select Help ð SAS Help and Documentation.


• SAS Enterprise Guide: Select Help ð SAS Enterprise
Guide Help.
• SAS Studio: Select the Help icon .

Documentation • SAS ®9: Select Help ð SAS Help and Documentation.


• SAS Enterprise Guide: Access online documentation on the
web.
• SAS Studio: Select the Help icon and then click Help.
viii How to Prepare for the SAS Base Programming for SAS®9 Exam

On the Web

Base SAS Glossary support.sas.com/baseglossary

Bookstore www.sas.com/books

Certification www.sas.com/certify

Communities communities.sas.com

Knowledge Base support.sas.com/notes

Learning Center www.sas.com and click Learn. Then select


Get Started with SAS.

SAS Documentation support.sas.com/documentation


documentation.sas.com

SAS Global Academic Program www.sas.com and click Learn. Then select
For Students and Educators.

SAS OnDemand support.sas.com/ondemand/

Syntax Quick Reference Guide support.sas.com/content/dam/SAS/support/en/


books/data/base-syntax-ref.pdf

Training www.sas.com/training

Technical Support support.sas.com. Then select Technical


Support.

Syntax Conventions

In this book, SAS syntax looks like this example:


DATA output-SAS-data-set
(DROP=variables(s) | KEEP=variables(s));
SET SAS-data-set <options>;
BY variable(s);
RUN;
Here are the conventions that are used in the example:
• DATA, DROP=, KEEP=, SET, BY, and RUN are in uppercase bold because they
must be spelled as shown.
• output-SAS-data-set, variable(s), SAS-data-set, and options are in italics because
each represents a value that you supply.
• <options> is enclosed in angle brackets because it is optional syntax.
Syntax Conventions ix

• DROP= and KEEP= are separated by a vertical bar ( | ) to indicate that they are
mutually exclusive.
The example syntax that is shown in this book includes only what you need to know in
order to prepare for the certification exam. For complete syntax, see the appropriate SAS
reference guide.
x How to Prepare for the SAS Base Programming for SAS®9 Exam
xi

Accessibility Features of the


SAS Certification Prep Guide

Overview
The SAS Certification Prep Guide: Base Programming for SAS®9 is a test preparation
document that uses the following environments and products:
• SAS windowing environment
• SAS Enterprise Guide
• SAS Studio or SAS University Edition

Accessibility Documentation Help


The following table contains accessibility information for the listed products:

Accessibility Documentation Links

Where to Find Accessibility


Product or Environment Documentation

Base SAS (Microsoft Windows, UNIX, and support.sas.com/baseaccess


z/OS)

SAS Enterprise Guide support.sas.com/documentation/onlinedoc/


guide/index.html

SAS Studio support.sas.com/studioaccess

Documentation Format
Contact [email protected] if you need this document in an alternative digital
format.
xii Accessibility Features of the SAS Certification Prep Guide
1

Chapter 1

Setting Up Practice Data

Accessing Your Practice Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Practice Data ZIP File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Accessing Your Practice Data

Requirements
To complete examples in this book, you must have access to SAS Studio, SAS
Enterprise Guide, or the SAS windowing environment.

Practice Data ZIP File


The ZIP file includes SAS data sets, Microsoft Excel workbooks (.xlsx), CSV files
(.csv), and TXT files (.txt) that are used in examples in this book. To access these files
and create your practice data, follow the instructions below.

Instructions
1. Navigate to support.sas.com/content/dam/SAS/support/en/books/data/base-guide-
practice-data.zip, download and save the practice data ZIP file.
2. Unzip the file and save it to a location that is accessible to SAS.
3. Open the cre8data.sas program in the SAS environment of your choice.
• SAS Studio: In the Navigation pane, expand Files and Folders and then navigate
to the Cert folder within the practice-data folder.
• SAS Enterprise Guide: In the Servers list, expand Servers ð Local ð Files, and
then navigate to the Cert folder in the practice-data folder.
• SAS windowing environment: Click File ð Open Program, and then navigate
to the Cert folder in the practice-data folder.
4. In the Path macro variable, replace /folders/myfolders with the path to the
Cert folder and run the program.
%let path=/folders/myfolders/cert;
2 Chapter 1 • Setting Up Practice Data

Important: The location that you specify for the Path macro variable and the
location of your downloaded SAS programs should be the same location.
Otherwise, the cre8data.sas program cannot create the practice data.

Your practice data is now created and ready for you to use.
TIP When you end your SAS session, the Path macro variable in the
cre8data.sas program is reset. To avoid having to rerun cre8data.sas every
time, run the libname.sas program from the Cert folder to restore the libraries.
3

Chapter 2

Basic Concepts

Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Basics of the SAS Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
SAS Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Global Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
DATA Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
PROC Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SAS Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Processing SAS Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Log Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Results of Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
SAS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Predefined SAS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Defining Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
How SAS Files Are Stored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Storing Files Temporarily or Permanently . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Referencing SAS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Referencing Permanent SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Referencing Temporary SAS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Rules for SAS Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
VALIDVARNAME=System Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
VALIDMEMNAME=System Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
When to Use VALIDMEMNAME=System Option . . . . . . . . . . . . . . . . . . . . . . . . . 16
SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Overview of Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Descriptor Portion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
SAS Variable Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Data Portion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
SAS Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Extended Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Chapter Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Chapter 2 • Basic Concepts

Getting Started
In the SAS Base Programming for SAS®9 exam, you are not tested on the details of
running SAS software in the various environments. However, you might find such
information useful when working with the practice data.
You can access a brief overview of the windows and menus in the SAS windowing
environment, SAS Enterprise Guide, and SAS Studio at http://video.sas.com/. From
Categories select How To Tutorials ð Programming. Select the video for your SAS
environment. Other tutorials are available from the SAS website.

The Basics of the SAS Language

SAS Statements
A SAS statement is a type of SAS language element that is used to perform a particular
operation in a SAS program or to provide information to a SAS program. SAS
statements are free-format. This means that they can begin and end anywhere on a line,
that one statement can continue over several lines, and that several statements can be on
the same line. Blank or special characters separate words in a SAS statement.
TIP You can specify SAS statements in uppercase or lowercase. In most situations,
text that is enclosed in quotation marks is case sensitive.
Here are two important rules for writing SAS programs:
• A SAS statement ends with a semicolon.
• A statement usually begins with a SAS keyword.
There are two types of SAS statements:
• statements that are used in DATA and PROC steps
• statements that are global in scope and can be used anywhere in a SAS program

Global Statements
Global statements are used anywhere in a SAS program and stay in effect until changed
or canceled, or until the SAS session ends. Here are some common global statements:
TITLE, LIBNAME, OPTIONS, and FOOTNOTE.

DATA Step
The DATA step creates or modifies data. The input for a DATA step can be of several
types, such as raw data or a SAS data set. The output from a DATA step can be of
several types, such as a SAS data set or a report. A SAS data set is a data file that is
formatted in a way that SAS can understand.
For example, you can use DATA steps to do the following:
• put your data into a SAS data set
The Basics of the SAS Language 5

• compute values
• check for and correct errors in your data
• produce new SAS data sets by subsetting, supersetting, merging, and updating
existing data sets

PROC Step
The PROC step analyzes data, produces output, or manages SAS files. The input for a
PROC (procedure) step is usually a SAS data set. The output from a PROC step can be
of several types, such as a report or an updated SAS data set.
For example, you can use PROC steps to do the following:
• create a report that lists the data
• analyze data
• create a summary report
• produce plots and charts

SAS Program Structure


A SAS program consists of a sequence of steps. A program can be any combination of
DATA or PROC steps. A step is a sequence of SAS statements.
Here is an example of a simple SAS program.
Example Code 1 A Simple SAS Program

title1 'June Billing for Patients Older Than 39'; /* #1 */


data work.junefee; /* #2 */
set cert.admitjune;
where age>39;
run; /* #3 */
proc print data=work.junefee; /* #4 */
run;

1 The TITLE statement is a global statement. Global statements are typically outside
steps and do not require a RUN statement.
2 The DATA step creates a new SAS data set named Work.JuneFee. The SET
statement reads in the data from Cert.AdmitJune. The new data set contains only
those observations whose value for Age is greater than 39.
3 If a RUN or QUIT statement is not used at the end of a step, SAS assumes that the
beginning of a new step implies the end of the previous step. If a RUN or QUIT
statement is not used at the end of the last step in a program, SAS Studio and SAS
Enterprise Guide automatically submit a RUN and QUIT statement after the
submitted code.
4 The PROC PRINT step prints a listing of the new SAS data set. A PROC step begins
with a PROC statement, which begins with the keyword PROC.
6 Chapter 2 • Basic Concepts

Output 2.1 PRINT Procedure Output

Processing SAS Programs

When a SAS program is submitted for execution, SAS first validates the syntax and then
compiles the statements. DATA and PROC statements signal the beginning of a new
step. The beginning of a new step also implies the end of the previous step. At a step
boundary, SAS executes any statement that has not been previously executed and ends
the step.
Example Code 2 Processing SAS Programs

data work.admit2; /* #1 */
set cert.admit;
where age>39;
proc print data=work.admit2; /* #2 */
run; /* #3 */

1 The DATA step creates a new SAS data set named Work.Admit2 by reading
Cert.Admit. The DATA statement is the beginning of the new step. The SET
statement is used to read data. The WHERE statement conditionally reads only the
observations where the value of the variable Age is greater than 39.
The Basics of the SAS Language 7

2 The PROC PRINT step prints the new SAS data set named Work.Admit2. The
PROC PRINT statement serves as a step boundary in this example because a RUN
statement was not used at the end of the DATA step. The PROC step also implies the
end of the DATA step.
3 The RUN statement ends the PROC step.
TIP The RUN statement is not required between steps in a SAS program. However, it
is a best practice to use a RUN statement because it can make the SAS program
easier to read and the SAS log easier to understand when debugging.

Log Messages
The SAS log collects messages about the processing of SAS programs and about any
errors that occur. Each time a step is executed, SAS generates a log of the processing
activities and the results of the processing.
When SAS processes the sample program, it produces the log messages shown below.
Notice that you get separate sets of messages for each step in the program.

Log 2.1 SAS Log Messages for Each Program Step

5 data work.admit2;
6 set cert.admit;
7 where age>39;
8 run;

NOTE: There were 10 observations read from the data set CERT.ADMIT.
WHERE age>39;
NOTE: The data set WORK.ADMIT2 has 10 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

9 proc print data=work.admit2;


NOTE: Writing HTML Body file: sashtml.htm
10 run;

NOTE: There were 10 observations read from the data set WORK.ADMIT2.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.35 seconds
cpu time 0.24 seconds

Results of Processing

The DATA Step


Suppose you submit the sample program below:
data work.admit2;
set cert.admit;
where age>39;
run;

When the program is processed, it creates a new SAS data set, Work.Admit2, containing
only those observations with age values greater than 39. The DATA step creates a new
8 Chapter 2 • Basic Concepts

data set and produces messages in the SAS log, but it does not create a report or other
output.

The PROC Step


If you add a PROC PRINT step to this same example, the program produces the same
new data set as before, but it also creates the following report:
data work.admit2;
set cert.admit;
where age>39;
run;
proc print data=work.admit2;
run;

Figure 2.1 PRINT Procedure Output

Other Procedures
SAS programs often invoke procedures that create output in the form of a report, as is
the case with the FREQ procedure:
proc freq data=sashelp.cars;
table origin*DriveTrain;
run;
SAS Libraries 9

Figure 2.2 FREQ Procedure Output

Other SAS programs perform tasks such as sorting and managing data, which have no
visible results except for messages in the log. (All SAS programs produce log messages,
but some SAS programs produce only log messages.)
proc copy in=cert out=work;
select admit;
run;

Log 2.2 SAS Log: COPY Procedure Output

11 proc copy in=cert out=work;


12 select admit;
13 run;

NOTE: Copying CERT.ADMIT to WORK.ADMIT (memtype=DATA).


NOTE: There were 21 observations read from the data set CERT.ADMIT.
NOTE: The data set WORK.ADMIT has 21 observations and 9 variables.
NOTE: PROCEDURE COPY used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

SAS Libraries

Definition
A SAS library contains one or more files that are defined, recognized, and accessible by
SAS, and that are referenced and stored as a unit. One special type of file is called a
catalog. In SAS libraries, catalogs function much like subfolders for grouping other
members.
10 Chapter 2 • Basic Concepts

Predefined SAS Libraries


By default, SAS defines several libraries for you:
Sashelp
a permanent library that contains sample data and other files that control how SAS
works at your site. This is a Read-Only library.
Sasuser
a permanent library that contains SAS files in the Profile catalog and that stores your
personal settings. This is also a convenient place to store your own files.
Work
a temporary library for files that do not need to be saved from session to session.
You can also define additional libraries. When you define a library, you indicate the
location of your SAS files to SAS. After you define a library, you can manage SAS files
within it.
Note: If you are using SAS Studio, you might encounter the Webwork library. Webwork
is the default output library in interactive mode. For more information about the
Webwork library, see SAS Studio: User’s Guide.

Defining Libraries
To define a library, you assign a library name to it and specify the location of the files,
such as a directory path.
You can also specify an engine, which is a set of internal instructions that SAS uses for
writing to and reading from files in a library.
You can define SAS libraries using programming statements. For information about how
to write LIBNAME statements to define SAS libraries, see Assigning Librefs on page
25.
TIP Depending on your operating environment and the SAS/ACCESS products that
you license, you can create libraries with various engines. Each engine enables you
to read a different file format, including file formats from other software vendors.
When you delete a SAS library, the pointer to the library is deleted, and SAS no longer
has access to the library. However, the contents of the library still exist in your operating
environment.

How SAS Files Are Stored


A SAS library is the highest level of organization for information within SAS.
For example, in the Windows and UNIX environments, a library is typically a group of
SAS files in the same folder or directory.
The table below summarizes the implementation of SAS libraries in various operating
environments.
Referencing SAS Files 11

Table 2.1 Environments and SAS Libraries

Environment Library Definition

Windows, UNIX a group of SAS files that are stored in the


same directory. Other files can be stored in the
directory, but only the files that have SAS file
extensions are recognized as part of the SAS
library.

z/OS a specially formatted host data set in which


only SAS files are stored.

Storing Files Temporarily or Permanently


Depending on the library name that you use when you create a file, you can store SAS
files temporarily or permanently.

Table 2.2 Temporary and Permanent SAS Libraries

Temporary SAS libraries last only for the If you do not specify a library name when you
current SAS session. create a file, the file is stored in the temporary
SAS library, Work. If you specify the library
name Work, then the file is stored in the
temporary SAS library. When you end the
session, the temporary library and all of its
files are deleted.

Permanent SAS libraries are available to you To store files permanently in a SAS library,
during subsequent SAS sessions. specify a library name other than the default
library name Work.
In the example, when you specify the library
name Cert when you create a file, you are
specifying that the file is to be stored in a
permanent SAS library.

Referencing SAS Files

Referencing Permanent SAS Data Sets


To reference a permanent SAS data set in your SAS programs, use a two-level name
consisting of the library name and the data set name:
libref.dataset
In the two-level name, libref is the name of the SAS library that contains the data set,
and data set is the name of the SAS data set. A period separates the libref and data
set name.
12 Chapter 2 • Basic Concepts

Figure 2.3 Two-Level Permanent SAS Name

Referencing Temporary SAS Files


To reference temporary SAS files, you can specify the default libref Work, a period, and
the data set name. For example, the two-level name, Work.Test, references the SAS data
set named Test that is stored in the temporary SAS library Work.

Figure 2.4 Two-Level Temporary SAS Library Name

Alternatively, you can use a one-level name (the data set name only) to reference a file in
a temporary SAS library. When you specify a one-level name, the default libref Work is
assumed. For example, the one-level name Test references the SAS data set named Test
that is stored in the temporary SAS library Work.

Figure 2.5 One-Level Temporary SAS Library Name

Rules for SAS Names

By default, the following rules apply to the names of SAS data sets, variables, and
libraries:
• They must begin with a letter (A-Z, either uppercase or lowercase) or an underscore
(_).
Referencing SAS Files 13

• They can continue with any combination of numbers, letters, or underscores.


• They can be 1 to 32 characters long.
• SAS library names (librefs) can be 1 to 8 characters long.
These are examples of valid data set names and variable names:
• Payroll
• LABDATA2015_2018
• _EstimatedTaxPayments3

VALIDVARNAME=System Option

SAS has various rules for variable names. You set these rules using the
VALIDVARNAME= system option. VALIDVARNAME specifies the rules for valid
SAS variable names that can be created and processed during a SAS session.
14 Chapter 2 • Basic Concepts

Syntax, VALIDVARNAME=
VALIDVARNAME= V7|UPCASE|ANY
V7 specifies that variable names must follow these rules:
• SAS variable names can be up to 32 characters long.
• The first character must begin with a letter of the Latin alphabet (A - Z, either uppercase or
lowercase) or an underscore (_). Subsequent characters can be letters of the Latin alphabet,
numerals, or underscores.
• Trailing blanks are ignored. The variable name alignment is left-justified.
• A variable name cannot contain blanks or special characters except for an underscore.
• A variable name can contain mixed-case letters. SAS stores and writes the variable name in
the same case that is used in the first reference to the variable. However, when SAS
processes a variable name, SAS internally converts it to uppercase. Therefore, you cannot
use the same variable name with a different combination of uppercase and lowercase letters
to represent different variables. For example, cat, Cat, and CAT all represent the same
variable.
• Do not assign variables the names of special SAS automatic variables (such as _N_ and
_ERROR_) or variable list names (such as _NUMERIC_, _CHARACTER_, and _ALL_) to
variables.
UPCASE specifies that the variable name follows the same rules as V7, except that the variable
name is uppercase, as in earlier versions of SAS.
ANY specifies that SAS variable names must follow these rules:
• The name can begin with or contain any characters, including blanks, national characters,
special characters, and multi-byte characters.
• The name can be up to 32 bytes long.
• The name cannot contain any null bytes.
• Leading blanks are preserved, but trailing blanks are ignored.
• The name must contain at least one character. A name with all blanks is not permitted.
• A variable name can contain mixed-case letters. SAS stores and writes the variable name in
the same case that is used in the first reference to the variable. However, when SAS
processes a variable name, SAS internally converts it to uppercase. Therefore, you cannot
use the same variable name with a different combination of uppercase and lowercase letters
to represent different variables. For example, cat, Cat, and CAT all represent the same
variable.

Note: If you use characters other than the ones that are valid when
VALIDVARNAME=V7, then you must express the variable name as a name literal
and set VALIDVARNAME=ANY. If the name includes either a percent sign (%) or
an ampersand (&), then use single quotation marks in the name literal to avoid
interaction with the SAS macro facility.
CAUTION:
Throughout SAS, using the name literal syntax with SAS member names that
exceed the 32-byte limit or have excessive embedded quotation marks might
cause unexpected results. The VALIDVARNAME=ANY system option enables
compatibility with other DBMS variable (column) naming conventions, such as
allowing embedded blanks and national characters.
Referencing SAS Files 15

VALIDMEMNAME=System Option

You can use the VALIDMEMNAME= system option to specify rules for naming SAS
data sets.

Syntax, VALIDMEMNAME=
VALIDMEMNAME= COMPATIBLE | EXTEND
Important: COMPATIBLE is the default system option for VALIDMEMNAME=.
COMPATIBLE specifies that a SAS data set name must follow these rules:
• The length of the names can be up to 32 characters long.
• Names must begin with a letter of the Latin alphabet (A- Z, a - z) or an underscore.
Subsequent characters can be letters of the Latin alphabet, numerals, or underscores.
• Names cannot contain blanks or special characters except for an underscore
• Names can contain mixed-case letters. SAS internally converts the member name to
uppercase. Therefore, you cannot use the same member name with a different combination
of uppercase and lowercase letters to represent different variables. For example,
customer, Customer, and CUSTOMER all represent the same member name. How the
name is saved on disk is determined by the operating environment.
EXTEND specifies that the data set name must follow these rules:
• Names can include national characters.
• The name can include special characters, except for the / \ * ? " < > |: - characters.
• The name must contain at least one character.
• The length of the name can be up to 32 bytes.
• Null bytes are not allowed.
• Names cannot begin with a blank or a ‘.’ ( period).
• Leading and trailing blanks are deleted when the member is created.
• Names can contain mixed-case letters. SAS internally converts the member name to
uppercase. Therefore, you cannot use the same member name with a different combination
of uppercase and lowercase letters to represent different variables. For example,
customer, Customer, and CUSTOMER all represent the same member name. How the
name appears is determined by the operating environment.

Note: If VALIDMEMNAME=EXTEND, SAS data set names must be written as a SAS


name literal. If you use either a percent sign (%) or an ampersand (&), then you must
use single quotation marks in the name literal in order to avoid interaction with the
SAS macro facility.
CAUTION:
Throughout SAS, using the name literal syntax with SAS member names that
exceed the 32-byte limit or that have excessive embedded quotation marks
might cause unexpected results. The intent of the VALIDMEMNAME=EXTEND
system option is to enable compatibility with other DBMS member naming
conventions, such as allowing embedded blanks and national characters.
16 Chapter 2 • Basic Concepts

When to Use VALIDMEMNAME=System Option


Use VALIDMEMNAME= EXTEND system option when the characters in a SAS data
set name contains one of the following:
• international characters
• characters supported by third-party databases
• characters that are commonly used in a filename

SAS Data Sets

Overview of Data Sets


A SAS data set is a file that consists of two parts: a descriptor portion and a data portion.
Sometimes a SAS data set also points to one or more indexes, which enable SAS to
locate rows in the data set more efficiently. (The data sets that are shown in this chapter
do not contain indexes.) Extended attributes are user-defined attributes that further
define a SAS data set.

Figure 2.6 Parts of a SAS Data Set

Descriptor Portion
The descriptor portion of a SAS data set contains information about the data set,
including the following:
• the name of the data set
• the date and time that the data set was created
• the number of observations
• the number of variables
SAS Data Sets 17

The table below lists part of the descriptor portion of the data set Cert.Insure, which
contains insurance information for patients who are admitted to a wellness clinic.

Table 2.3 Descriptor Portion of Attributes in a SAS Data Set

Data Set Name: CERT.INSURE

Member Type: DATA

Engine: V9

Created: 07/03/2018 10:53:05

Observations: 21

Variables: 7

Indexes: 0

Observation Length: 64

SAS Variable Attributes


The descriptor portion of a SAS data set contains information about the properties of
each variable in the data set. The properties information includes the variable's name,
type, length, format, informat, and label.
When you write SAS programs, it is important to understand the attributes of the
variables that you use. For example, you might need to combine SAS data sets that
contain same-named variables. In this case, the variables must be the same type
(character or numeric). If the same-named variables are both character variables, you
still need to check that the variable lengths are the same. Otherwise, some values might
be truncated.
The following table uses Cert.Insure data and the VALIDVARNAME=ANY system
option. The SAS variable has several attributes that are listed here:

Table 2.4 Variable Attributes

Variable Attribute Definition Example Possible Values

Name identifies a variable. A Policy Any valid SAS name.


variable name must
Total
conform to SAS naming
rules. Name
See “Rules for SAS Names”
for SAS names rules.
Other documents randomly have
different content
attendants, “while I discover from this enticing creature what sort of
persons we have resurrected.”
The hairy servants of Janicot obeyed. Florian, very spruce in
bottle-green and silver, dismounted from his white horse, and in the
ancient roadway now overgrown with grass, held amicable discourse
with this age-old milkmaid. She proved at bottom not wholly
unsophisticated. And when they parted, each had been agreeably
convinced that the persons of one era are much like those of
another.
Florian thus came to the gates of Brunbelois logically reassured
that he had done well in reviving such persons, even at the cost of
destroying charming monsters and of the labor involved in removing
so many heads. He counted smilingly on his finger-tips, but such
was his pleased abstraction that he miscalculated, and made the
total eight.
He found that, now the enchantment was lifted, Brunbelois
showed in every respect as a fine old castle of the architecture
indigenous to fairy tales. Flags were flying from the turrets;
sentinels, delightfully shiny in the early morning sunlight, were
pacing the walls, on the look-out for enemies that had died many
hundred years ago; and at the gate was a night-porter, not yet off
duty. This porter wore red garments worked with yellow thistles, and
he seemed dejected but philosophic.
“Whence come you, in those queer dusty clothes?” inquired the
porter, “and what is your business here?”
“Announce to King Helmas,” said Florian, as he brushed the dust
from his bottle-green knees, and saw with regret that nothing could
be done about the grass-stains, which, possibly, had got there when
he knelt to cut off the tarandus’ head,—“announce to King Helmas
that the lord of Puysange is at hand.”
“You are talking, sir,” the porter answered, resignedly, “most
regrettable nonsense. For the knife is in the collops, the mead is in
the drinking-horn, the eggs are upon the toast, the minstrels are in
the gallery, and King Helmas is having breakfast.”
“None the less, I have important business with him—”
“Equally none the less, nobody may enter at this hour unless he is
the son of a king of a privileged country or a craftsman bringing his
craft.”
“Parbleu, but that is it, precisely. For I bring in that wagon very
fine samples of my craft.”
The porter left his small grilled lodge. He looked at the piled heads
of the monsters, he poked them with his finger, and he said mildly,
“Why, but did you ever!” Then he returned to the gate.
“Now, my friend,” said Florian, with the appropriate stateliness, “I
charge you, by all the color and ugliness of these samples of my
craft, to announce to your king that the lord of Puysange is at the
gate with tidings, and with proof, that the enchantment is happily
lifted from this castle.”
“So there has been an enchantment. I suspected something of the
sort when I came to, after nodding a bit like in the night, and
noticed the remarkably thick forest that had grown up everywhere
around us.”
Florian observed, to this degraded underling who seemed not
capable of appreciating Florian’s fine exploits, “Well, certainly you
take all marvels very calmly.”
The sad porter replied that, with a reigning family so given to high
temper and sorcery, the retainers of Brunbelois were not easily
astounded. Something in the shape of an enchantment had been
predicted in the kitchen last night, he continued, after the notable
quarrel between Madame Mélusine and her father.
“My friend,” said Florian, “that was not last night. You speak of a
disastrous family jar in which the milk of human kindness curdled
several centuries ago. Since then there has been an enchantment
laid upon Brunbelois: and the spell was lifted only to-day.”
“Do you mean, sir, that I am actually several hundred and fifty-two
years old?”
“Somewhere in that November neighborhood,” said Florian. And
he steeled himself against the other’s outburst of horror and
amazement.
“To think of that now!” said the porter. “I certainly never imagined
it would come to that. However, it is always a great comfort to
reflect it hardly matters what happens to us, is it not, sir?”
You could not but find, in this stubborn unwillingness to face the
magnitude of Florian’s exploits, something horribly prosaic and
callous. Yet, none the less, Florian civilly asked the man’s meaning.
And the dejected porter replied:
“It is just a sort of fancying, sir, that one wanders into after
watching the stars, as I do in the way of business, night after night.
One gets to reading them and to a sort of glancing over of the story
that is written in their courses. Yes, sir, one does fall into the habit,
injudiciously perhaps, but then there is nothing else much to do. And
one does not find there quite, as you might put it, the excitement
over the famousness of kings and the ruining of empires that one
might reasonably look for. And one does not find anything at all
there about porters, I can assure you, sir, because they are not
important enough to figure in that story. There is no more writing in
the stars about night-porters than there is about bumble-bees; and
that is always a great comfort, sir, when one feels low-spirited.
Because I would not care to be in that story, myself, for it is not light
pleasant reading.”
“A pest! so you inform me, with somewhat the gay levity of an
oyster, that you can read the stars!”
The porter admitted dolefully, “One does come to it, sir, in my way
of business.”
“And how many chapters, I wonder, are written in the heavens
about me?”
The porter looked at Florian for some while. The porter said, now
even more dolefully: “I would not be surprised if there was a line
somewhere about you, sir. For your planet is Venus, and her people
do get written about in an excessive way, there is no denying it. And
I would not care to be one of them, myself, but of course there is no
accounting for tastes, even if anybody anywhere had any say in the
matter.”
“Parbleu, you may be right about my planet,” said Florian, smiling
for reasons of his own. “Yet, as an artless veteran of the first and
second Pubic Wars, I do not see how you can be certain.”
“Because of your corporature, sir,” replied the porter. “He that is
born under this planet is of fair but not tall stature, his complexion
being white but tending a little to darkness. He has fine black hair,
the brows arched, the face pretty fleshy, a cherry lip, a rolling
wandering eye. He has a love-dimple in his cheek, and shows in all
as one desirous of trimming and making himself neat and complete
in clothes and body. Now these things I see in your corporature and
in the fretfulness with which you look at the grass-stains on your
knees. So your planet is evident.”
“That is possible, your speech has a fine ring of logic, and logic is
less common than hens’ teeth. Upon what sort of persons does this
honorable planet attend?”
“If you could call it attending, sir—For I must tell you that these
planets have a sad loose way of not devoting their really undivided
attention to looking after the affairs of any one particular gentleman,
not even when they see him most magnificent in bottle-green and
silver.”
“They are as remiss, then, as you are precise. So do you choose
your own verb, and tell me—”
“Sir,” replied the porter, “I regret to inform you that the person
whom Venus governs is riotous, expensive, wholly given to
dissipation and lewd companies of women and boys. He is nimble in
entering unlawful beds, he is incestuous, he is an adulterer, he is a
mere skip-jack, spending all his means among scandalous loose
people: and he is in nothing careful of the things of this life or of
anything religious.”
Florian brightened. “That also sounds quite logical,—in the main,—
for you describe the ways of the best-thought-of persons since the
old King’s death. And one of course endeavors not to offend against
the notions of one’s neighbors by seeming a despiser of accepted
modes. But I must protest to you, my friend, you are utterly wrong
in the article of religion—”
“Oh, if you come hither to dispute about religion,” said the porter,
“the priests of Llaw Gyffes will attend to you. They love converting
people from religious errors, bless you, with their wild horses and
their red-hot irons. But, for one, I never argue about religion. You
conceive, sir, there is an entire chapter devoted to the subject, in the
writing we were just talking over: and I have read that chapter. So I
say nothing about religion. I like a bit of fun, myself: but when you
find it there, of all places, and on that scale—” Again the dejected
porter sighed. “However, I shall say no more. Instead, with your
permission, Messire de Puysange, I shall just step in, and send up
your news about the enchantment.”
This much the porter did, and Florian was left alone to amuse
himself by looking about. Through the gateway he saw into a court
paved with cobble-stones. Upon each side of the gate was an
octagonal granite tower with iron-barred windows: each tower was
three stories in height, and the battlements were coped with some
sort of bright red stone.
Then Florian, for lack of other diversion, turned and looked idly
down the valley, toward Poictesme. There he saw something rather
odd. A mile-long bridge was flung across the west, and over it
passed figures. First came the appearance of a bear waddling upon
his hind legs, followed by an ape, and then by a huddled creature
with long legs. Florian saw also an unclothed woman, who danced
as she went: over her head fluttered a bird, and by means of a chain
she haled after her a sedentarily disposed pig. An incredibly old man
followed, dressed in faded blue, and he carried upon his arm an
open basket. Last came a shaggy dog, barking, it seemed, at all.
These figures were like clouds in their station and in their
indeterminable coloring and vague outline, but their moving was not
like the drifting of clouds: it was the walking of living creatures.
Florian for an instant wondered as to the nature and the business of
these beings that were passing over and away from Poictesme. He
shrugged. He believed the matter to be no concern of one whose
interests overhead were all in the efficient hands of Holy Hoprig.
7.
Adjustments of the Resurrected

hey brought Florian to Helmas the Deep-Minded,


where the King sat on a daīs with his Queen
Pressina. The King was stately in scarlet and
ermine: his nose too was red, and to his crown was
affixed the Zhar-Ptitza’s silvery feather. Florian
found his appearance far more companionable than
was that of the fat Queen (one of the water folk),
whose skin was faintly blue, and whose hair was
undeniably green, and whose little mouth seemed lost and
discontented in her broad face.
Beside them, but not upon the dark red daīs, sat the high-priest of
Llaw Gyffes, a fine looking and benevolent prelate, in white robes
edged with a purple pattern of quaint intricacies: he wore a wreath
of mistletoe about his broad forehead; and around and above this
played a pulsing radiancy.
To these persons Florian told what had happened. When he had
ended, the Queen said she had never heard of such a thing in her
life, that it was precisely what she had predicted time and again, and
that now Helmas could see for himself what came of spoiling
Mélusine, and letting her have her own way about everything. The
wise King answered nothing whatever.
But the high-priest of Llaw Gyffes asked, “And how did you lift this
strong enchantment?”
“Monsieur, I removed it by the logical method of killing the seven
monsters who were its strength and symbol. That they are all quite
dead you can see for yourself,—if I may make so bold as to employ
her Majesty’s striking phrase,—by counting the assortment of heads
which I fetched hither with me.”
“Yes, to be sure,” the priest admitted. “Seven is seven the world
over: everywhere it is a number of mystic potency. It follows that
seven severed heads must predicate seven corpses; and such proofs
are indisputable, as far as they go—”
Still, he seemed troubled in his mind.
Then Helmas, the wise King, said, “It is my opinion that the one
way to encounter the unalterable is to do nothing about it.”
“Yes,” answered his wife, “and much that will help matters!”
“Nothing, my dear,” said the wise King, “helps matters. All matters
are controlled by fate and chance, and these help themselves to
what they have need of. These two it is that have taken from me a
lordship that had not its like in the known world, and have made the
palaces that we used to be feasting in, it still seems only yesterday,
just little piles of rubbish, and have puffed out my famousness the
way that when any man gets impudent a widow does a lamp. These
two it is that leave me nothing but this castle and this crevice in the
hills where the old time yet lingers. And I accept their sending,
because there is no armor against it, but I shall keep up my dignity
by not letting even fate and chance upset me with their playfulness.
Here the old time shall be as it has always been, and here I shall
continue to do what was expected of me yesterday. And about other
matters I shall not bother, but I shall leave everything, excepting
only my self-respect, to fate and chance. And I think that Hoprig will
agree with me it is the way a wise man ought to be acting.”
“Hoprig!” reflected Florian, looking at the halo. “But what the devil
is my patron saint doing here disguised as the high-priest of Llaw
Gyffes?”
“I am thinking over some other matters,” replied Hoprig, to the
King, “and it is in my thinking that nobody could manage to kill so
many monsters, and to release us from our long sleeping, unless he
was a sorcerer. So Messire de Puysange must be a sorcerer, and that
is very awkward, with our torture-chamber all out of repair—”
“Ah, monsieur,” said Florian, reproachfully, “and are these quite
charitable notions for a saint to be fostering? And, oh, monsieur, is it
quite fair for you to have been sleeping here this unconscionable
while, when you were supposed to be in heaven attending to the
remission of people’s sins?”
Hoprig replied: “What choice had I or anybody else except to
sleep under the Nis magic? For the rest, I do not presume to say
what a saint might or might not think of the affair, because in our
worship of Llaw Gyffes of the Steady Hand—”
“But I, monsieur, was referring to a very famous saint of the
Christian church, which has for some while counted the Dukes of
Puysange among its communicants, and is now our best-thought-of
form of worship.”
“Oh, the Christians! Yes, I have heard of them. Indeed I now
remember very well how Ork and Horrig came into these parts
preaching everywhere the remarkable fancies of that sect until I
discouraged them in the way which seemed most salutary.”
Florian could make nothing of this. He said, “But how could you,
of all persons, have discouraged the spreading of Christianity?”
“I discouraged them with axes,” the saint replied, “and with
thumbscrews, and with burning them at the stake. For it really does
not pay to be subtle in dealing with people of that class: and you
have to base your appeal to their better nature upon quite obvious
arguments.”
“My faith, then, how it came about I cannot say, Monsieur Hoprig;
but for hundreds upon hundreds of years you have been a Christian
saint.”
“Dear me!” observed the saint, “so that must be the explanation
of this halo. I noticed it of course. Still, our minds have been rather
pre-empted since we woke up—But, dear me, now, I am astounded,
and I know not what to say. I do say, though, that this is quite
extraordinary news for you to be bringing a well-thought-of high-
priest of Llaw Gyffes.”
“Nevertheless, monsieur, for all that you have never been anything
but a high-priest of the heathen, and a persecutor of the true faith, I
can assure you that you have, somehow, been canonized. And I am
afraid that during the long while you have been asleep your actions
must have been woefully misrepresented. Monsieur,” said Florian,
hopefully, “at least, though, was it not true about your being in the
barrel?”
“Why, but how could ever you,” the saint marveled, “have heard
about that rain-barrel? The incident, in any case, has been made far
too much of. You conceive, it was merely that the man came home
most unexpectedly; and since all husbands are at times and in some
circumstances so unreasonable—”
“Ah, monsieur,” said Florian, shaking his head, “I am afraid you do
not speak of quite the barrel which is in your legend.”
“So I have a legend! Why, how delightful! But come,” said the
saint, abeam with honest pleasure, and with his halo twinkling
merrily, “come, be communicative; be copious, and tell me all about
myself.”
Then Florian told Hoprig of how, after Hoprig’s supposed death,
miracles had been worked at Hoprig’s putative tomb, near Gol, and
this legend and that legend had grown up around his memory, and
how these things had led to Hoprig’s being canonized. And Florian
alluded also, with perfect tact but a little ruefully, to those fine
donations he had been giving, year in and year out, to the Church of
Holy Hoprig, under the impression that all the while the saint had
been, instead of snoring at Brunbelois, looking out for Florian’s
interests in heaven. And Hoprig now seemed rather pensive, and he
inquired particularly about his tomb.
“I shall take this,” the saint said, at last, “to be the fit reward of
my tender-heartedness. The tomb near Gol of which you tell me is
the tomb in which I buried that Horrig about whom I was just
talking, after we had settled our difference of opinion as to some
points of theology. Ork was so widely scattered that any formal
interment was quite out of the question. My priests are dear, well-
meaning fellows. Still, you conceive, they are conscientious, and
they enter with such zeal into the performance of any manifest if
painful duty—”
Florian said: “They exhibited the archetypal zeal becoming to the
ministers of an established church in the defence of their vested
rights. They were, with primitive inadequacy, groping toward the
methods of our Holy Inquisition and of civilized prelates everywhere
—”
“—So they were quite tired out when we passed on to Horrig’s
case. I do not deny that I was perhaps unduly lenient about Horrig.
It was the general opinion that, tired as we were, this blasphemer
against the religious principles of our fathers ought to be burned at
the stake, and have his ashes scattered to the winds. But I was
merciful. I had eaten an extremely light breakfast. So I merely had
him broken on the wheel and decapitated, and we got through our
morning’s work, after all, in good time for dinner: and I gave him a
very nice tomb indeed, with his name on it in capital letters. Dear
me!” observed Holy Hoprig, with a marked increase of his
benevolent smile, “but how drolly things fall out! If the name had
not been in capital letters, now, I would probably never have been
wearing this halo which surprised me so this morning when I went
to brush my hair—”
“But what has happened?” said the Queen.
“Why, madame,” replied the saint, “I take it that, with the passage
of years, the tail of the first R in the poor dear fellow’s name was
somewhat worn away. So when such miracles began to occur at his
tomb as customarily emanate from the tombs of martyrs to any faith
which later is taken up by really nice people, here were tangible and
exact proofs, to the letter, of the holiness of Hoprig. In consequence,
this Christian church has naturally canonized me.”
“That was quite civil of them of course, if this is considered the
best-thought-of church. But, still,” the Queen said, doubtfully, “the
miracles must have meant that Horrig was right, and you were
wrong.”
“Certainly, madame, it would seem so, as a matter of purely
academic interest. For now that his church is so well-thought-of
everywhere and has canonized me, I must turn Christian, if only to
show my appreciation of the compliment. So there is no possible
harm done.”
“But in that case, it was Horrig that ought to have been made a
saint of.”
“Now I, madame, for one, cherish humility too much to dare
assert any such thing. For the ways of Providence are proverbially
inscrutable: and it well may be that the abrasion of the tail of that R
was also, in its quiet way, a direct intervention of Heaven to reward
my mercifulness in according Horrig a comparatively pleasant
martyrdom.”
“Yes, but it was he, after all, who had to put up with that
martyrdom, on a dreadfully depressing rainy morning, too, I
remember, whereas you get sainthood out of the affair without
putting up with anything.”
“Do I not have to put up with this halo? How can I now hope to
go anywhere after dark without being observed? Ah, no, madame, I
greatly fear this canonization will cost me a host of friends by
adorning my visits with such conspicuous publicity. Nevertheless, I
do not complain. Instead, I philosophically recognize that well-bred
women must avoid all ostentation, and that the ways of Providence
are inscrutable.”
“That is quite true,” observed King Helmas, at this point, “and I
think that nothing is to be gained by you two discussing these ways
any more. The poets and the philosophers in every place have for a
long while now had a heaviness in their minds about Providence,
and the friendly advice they have been giving is not yet all acted
upon. So let us leave Providence to look out for itself, the way we
would if Providence had wisdom teeth. And let us turn to other
matters, and to hearing what reward is asked by the champion who
has rescued us from our long sleeping.”
“I too,” replied Florian, “if I may make so bold as to borrow the
phrase used by your Majesty just now—that phrase by which I was
immeasurably impressed, that phrase which still remains to me a
vocalisation of supreme wisdom in terms so apt and striking—”
“Wisdom,” said the King, “was miraculously bestowed upon me a
great while ago as a free gift, which I had done nothing to earn and
deserve no credit for not having been able to avoid. And my way of
talking, and using similes and syntax,—along with phraseology and
monostiches and aposiopesis and such-like things,—is another gift,
also, which I employ without really noticing the astonishment and
admiration of my hearers. So do you not talk so much, but come to
the point.”
“I too, then, in your Majesty’s transcendent phrase, shall do what
was expected of me yesterday. I ask the hand of the King’s daughter
in marriage.”
“That is customary,” wise Helmas said, with approval, “and you
show a very fine sense of courtesy in adhering to our perhaps old-
fashioned ways. Let the lord of Puysange be taken to his betrothed.”
8.
At the Top of the World

OU will find her,” they had said, “yonder,”—and,


pointing westerly, had left him. So Florian went
unaccompanied through the long pergola
overgrown with grape-vines, toward the lone figure
at the end of this tunnel of rustling greenness and
sweet odors. A woman waited there, in an eight-
sided summer-house, builded of widely-spaced
lattice-work that was hidden by vines. Through these vines you
could see on every side the fluttering bright gardens of Brunbelois,
but no living creature. This woman and Florian were alone in what
was not unlike a lovely cage of vines. Florian seemed troubled. It
was apparent that he knew this woman.
“I am flesh and blood,” the woman said,—“as you may remember.”
“Indeed, I have been singularly fortunate—But upon reflection, I
retract the adverb. I have been marvelously fortunate; and I have no
desire to forget it.”
“She also, the girl yonder, is flesh and blood. You will be knowing
that before long.”
Florian looked at this woman for some while. “Perhaps that is true.
I think it is not true. I have faith in the love which has endured since
I was but a child. If that fails me, I must die. And I shall die
willingly.”
He bowed low to this woman, and he passed on, through the
summer-house, and out into the open air. He came thus to a wall,
only breast high, and opened the gate which was there, and so went
on in full sunlight, ascending a steepish incline that was overgrown
with coarse grass and with much white clover. Thus Florian came to
the unforgotten princess and to the beauty which he had in
childhood, however briefly, seen. There was in this bright and windy
place, which smelled so pleasantly of warm grass, nothing except a
low marble bench without back or carving. No trees nor any bushes
grew here: nothing veiled this place from the sun. Upon this sunlit
mountain-top was only the bench, and upon the bench sat Melior,
waiting.
She waited—there was the miracle,—for Florian de Puysange.
Behind and somewhat below Florian were the turrets and banners
of Brunbelois, a place now disenchanted, but a fair place wherein
the old time yet lingered. Before him the bare hillside sank sheer
and unbroken, to the far-off tree-tops of Acaire: and beyond leagues
of foliage you could even see, not a great number of miles away, but
quite two miles below you, the open country of Poictesme, which
you saw not as anything real and tangible but as a hazed blending of
purples and of all the shades that green may have in heaven. Florian
seemed to stand at the top of the world: and with him, high as his
heart, stood Melior....
And it was a queer thing that he, who always noticed people’s
clothes, and who tended to be very critical about apparel, could
never afterward, in thinking about this extraordinary morning,
recollect one color which Melior wore. He remembered only a sense
of many interwoven brilliancies, as if the brightness of the summer
sea and of the clouds of sunset and of all the stars were blended
here to veil this woman’s body. She went appareled with the
splendor of a queen of the old days, she who was the most beautiful
of women that have lived in any day. For, if so far as went her body,
one could think dazedly of analogues, nowhere was there anything
so bright and lovely as was this woman’s countenance. And it was to
the end that he might see the face of Melior raised now to him, he
knew, that Florian was born. All living had been the prologue to this
instant: God had made the world in order that Florian might stand
here, with Melior, at the top of the world.
And it seemed to Florian that his indiscretions in the way of
removing people from this dear world, and of excursions into strange
beds, and of failures to attend mass regularly, had become alienate
to the man who waited before Melior. All that was over and done
with: he had climbed past all that in his ascent to this bright and
windy place. Here, in this inconceivably high place, was the
loveliness seen once and never forgotten utterly, the loveliness
which had made seem very cheap and futile the things that other
men wanted. Now this loveliness was, for the asking, his: and
Florian found his composure almost shaken, he suspected that the
bearing suitable to a Duke of Puysange was touched with
unbecoming ardors. He feared that logic could not climb so high as
he had climbed.
Besides, it might be, he had climbed too near to heaven. For
nothing veiled this unimaginably high place: God, seeing him thus
plainly, would be envious. That was the thought which Florian put
hastily out of mind....
He parted his lips once or twice. This was, he joyously reflected,
quite ridiculous. A woman waited: and Florian de Puysange could not
speak. Then words came, with a sort of sobbing.
“My princess, there was a child who viewed you once in your long
sleeping. The child’s heart moved with desires which did not know
their aim. It is not that child who comes to you.”
“No, but a very gallant champion,” she replied, “to whom we all
owe our lives.”
He had raised a deprecating hand. It was trembling. And her face
seemed only a blurred shining, for in his eyes were tears. It must be,
Florian reflected, because of the wind: but he did not believe this,
nor need we.
“Princess, will you entrust to me, such as I am, the life I have
repurchased for you? I dare make no large promises, in the teeth of
a disastrously tenacious memory. Yet, there is no part in me but
worships you, I have no desire in life save toward you. There has
never been in all my life any real desire save that which strove
toward you.”
“Oh, but, Messire Florian,” the girl replied, “of course I will be your
wife if you desire it.”
He raised now both his hands a little toward her. She had not
drawn back. He did not know whether this was joy or terror which
possessed him: but it possessed him utterly. His heart was shaking
in him, with an insane and ruthless pounding. He thought his head
kept time to this pounding, and was joggling like the head of a
palsied old man. He knew his finger-tips to be visited by tiny and
inexplicable vibrations.
“If I could die now—!” was in his mind. “Now, at this instant! And
what a thought for me to be having now!”
Instead, he now touched his disenchanted princess. Yet their two
bodies seemed not to touch, and not to have moved as flesh that is
pulled by muscles. They seemed to have merged, effortlessly and
without volition, into one body.
In fine, he kissed her. So was the affair concluded.
9.
Misgivings of a Beginning Saint

hat Florian remembered, afterward, about


Brunbelois seemed rather inconsequential. It was,
to begin with, a high place, a remarkably high
place. In the heart of the Forest of Acaire, arose a
mountain with three peaks, of which the middle
and lowest was cleared ground. Here stood the
castle of Brunbelois, beside a lake, a lake that was
fed by springs from the bottom, and had no
tributaries and no outlet. Forests thus rose about you everywhere
except in the west, where you looked down and yet further down,
over the descending tree-tops of Acaire, and could see beyond these
the open country of Poictesme.
Now in this exalted and cleared space wherein stood Brunbelois,
there was nothing between you and the sky. You were continually
noting such a hackneyed matter as the sky. You saw it no longer as
dome-shaped, but as, quite obviously now, an interminable reach of
space. You saw the huge clouds passing in this hollowness, each
inconceivably detached and separate as one cloud would pass
tranquilly above and behind the other, sometimes at right angles,
sometimes travelling in just the opposite direction. It troubled you to
have nothing between you and a space that afforded room for all
those currents of air to move about in, so freely, so utterly without
any obstruction. It made a Puysange seem small. And at night the
stars also no longer appeared tidily affixed to the sky, as they
appeared to be when viewed from Bellegarde or Paris: the stars
seemed larger here, more meltingly luminous, and they glowed each
in visible isolation, with all that space behind them. It had not ever
before occurred to Florian that the sky could be terrible: and he
began somewhat to understand the notions of the gray-haired porter
who had watched this sky from Brunbelois, night after night, alone.
And Florian remembered Brunbelois as being a silvery and rustling
place. A continuous wind seemed to come up from the west. The
forests rising about you everywhere except in the west were never
still, you saw all day the gray under side of the leaves twinkling
restlessly, and you heard always their varying but incessant murmur.
And small clouds too were always passing, borne by this incessant
wind, very close to you, drifting through the porches of the castle,
trailing pallidly over the grass, and veiling your feet sometimes, so
that you stood knee-deep in a cloud: and the sunlight was silvery
rather than golden. And under this gentle but perpetual wind the
broad lake glittered ceaselessly with silver sparklings.
Moreover, the grass here was thick with large white blossoms,
which grew singly upon short stalks without any leaves, and these
white flowers nodded in an unending conference. They loaned the
very ground here an unstable silveriness, for these flowers were not
ever motionless. Sometimes they seemed to nod in sleepy mutual
assent, sometimes the wind, in strengthening, would provoke them
to the appearance of expressing diminutively vigorous indignation.
And humming-birds were continually flashing about: these were too
small for you to perceive their coloring, they went merely as gleams.
And white butterflies fluttered everywhither as if in an abstracted
light reconnoitering for what they could not find. And you were
always seeing large birds high in the air, drifting and wheeling, as it
seemed, in an endless searching for what they never found.
He did not move, but lay quite still, staring upward.
See page 136

So Florian remembered, afterward, in the main, the highness and


the silveriness and the instability of the place that he now went
about exultingly with nothing left to wish for. He hardly remembered,
afterward, what he and Melior did or talked of, during the days
wherein Brunbelois prepared for their wedding: time and events, and
people too, seemed to pass like bright shining vapors; all living
swam in a haze of happiness. Florian now thought little of logic, he
thought nothing of precedent; he thrust aside the implications of his
depressing discovery as to his patron saint: he stayed in everything
light-headedly bewildered through hourly contemplation of that
unflawed loveliness which he had for a quarter of a century desired.
He was contented now; he went unutterably contented by that
beauty which he in childhood had, however briefly, seen, and which
nothing had since then availed ever quite to put out of his mind. He
could not, really, think about anything else. He cared about nothing
else.
Still, even now, he kept some habit of circumspection: no man
should look to be utterly naīf about his fifth wife. So when St. Hoprig
contrived to talk in private with Melior, down by the lake’s border,
Florian, for profoundly logical reasons, had followed Hoprig. Florian,
for the same reasons, stood behind the hedge and listened.
“It is right that you should marry the champion who rescued us
all,” said the voice of Hoprig, “for rules ought to be respected. But I
am still of the opinion that nobody could have disposed of so many
monsters without being an adept at sorcery.”
“Why, then, it seems to me that we ought to be very grateful for
the sorcery by which we profit,” said the sweet voice of Melior. “For,
as I so often think—”
“As goes the past, perhaps. The future is another matter. It is
most widely another matter, for us two in particular.”
“You mean that as his wife I must counsel my husband to avoid all
evil courses—”
“Yes, of course, I mean that. Your duty is plain enough, since a
wife’s functions are terrestrial. But I, madame! I am, it appears, this
young man’s patron saint, and upon his behavior depends my
heavenly credit. You will readily conceive I thus have especial reason
to worry over the possibility that Messire de Puysange may be
addicted to diabolic practises.”
“Is it certain, my poor Hoprig, that you are actually a Christian
saint? For, really, when one comes to think—!”
“There seems no doubt of it. I have tried a few miracles in private,
and they come off as easily as old sandals. It appears that, now I
am a saint, I enjoy, by approved precedents, all thaumaturgic
powers, with especial proficiency in blasting, cursing and smiting my
opponents with terrible afflictions; and have moreover the gift of
tongues, of vision and of prophecy, and the power of expelling
demons, of healing the sick, and of raising the dead. The situation is
extraordinary, and I know not what to do with so many talents. Nor
can anybody tell me here. In consequence, I must go down into this
modern world of which Messire de Puysange brings such remarkable
reports, and there I can instruct myself as to the requirements of my
new dignity.”
“So you will leave Brunbelois with us, I suppose, and then we shall
all—”
“I do not say that: I do not promise you my company. Probably I
shall establish a hermitage somewhere, once I have seen something
of this later world, and shall live in that hermitage as becomes a
Christian saint. Here, you conceive, everyone knows me too well.
Quite apart from the conduct of my private affairs,—in which I could
not anticipate that sanctity might be looked for,—people would be
remembering how I preached against these Christian doctrines,
exposed them by every rule of logic, and exterminated their
upholders. There would be a depressing atmosphere of merriment.
But down yonder, I daresay, I might manage tolerably well.”
“I hope you will let depraved women alone,” said the voice of
Melior, “because, as you ought with proper shame to remember—”
“My princess, let us not over-rashly sneer at depraved women.
They very often have good hearts, they have attested their
philanthropy in repeated instances, and I have noticed that the
deeper our research into their private affairs, the more amiable we
are apt to find their conduct. In any case, as touches myself, a saint
is above all carnal stains and, I believe, diseases also. But it was
about other matters I wished to speak with you. I am, I repeat,
suspicious of this future husband of yours. Sorcerers have an ill way
with their wives, and deplorable habits with their children; and your
condition, in view of your fine health and youth, may soon be
delicate. I shall ask for a revelation upon these points. Whatever
impends, though, I shall be at hand to watch over you both.”
“So you will establish your hermitage at Bellegarde? For in that
event—”
“Again, madame, you go too fast. I do not know about that either.
In the environs of Bellegarde, they tell me, is a church devoted to
my worship, and Messire de Puysange considers—inexplicably, I
think,—that it might unsettle the faith of my postulants to have me
appear among them. It seems more to the point that this Bellegarde
is a retired place in the provinces, with no gaming parlors, and,
Messire de Puysange assures me, but one respectable brothel—”
“Then Bellegarde would not suit you—” “No, of course not: for I
would find ampler opportunities to put down the wicked, and to
implant good seed, in large cities, which are proverbially the haunts
of vice. In any case, do you take this ring. It was presented to me as
a token of not unearned esteem and admiration, by a lady who had
hitherto found men contemptible: and at my request—tendered
somewhat hastily, but to the proper authorities,—this ring has been
endowed with salutary virtues. The one trait of the holy ring which
concerns us just now is its recently acquired habit of giving due
warning whenever danger threatens its wearer. Dear me, now, how
complete would have been my relaxation if only in my pagan days I
had possessed such a talisman to put on whenever I undressed for
bed! In any case, should the ring change, then do you invoke me.”
“And you will come with your miracles and your blightings and
your blastings! My poor Hoprig, I think you do Messire de Puysange
a great wrong, but I will keep the ring, for all that. Because, while
you may be utterly mistaken, and no doubt hope you are as much as
I do, still, the ring is very handsome: and, besides, as I so often
think—”
“Do not be telling me your thoughts just now,” replied the voice of
the saint, “for I can hear the bugle calling us to supper. There is
another precaution I would recommend, a precaution that I will
explain to you this evening, after we have eaten and drunk,” said
Hoprig, as they went away together.
Florian, after waiting a discreet while, came from behind the
hedge. Florian looked rather thoughtful as he too walked toward the
castle.
Sunset was approaching. The entire heavens, not merely the west,
had taken on a rose-colored glare. Unbelievably white clouds were
passing very rapidly, overhead but not far-off, like scurrying trails of
swans’ down and blown powder puffs. The air was remarkably cool,
with rain in it. The diffused radiancy of this surprising sunset loaned
the gravelled walkway before him a pink hue: the lawns about him,
where the grass was everywhere intermingled with white blossoms,
had, in this roseate glowing which flooded all, assumed a coldly livid
tinge. To Florian’s left hand, piled clouds were peering over the
mountain like monstrous judges, in tall powdered wigs, appraising
the case against someone in Florian’s neighborhood.
He shrugged, but his look of thoughtfulness remained. It was
distinctly upsetting to have one’s patron saint, in place of contriving
absolution for the past,—a function which that recreant Hoprig had
never, after all, attended to,—now absolutely planning mischief for
the future.
10.
Who Feasted at Brunbelois

LORIAN had been married so often that he had


some claim to be considered a connoisseur of
weddings: and never, he protested, had assembled
to see him married a more delightful company than
the revellers who came from every part of Acaire
now that the magic was lifted from these woods.
Acaire was old, it had been a forest since there
was a forest anywhere: and all its denizens came now to do honor to
the champion who had released them from their long sleeping. The
elves came, in their blue low-crowned hats; the gnomes, in red
woolen clothes; and the kobolds, in brown coats that were covered
with chips and sawdust. The dryads and other tree spirits of course
went verdantly appareled: and after these came fauns with pointed
furry ears, and the nixies with green teeth and very beautiful flaxen
hair, and the duergar, whose loosely swinging arms touched the
ground when they walked, and the queer little rakhna, who were
white and semi-transparent like jelly, and the Bush Gods that were in
Acaire the oldest of living creatures and had quite outlived their
divinity. From all times and all mythologies they came, and they
made a tremendous to-do over Florian and the might which had
rescued them from their centuries of sleeping under Mélusine’s
enchantment.
He bore his honors very modestly. But Florian delighted to talk
with these guests, who came of such famous old families: and they
told him strange tales of yesterday and of the days before yesterday,
and it seemed to him that many of these stories were not quite
logical. Few probabilities thrived at Brunbelois. Meanwhile the Elm
Dwarfs danced for him, pouring libations from the dew pools; the
Strömkarl left its waterfall in the forest, to play very sweetly for
Florian upon the golden harp whose earlier music had been more
dangerous to hear; and the Korrid brought him tribute in the form of
a purse containing hair and a pair of scissors. And it was all
profoundly delightful.
“I approve of the high place,” said Florian, upon the morning of his
marriage: “for here I seem to go about a more heroic and more
splendid world than I had hoped ever to inhabit.”
“Then, why,” asked Helmas, “do you not remain at Brunbelois,
instead of carrying off my daughter to live in that low sort of place
down yonder? Why do you two not stay at Brunbelois, and be the
King and Queen here after I am gone?”
Florian looked down from the porch where they were waiting the
while that Queen Pressina finished dressing. From this porch Florian
could see a part of the modern world, very far beneath them. He
saw the forests lying like dark flung-by scarves upon the paler green
of cleared fields; he saw the rivers as narrow shinings. In one place,
very far beneath them, a thunderstorm was passing like—of all
things, on this blissful day,—a drifting bride’s-veil. Florian saw it
twinkle with a yellow glow, then it was again a floating small white
veil. And everywhere the lands beneath him bathed in graduations of
vaporous indistinction. Poictesme seemed woven of blue smokes and
of green mists. It afforded no sharp outline anywhere as his gazing
passed outward toward the horizon. And there all melted bafflingly
into a pearl-colored sky: the eye might not judge where, earth
ending, heaven began in that bright and placid radiancy.
It was droll to see this familiar, everyday, quite commonplace
Poictesme in that guise, to see it as so lovely, when one knew what
sort of men and women were strutting and floundering through what
sort of living down there. It would be pleasant to remain here at
high Brunbelois, and to be a king of the exalted old time that
lingered here and nowhere else in all the world. But Florian
remembered his bargain with brown Janicot, and he knew that in
this high place it could not be performed: and it was as if with the
brightness of Florian’s day-dreaming already mingled the shining of
the sword with which Florian was to carry out his part of the
bargain. Flamberge awaited him somewhere in those prosaic
lowlands of 1723, down yonder.
Therefore, as became a man of honor, Florian said, resolutely:
“No, your majesty, my kingdom may not be of this world. For my
duty lies yonder in that other world, wherein I at least shall yet have
many months of happiness before that happens which must
happen.”
“So you are counting upon many months of happiness,” the King
observed. “Your frame of mind, my son-in-law, is so thoroughly what
it should be that to me it is rather touching.”
“A pest! and may one ask just what, exactly, moves your majesty
toward sadness?”
“The reflection that there is no girl anywhere but has in her much
of her mother,” the King answered, darkly. “But my dear wife is
already dressed, I perceive, and is waiting for us, after having
detained us hardly two hours. So let us be getting to the temple.”
“Very willingly!” said Florian. He wondered a little at the blindness
of fathers, but he was unutterably content. And straightway he and
Melior were married, in the queer underground temple of the
Peohtes, according to the marriage rites of Llaw Gyffes.
Melior wore that day upon her lovely head a wreath of thistles,
and about her middle a remarkable garment of burnished steel
fastened with a small padlock: in her hand she carried a distaff, flax
and a spindle. And the marriage ceremony of the Peohtes, while new
to Florian, proved delightfully simple.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like