BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cyoung
Fluorite | Level 6

I've been looking through the forums and have seen this issue crop up before.  It looks like it should be some form of semicolon placement but I've tried running this seperately and couldn't find the issue.  Does anyone have an idea?

 

I'm trying to create a macro to isolate patients from one dataset (labelled "SOURCE.fo_id", for the ID variable) with any new dataset ("&data") - the code for this is below.

 

 

%MACRO subset (data=);
DATA &data._fo;
	MERGE 	SOURCE.fo_id (in= info_id)
			&data (in= inmerge);
	BY ID;
	IF info_id inmerge;
RUN;	

%MEND subset;

 

However, everytime I try to run this I'm recieving the following error message: 

22: LINE and COLUMN cannot be determined.
NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and
COLUMN where the error has occurred.

 

 

Has anyone encountered this issue before or have any suggestions? Am I missing something silly?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Yes, an easy fix.  Assuming you want matches on ID:

 

if info_id and inmerge;

View solution in original post

2 REPLIES 2
Astounding
PROC Star

Yes, an easy fix.  Assuming you want matches on ID:

 

if info_id and inmerge;

cyoung
Fluorite | Level 6

That change worked! Thank you so much!!

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
  • 2 replies
  • 11376 views
  • 0 likes
  • 2 in conversation