Problem Note 45720: SCL SCAN function does not honor the new fourth parameter added for the Base SAS® SCAN function in SAS® 9.2
In SAS 9.2, a fourth parameter was added to the Base SAS SCAN function. Although this new parameter is valid in Base SAS, the SCL SCAN function that passes through to the Base SAS function was not enhanced to accept this parameter.
The following example specifies the fourth parameter within SCL code:
INIT:
length text $50;
text='This is the first day of the week, it is Monday.';
word=scan(text,1,'09'x,'m');
put WORD=;
return;
This code generates the following messages in the SAS Log:
NOTE: Compiling B.SCL.
ERROR: [Line 4] Function SCAN has too many arguments.
ERROR: Compile error(s) detected. No code generated.
However, similar code executed from Base SAS works as expected.
64 data _null_;
65 length text $50;
66 text='This is the first day of the week, it is Monday.';
67 word=scan(text,1,'09'x); *,'m');
68 put WORD=;
69 run;
word=This is the first day of the week, it is Monday.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Operating System and Release Information
SAS System | SAS/AF | z/OS | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.2 TS2M0 | 9.4 TS1M0 |
Windows Vista | 9.2 TS2M0 | 9.4 TS1M0 |
Windows Vista for x64 | 9.2 TS2M0 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.2 TS2M0 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.2 TS2M0 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.2 TS2M0 | 9.4 TS1M0 |
HP-UX IPF | 9.2 TS2M0 | 9.4 TS1M0 |
Linux | 9.2 TS2M0 | 9.4 TS1M0 |
Linux for x64 | 9.2 TS2M0 | 9.4 TS1M0 |
OpenVMS on HP Integrity | 9.2 TS2M0 | 9.4 TS1M0 |
Solaris for x64 | 9.2 TS2M0 | 9.4 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.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-02-21 09:36:14 |
Date Created: | 2012-02-19 23:42:10 |