BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

The libname statement is pointing to the location where the existing dataset that you are trying to append to exists.

Run a PROC CONTENTS on it and see how many observations it has and how the variables are defined.

 

If it does not have any data then recreate it with the new definition.

If it does have data then check the values and make sure that you do not already have some corrupted values stored.  You could possible fix the dataset and convert the variable from numeric to character (there are dozens of examples of that question on the and other SAS help sites).  

 

If you do have corrupted data do you still have the program(s) that created that dataset that you can fix and re-run?  

 

Perhaps you created it using earlier runs of this program?  PROC APPEND will create the BASE dataset from the input data if it does not already exist.  So if you don't care what is in it now you might want to use use PROC DELETE to get rid of it and then you can let PROC APPEND create a new one with the current data. That way it will definitely match the format of the new dataset.

 

 

 

yzinger
Fluorite | Level 6

I am asking if I can wipe the table and then just load the latest file.

 

If this is the case none of my coding as seen above would have to change correct?

 

I did a proc contents and the voucher code is defined a number, 8 in length, and a format of 18.

 

 

 

 

yzinger
Fluorite | Level 6

Hi guys...just wanted to explain how I ended up fixing the problem.

 

I changed the Voucher Code value to:

 

attrib Voucher_Code length = $30;

 

as suggested by you guys. However, I was then getting the errors you see above. What I did was clear the table of all data, then I run the top part of my code changing:

 

data work.evoucher

 

to

 

data atl_esi.evoucher

 

..this will recreate the table with my new attrib above. Note I left out the proc append from end of my original code.

 

Once this hacked code completed I checked the table and it loaded properly. I then was able to run the entire code (with atl_esi.evoucher changed back to work.evoucher and with the proc append statement) and again table loaded fine and log indicated no errors.

 

So, im summary I had to recreate the table perse so as to make sure my work.evoucher table (session type table) matched my target table.

 

Thanks for all help folks.

B

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 17 replies
  • 1361 views
  • 3 likes
  • 4 in conversation