0

I'm trying to do some manipulations on a csv file which I've read in to the Job Editor Window using the standard file reader. In order to do so, I connect the file reader to the input node of a User Generated Code transformation, and then follow the instructions at this link.

To make things as simple as possible, the code simply creates a new field called TEST and sets it identically equal to 1:

DATA TEMP;
TEST = 1;
RUN;

When I try to view the output by right clicking on the output flap (after running the project) and selecting "Open", I receive the following error messages for each of the columns (*) of the input file:

Column * could not be found in the table/view identified with the correlation name W8T38KNJ....

Google thinks this link is apropos, though I disagree since I haven't renamed any of my columns.

It may be useful to mention that this is my first day working with SAS DIS. Any help with this would be greatly appreciated.

Joe
  • 62,789
  • 6
  • 49
  • 67
Rookatu
  • 1,487
  • 3
  • 21
  • 50

2 Answers2

3

You haven't referenced a data set in your Data step. The code above would create a data set with a single variable and observation with value 1. Something like the following with a SET statement may be what you're looking for. I don't work with DI though, so not sure what the output table name should be, i.e. the name in the DATA statement.

DATA TEMP;
  SET &SYSLAST;
  TEST = 1;
RUN;
Reeza
  • 20,510
  • 4
  • 21
  • 38
  • This was part of the problem (I was copying my code over from SAS EG and assumed that the `SET` command would be unnecessary due to the metadata mapping). But figuring out the table name for the `SET` statement was another step. Apparently closing and reopening the project was another necessary step. Also +1 to sushil for the point about the metadata. – Rookatu Mar 13 '15 at 20:14
3

It looks like the metadata information of the table on DI Studio( Metadata server) is different from metadata information of the physical SAS dataset. I think you might have intentionally/accidentally added some extra columns on the output dataset of User written transformation( click User Written transformation and check the mapping section) that physically doesn't exist.

The column the error popup that you've provided would be mentioning the extra column that most likely would not be there in the physical SAS dataset. Also, any extra column that you create in the USER WRITTEN transformation should be added in the output dataset of User written transformation( click User Written transformation and check the mapping section) otherwise it wouldn't show up when you right click on open the datasets.

Also, since you've mentioned that you are a beginner. I would suggest not to right click and view dataset data. Instead use the LIST DATA transformation under OUTPUT transformation group.

sushil
  • 1,576
  • 10
  • 14