BookmarkSubscribeRSS Feed
NitinDwivedi
Calcite | Level 5

Hi,

 

I am using this procedure to insert a record into my DB2 table.

 

The issue is that I am getting cutoff date when the row gets updated in DB2, whereas I am passing date from SAS dataset  and Current timestamp.

 

VERS_NR                                     2,801
VERS_DATO                                01.01.1960
VERS_CLIENT_ID                        301
VERS_TYPE                                 LOAD_CST
VERS_TS                                      1960-01-01-00.00.00.253692

 

Please let me know why it is happening and how to sort out the issue.

 

Output from SAS Dataset  :

 

VTYPE      VERSNR    VDATO    VCLIENT       VTS

LOAD_CST     2801     21331      301      1760887609

 

Excerpt from Code :

 

proc db2util data=abcd SSID=db0t
table=systemf.tbcrvers function=i;
mapto VERSNR = VERS_NR
VDATO        = VERS_DATO
VCLIENT      = VERS_CLIENT_ID
VTYPE        = VERS_TYPE
VTS          = VERS_TS;
update;
run;

 

1 REPLY 1
DartRodrigo
Lapis Lazuli | Level 10

Hi mate,

 

This happens sometimes, because if you declare a SAS Date without the correct syntax

it will uderstand that you are making an expression and will print a value close to zero,

the zero if you transform into date format it will be 01/01/1960 that's when SAS was

funded.

 

Check the working with SAS dates.

 

Att

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 759 views
  • 0 likes
  • 2 in conversation