SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
SatishR
Obsidian | Level 7

Hello team,

I am using below code to unload and load data in cas

 

cas casauto sessopts=(caslib="test123");

caslib mycaslib datasource=(srctype='sqlserver' user='xxxxxxx' password='xxxxxxxx' sqlserver_dsn="xxxxxxx"
schema=dbo catalog=*);

PROC CASUTIL;
droptable CASDATA="Event_calltype_analysis_rpt"
INCASLIB="test123";
QUIT;


caslib _all_ assign;
proc casutil;
load casdata="Event_calltype_analysis_rpt" incaslib="mycaslib" outcaslib="test123" casout="Event_calltype_analysis_rpt" promote;
quit;

However, I am getting below warning 

NOTE: Performing serial LoadTable action using SAS Data Connector to SQL Server.
WARNING: WARNING: [SAS][ODBC SQL Server Wire Protocol driver]Fractional truncation. Error in column 37.
 
Warning count is too much
SatishR_1-1721195219826.png

 

 
Column 37 is 
SatishR_0-1721195174794.png

 

How to resolve this issue. Thanks in advance



3 REPLIES 3
ChrisNZ
Tourmaline | Level 20
This typically happens because the data type does not support time fractions (milliseconds).
A workaround is to round the value to the nearest second.
SatishR
Obsidian | Level 7

@ChrisNZ  any solution to trunctate this fraction in Load statement?

 

ChrisNZ
Tourmaline | Level 20

If the target does not support the data type, you need to modify the source data.

Either a temporary solution that preserves the current data: create a view and upload it if that's supported,

or a permanent solution: round the values in the source table.

You might be able to compute a new variable on the fly, I've never tried that (options COMPPGM and COMPVARS, see here).

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 502 views
  • 0 likes
  • 2 in conversation