BookmarkSubscribeRSS Feed
RobS1234
Calcite | Level 5
Data UniPrePostID UniPrePostIDErr;
	set data.cbo_age_&yr.Ed;
	UniIDErr = 0;	 
	If VOC_PROGRAM_CODE in ('9900000' '9900040' '9900050' '9900130' '9900500') then do; 
	If PretestID1 ne '9999' and PretestID1 = PostTestID1 then UniIDErr = 1; 
	else if PretestID2 ne '9999' and PretestID2 = PostTestID2 then UniIDErr = 1; 
	else if PretestID3 ne '9999' and PretestID3 = PostTestID3 then UniIDErr = 1; 
			else UniIDErr = 0;
	end;
		If UniIDErr = 0 then output UniPrePostID;
		If UniIDErr = 1 then output UniPrePostIDErr;
	Run; 
 

Program Log
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='T:\CBO\TESTING_Only\2324\Edit Report_Test\Programs\Prompt EditCBOData_Prog2.egp';
6 %LET _CLIENTPROJECTPATHHOST='FDOE-BJ0ZPL3';
7 %LET _CLIENTPROJECTNAME='Prompt EditCBOData_Prog2.egp';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGSR TEMP;
15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16 STYLE=HtmlBlue
17 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SAS9.4/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ENCODING=UTF8
22 options(rolap="on")
23 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26 /*C35*/
27 Data UniPrePostID UniPrePostIDErr;
28 set data.cbo_age_&yr.Ed;
ERROR: Libref DATA is not assigned.
29 UniIDErr = 0;
30 If VOC_PROGRAM_CODE in ('9900000' '9900040' '9900050' '9900130' '9900500') then do;
31 If PretestID1 ne '9999' and PretestID1 = PostTestID1 then UniIDErr = 1;
32 else if PretestID2 ne '9999' and PretestID2 = PostTestID2 then UniIDErr = 1;
33 else if PretestID3 ne '9999' and PretestID3 = PostTestID3 then UniIDErr = 1;
34 else UniIDErr = 0;
35 end;
36 If UniIDErr = 0 then output UniPrePostID;
37 If UniIDErr = 1 then output UniPrePostIDErr;
38 Run;

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

39
40
41
42
43
44
45 GOPTIONS NOACCESSIBLE;
2 The SAS System 09:18 Tuesday, February 13, 2024

46 %LET _CLIENTTASKLABEL=;
47 %LET _CLIENTPROCESSFLOWNAME=;
48 %LET _CLIENTPROJECTPATH=;
49 %LET _CLIENTPROJECTPATHHOST=;
50 %LET _CLIENTPROJECTNAME=;
51 %LET _SASPROGRAMFILE=;
52 %LET _SASPROGRAMFILEHOST=;
53
54 ;*';*";*/;quit;run;
55 ODS _ALL_ CLOSE;
56
57
58 QUIT; RUN;
59

1 REPLY 1
PaigeMiller
Diamond | Level 26
27 Data UniPrePostID UniPrePostIDErr;
28 set data.cbo_age_&yr.Ed;
ERROR: Libref DATA is not assigned.

You are trying to access a library named DATA, which does not exist. Perhaps you forgot to include a LIBNAME statement to define the library DATA prior to this. Another possible cause is that the data set is not in the DATA library at all, it is in the WORK library, in which case you would want to use something like set work.cbo_age_&yr.Ed;  There are other possibilities as well, you need to identify what library this data set named cbo_age_&yr.ED is located in.

--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 373 views
  • 0 likes
  • 2 in conversation