BookmarkSubscribeRSS Feed
shl007
Obsidian | Level 7

I have a proc append issuing the following notes. I assume none of the notes below would explain why a numeric column would be empty (when the append dataset has it populated)?

 

What is happening is, the dataset containing the rows to be appended has several numeric columns populated, but when the append executes, those numeric columns in the base dataset are left blank. No warnings or other messages are in the log from the append other than the notes below.

 

Any ideas on why the numeric columns are blank after the append? Does the large dataset size have something to do with SAS not being able to append? One thought a colleague had was to make the columns character to see if that allows the columns to be populated after the append.

 

INFO: Engine's fast-append process in use.
INFO: 03:26:04 Reading DATA file, updating BASE file
INFO: Starting data set size is 1005557 pages
INFO: Engine's block-read method cannot be used because:
INFO: - The file is compressed
INFO: Ending data set size is 1007791 pages, 2234 added.
INFO: 00:00:00 Elapsed time
INFO: 03:26:04 Finished updating BASE file

3 REPLIES 3
ballardw
Super User

Show the ENTIRE log, the code and all messages.

 

Are you appending to a SAS data set or an external database file? External files, i.e. not native SAS data sets can sometimes be problematic. If an external data base has a constraint on a field such that it will only accept certain numeric values I might expect them to be "blank" if you attempt to append values that are not accepted.

 

Format associated with the columns in the base file?

 

Attempting to "append" character values to a numeric field with proc append should result in errors as the procedure doesn't append incorrect data types.

Quentin
Super User

Can you post the full log, showing the PROC APPEND code you ran and all the Notes and other messages after that?  There's nothing in those INFO: messages that would explain your problem.  But PROC APPEND is pretty good about sending messages to the log when it encounters problems.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Tom
Super User Tom
Super User

What you describe sounds like what would happen if the variables did not exist in the source dataset.

But you should see a message about that.

754  data class;
755   set sashelp.class;
756   where sex='M';
757  run;

NOTE: There were 10 observations read from the data set SASHELP.CLASS.
      WHERE sex='M';
NOTE: The data set WORK.CLASS has 10 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.04 seconds


758
759  proc append
760    base=class
761    data=sashelp.class(where=(sex='F') drop=age)
762  ;
763  run;

NOTE: Appending SASHELP.CLASS to WORK.CLASS.
WARNING: Variable Age was not found on DATA file.
NOTE: There were 9 observations read from the data set SASHELP.CLASS.
      WHERE sex='F';
NOTE: 9 observations added.
NOTE: The data set WORK.CLASS has 19 observations and 5 variables.
NOTE: PROCEDURE APPEND used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

Tom_0-1691533630661.png

 

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