Problem Note 49002: The warning "Character expression will be truncated when assigned to character column filter" occurs when you use the %MDUCHGV macro
When you use the %MDUCHGV macro (which is used for metadata identity synchronization), the following warning is generated:
WARNING: Character expression will be truncated when assigned to character column filter.
This message occurs because of a change in PROC SQL reporting in SAS® 9.3. The SQL procedure cannot determine the length of an expression result during the compilation phase of the step. The warning is produced when the expression result is greater than 200 bytes.
You can ignore this warning. The significant characters in the expression result will never be truncated.
The following expressions are used in the SQL procedure's INSERT INTO statements to populate the ERRORSDS data set within the %MDUCHGV macro.
"upcase(name) = " || quote(trim(upcase(pexcept1.name))) as filter
"upcase(name) = " || quote(trim(upcase(pexcept2.name))) as filter
"upcase(name) = " || quote(trim(upcase(idgrpsexcept1.name))) as filter
"upcase(name) = " || quote(trim(upcase(idgrpsexcept2.name))) as filter
"upcase(userid) = " || quote(trim(upcase(loginsexcept1.userid))) as filter
"upcase(userid) = " || quote(trim(upcase(loginsexcept2.userid))) as filter
"keyid = " || quote(trim(idgrpsexcept3.keyid)) as filter
"keyid = " || quote(trim(pexcept3.keyid)) as filter
"upcase(AuthDomName) = " || quote(trim(AuthDomName)) as filter
"keyid = " || quote(trim(AuthDomainexcept2.keyid)) as filter
If you want to omit the warning messages from the SAS log, or if your third-party job scheduler reports a failed job because of the warning, you should modify the %MDUCHGV macro by adding the NOWARN option to the PROC SQL step that generates the &ERRORSDS table and by resetting two return codes, as follows:
- Copy the mduchgv.sas file into a different directory, as shown in the following examples:
For UNIX Operating Environments:
cp /usr/local/SASHome/SASFoundation/9.3/sasautos/mduchgv.sas /home/sas/mduchgv.sas
For Microsoft Windows Operating Environments:
copy "C:\Program Files\SASHome\SASFoundation\9.3\core\sasmacro\mduchgv.sas" "C:\Users\sas\Documents\My SAS Files\9.3\mduchgv.sas"
- In the copied mduchgv.sas file, locate the PROC SQL step that begins with the following lines:
proc sql noprint;
/* Build the empty ERRORSDS data set. */
create table &errorsds ( errcode integer,
- Add a %LET statement and the NOWARN option, as shown below:
%let SYSCC_49002=&SYSCC;
proc sql noprint nowarn;
/* Build the empty ERRORSDS data set. */
create table &errorsds ( errcode integer,
. . .additional lines. . .
quit;
- Add the following statements to conditionally reset SYSERR and SYSCC immediately after execution of the QUIT statement shown above:
%if &SYSCC_49002=0 %then %do;
%if &syscc=4 %then %do;
%put RESETTING SYSCC and SYSERR;
data _null_; run;
%let syscc=0;
%end;
%end;
- Modify your synchronization program to reference the saved copy of mduchgv.sas rather than the SAS autocall macro. Do this by adding the following %INCLUDE macro to your code before the macro call. Note: It is best practice to add the %INCLUDE statement near the top of the program to make the statement more visible.
/* Use the edited version of the %MDUCHGV macro */
/* to prevent PROC SQL truncation warnings, per */
/* SAS Note 49002. */
%include '/home/sas/mduchgv.sas';
Operating System and Release Information
SAS System | SAS Metadata Server | Microsoft Windows Server 2003 Enterprise Edition | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 | | 9.3 TS1M0 | |
z/OS | 9.3 | | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 | | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 | | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 | | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 | | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 | | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 | | 9.3 TS1M0 | |
Windows Vista | 9.3 | | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 | | 9.3 TS1M0 | |
HP-UX IPF | 9.3 | | 9.3 TS1M0 | |
Linux | 9.3 | | 9.3 TS1M0 | |
Linux for x64 | 9.3 | | 9.3 TS1M0 | |
Solaris for x64 | 9.3 | | 9.3 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: | medium |
Date Modified: | 2015-02-03 14:19:47 |
Date Created: | 2013-01-25 14:46:55 |