Problem Note 34315: CATS function and MISSING='' used together can cause truncation of character values
CATS function can result in truncated character values
When the CATS function, or any of the CAT functions that truncate trailing blanks, is used in combination with the MISSING='' option, the result of the CATS function may contain truncated character values. No error messages or warning are returned. The functions that are involved are: CATS, CATT, and CATX.
To circumvent the problem, use a value for the MISSING= option or use a different method to concatenate the values.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Windows Vista | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Linux | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
data indata;
length type $ 15 start $ 25;
input type $ seq period $ flag $ start $ offset unit $;
datalines;
pre-study -100 . Y X_BIRTH_DATE . none
treatment 1 FIRST Y X_MINIMUM . none
saftey 200 SECOND N X_MAXIMUM . none
post-study 300 . N X_MAXIMUM2 30 day
;
options missing='';
data test;
set indata;
newvar=cats("0000", '09'x, "000", '09'x, type, '09'x, seq, '09'x,period, '09'x, flag, '09'x, start, '09'x, offset, '09'x, unit);
run;
proc print;
title 'Results of CATS function';
run;
Results of CATS function 13
p o n
s e f e
t t r f f u w
O y a s i l s n v
b p r e o a e i a
s e t q d g t t r
1 pre-study X_BIRTH_DATE -100 Y none 0000 000 pre-study -100 none
2 treatment X_MINIMUM 1 FIRST Y none 0000 000 treatment 1 FIRST Y X_MINIMUM none
3 saftey X_MAXIMUM 200 SECOND N none 0000 000 saftey 200 SECOND N X_MAXIMUM none
4 post-study X_MAXIMUM2 300 N 30 day 0000 000 post-study 300 N X_MAXIMUM2 30 day
Using the CATS function, or any of the CAT functions that trim trailing blanks, with the MISSING='' option can result in concatenation of character values
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> Functions ==> Character ==> CATS SAS Reference ==> Functions ==> Character ==> CATT SAS Reference ==> Functions ==> Character ==> CATX
|
Date Modified: | 2008-12-24 09:42:25 |
Date Created: | 2008-12-24 08:30:02 |