Detailed instructions for use are in the User's Guide.
[. . . ] User's Guide
SAS Clinical Standards Toolkit 1. 3
®
SAS® Documentation
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. SAS ® Clinical Standards Toolkit 1. 3: User's Guide Copyright © 2010, SAS Institute Inc. , Cary, NC, USA All rights reserved. For a hardcopy 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. [. . . ] P: indicates that the value is a duration (period) nY: n elapsed years nM: n elapsed months nD: n elapsed days T: the elapsed time in hours, minutes, and seconds nH: n elapsed hours nM: n elapsed minutes nS: n elapsed seconds Typically, only the units with actual values are given. If time is omitted, then T must also be omitted.
Special Topic: SAS Implementation of ISO 8601
String Interpretation Comments
151
P0000-00-01
The span of zero years + zero months + one day.
Durations can be expressed in an alternative format. When expressed, the length of time is stored in the same format as date and time, but preceded by a P. Instead of expressing a specific point in time, it expresses a period of time.
P1Y2M3DT4H5M6S
The span of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds.
The units must be in the correct order. The T is required for all time values, but it should not be specified if no time value is given.
Intervals: Template PnYnMnDTnHnMnS/ YYYY-MMDDTHH:MM:SS or YYYY-MMDDTHH:MM:SS/ PnYnMnDTnHnMnS or YYYY-MMDDTHH:MM:SS/ PnYnMnDTnHnMnS or YYYY-MMDDTHH:MM:SS/YYYYMM-DDTHH:MM:SS Intervals: Examples 2009-03-25T22:29/P1Y The span of one year starting on March 25, 2009 at 10:29 p. m. Intervals can express the period of time that starts at a given point in time. P0001-00-00/2009-03-25T22: 29 The span of one year ending on March 25, 2009 at 10:29 p. m. Intervals can express the period of time that ends at a given point in time. Intervals This is a duration that is anchored to a specific point in time.
152
Chapter 6
·
Validation
String Interpretation Comments
2008-03-25/2009-03-25
The span of time between March 25, 2008 and March 25, 2009, which happens to be one year.
Intervals can express the period of time that starts at a given point in time and ends at a given point in time. The duration value itself is implied.
Table 6. 24 Topic
SAS ISO 8601 References Link
SAS 9. 2 Language Reference: Dictionary
http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a002295669. htm http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a003169814. htm http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a003156604. htm http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a003170563. htm http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a003170574. htm http://support. sas. com/ documentation/cdl/en/lrdict/ 63026/HTML/default/ viewer. htm#a003169817. htm http://ftp. sas. com/techsup/ download/hotfix/hotfix. html
Working with Dates and Times Using the ISO 8601 Basic and Extended Notations
CALL IS8601_CONVERT Routine
$N8601Bw. d Informat
$N8601Ew. d Informat
Reading Dates and Times Using the ISO 860 Basic and Extended Notations
SAS Hot Fixes
Special Topic: Debugging a Validation Process
153
Special Topic: Debugging a Validation Process
The SAS Clinical Standards Toolkit provides two properties or global macro variables for debugging problems occurring with all processes. The _cstDebug global macro variable toggles debugging options on and off. Many SAS Clinical Standards Toolkit code modules have conditional branching such as:
%if &_cstDebug %then %do; /* perform some action */ end;
If debugging is toggled on (_cstDebug=1), several things can happen. · If code is in place, like the following excerpt from the sample driver module (validate_data. sas) documented in "Running a Validation Process" on page 111, additional messaging to the SAS log can be enabled.
data _null_; _cstDebug = input(symget('_cstDebug'), 8. ); if _cstDebug then call execute("options source source2 &_cstDebugOptions;"); else call execute("options source source2 nomlogic nomprint nosymbolgen;"); run;
By default, the &_cstDebugOptions global macro variable is set to: mprint mlogic symbolgen mautolocdisplay These SAS global macro variables generate a lot of information, and they quickly fill the SAS log when running interactively. You might consider running the process in batch or use PROC PRINTTO to redirect the SAS log to a file. They remain available in the Work library to help with debugging.
Each SAS Clinical Standards Toolkit process consists of two primary tasks. The first task is to use set up routines to establish the SAS Clinical Standards Toolkit environment. The second task is to perform some primary SAS Clinical Standards Toolkit action. In SAS Clinical Standards Toolkit setup, errors most often occur because of problems with the SASReferences data set. The following table lists some common errors with possible causes: For recommendations on configuring the SASReferences data set appropriately, see "Building a SASReferences File" on page 69.
154
Chapter 6
·
Validation
Table 6. 25
Debugging Process Setup Errors Possible Cause and Corrective Action
Error
Location Where Error Is Reported
Expected libraries are not allocated.
SAS Log, Libraries window, SAS DMS
(1) An invalid physical name for the libref has been used. (2) The path specified for the libref is invalid; it points to a nonexistent directory. Check the path in your SASReferences data set.
Error: SAS system library WORK cannot be reassigned.
SAS Log
Work is being used as a sasref value with or without a path being designated. One of the paths specified for a libref is invalid; it points to a nonexistent directory.
WARNING: One or more libraries specified in the concatenated library CSTTMP do not exist.
SAS Log
Special Topic: Debugging a Validation Process
Possible Cause and Corrective Action
155
Error
Location Where Error Is Reported
Warning: Process ending prematurely for CST0090-there were problems with the sasreferences data set.
SAS Log
There is a problem with the SASReferences data set being used. [. . . ] The foreign key &_cstparm1 does not have a corresponding value in the target data set &_cstparm2. The foreign key &_cstparm1 does not have a corresponding value in the target data set &_cstparm2. The foreign key &_cstparm1 does not have a corresponding value in the target data set &_cstparm2. The foreign key &_cstparm1 does not have a corresponding value in the target data set &_cstparm2. [. . . ]