DATA Step, Macro, Functions and more

help with LOG error

Not applicable
Posts: 0

help with LOG error

hello ,

i have two data sets which i need to concatenate and i'm getting errors when i run the Merge for both.The variables for the two datas ( period 2A and period 2B ) are :

Period 2A
TransactionID $1-8
TimeofSale $9-16;

Period 2B
TransactionID $1-8
DateofSale $9-18
LaptopModel $19-24
UnitsSold 25-27
Warranty 28;

I have sorted the two datas by the Transaction ID and then run the following merge :

data new;
merge period2A period 2B;
by TransactionID;
proc print data = new;
TITLE "Period2 Sales";

I get the LOG error as :

3 data new;
24 merge period2A period 2B;
ERROR: File WORK.PERIOD.DATA does not exist.
ERROR: File WORK.B.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, END,

ERROR 200-322: The symbol is not recognized and will be ignored.

25 by TransactionID;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NEW may be incomplete. When this step was stopped there were 0
observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

26 proc print data = new;
27 TITLE "Period2 Sales";
28 Run;

NOTE: No observations in data set WORK.NEW.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Super Contributor
Super Contributor
Posts: 3,176

Re: help with LOG error

Posted in reply to deleted_user
Honestly, you really need to desk-check your program and your code with your SAS log output thoroughly before posting.

Also, there was another post/reply with the exact answer to the problem revealed in this post.

Scott Barry
SBBWorks, Inc.
Super Contributor
Posts: 359

Re: help with LOG error

I get the feeling we are being used as tutors in a basic SAS class.
Super Contributor
Posts: 474

Re: help with LOG error

Same here, which is kind of boring to me.

Cheers from Portugal.

Daniel Santos @
Trusted Advisor
Posts: 2,125

Re: help with LOG error

Posted in reply to deleted_user

You have been found out. I should have jumped in when I saw "SAScourse" as a part of a directory name. I teach the SAS part of an Intro Biostat course.

Your questions are consistent with a person who is "scanning for an answer" rather than "reading for understanding." The reference manual is a hard place to get "understanding" unless you already have a couple of computer languages under your belt (They are necessary for the specific syntax, but are harder for the big picture.). The SAS "concepts" manuals are better, but still assume a certain level of sophistication with computer languages and "structured programming" ideas. You need to be carefully reading your course materials and perhaps supplementing it with one of the good introductory SAS books in the "Books by Users" series. If your course has an instructor, you should also be using him or her.

The forum is helpful to new users, but we appreciate ones who do some of their own thinking too.

Doc Muhlbaier
Ask a Question
Discussion stats
  • 4 replies
  • 5 in conversation