<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ERROR: Libref PRODUCTS is not assigned. in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/765083#M37382</link>
    <description>&lt;P&gt;Caution: Habitual use of the same data set as source and output data set as in&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data Projects.source;
	set Projects.source;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;has potential to corrupt your data set and require rebuilding from scratch if you make a logic error as that use completely replaces the source data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 15:24:53 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-31T15:24:53Z</dc:date>
    <item>
      <title>ERROR: Libref PRODUCTS is not assigned.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764977#M37377</link>
      <description>&lt;P&gt;Using SAS on demand for academic and SAS Studio, I am deriving a multiple regression formula of dietary and other risk factors for non-communicable diseases. My library is Products. In the middle of the process, I get the error that Products is not assigned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I partitioned the dataset with the following statement:&amp;nbsp;&lt;CODE class=" language-sas"&gt;Where FSVV2 &amp;lt; 351.5724;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;After I close this file and go to the next, the data are still partitioned by&amp;nbsp;&lt;CODE class=" language-sas"&gt;Where FSVV2 &amp;lt; 351.5724;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;How do I end the partition?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David Cundiff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname Projects "/home/u43393119/Projects";

proc sort data=Projects.source;
	by weighted_no;
run;

quit;
*Combination dietary risk factors derived;

data Projects.source;
	set Projects.source;
	FSVV=pmeat17KC + rmeat17KC + fish17KC + milk17KC + poultry16KC + eggs16KC
+ aSFA16KC + aPUFA17KC + aTFA17KC;
	FSVV2=pmeat17KC2 + rmeat17KC2 + fish17KC2 + milk17KC2 + poultry16KC2 + eggs16KC2
+ aSFA16KC2+ aPUFA17KC2 + aTFA17KC2;
	addedFat=aSFA16KC + aPUFA17KC + aTFA17KC;
	addedFat2=aSFA16KC2 + aPUFA17KC2 + aTFA17KC2;
	TotalKC=pmeat17KC + rmeat17KC + fish17KC + milk17KC + poultry16KC + eggs16KC + aSFA16KC 
+ aPUFA17KC + aTFA17KC + alcohol17KC + Sugarb17KC + potatoes16KC  + corn16KC 
+ fruits17KC + Vegetables17KC + nutsseeds17KC + wgrains17KC + legumes17KC + rice16KC + swtpot16KC;
	Label 
	FSVV=Fat-soluble vitamin variable 
	FSVV2=Fat-soluble vitamin variable m/f mean 
	TotalKC=Total Kcal/day data available;&lt;BR /&gt;&lt;BR /&gt;*Standardizing the variables;&lt;BR /&gt;
NCD17ms=NCD17m/399.68018 - 3.73754; 	
pmeat17KCs=pmeat17KC /0.87647 -1.77019; 
rmeat17KCs=rmeat17KC /29.44548 - 1.09634; 
fish17KCs=fish17KC /1.50615 - 1.85824; 
milk17KCs=milk17KC /9.78892 - 1.29811; 
poultry16KCs=poultry16KC /16.24909 - 1.25773; 
eggs16KCs=eggs16KC /11.77554 - 1.17391; 
aSFA16KCs=aSFA16KC /17.31454 - 4.36804; 		
aPUFA17KCs=aPUFA17KC /14.22874 - 1.56401; 
aTFA17KCs=aTFA17KC /4.7895 - 1.00687; 
Alcohol17KCs=Alcohol17KC /45.75517 - 1.50668; 
Sugarb17KCs=Sugarb17KC /106.54402 - 2.65994; 
potatoes16KCs=potatoes16KC /76.67565 - 0.98389; 
corn16KCs=corn16KC /44.73077 - 0.7639; 
fruits17KCs=fruits17KC /19.01693 - 1.74415; 
Vegetables17KCs=Vegetables17KC /40.70559 - 1.7763; 
nutsseeds17KCs=nutsseeds17KC /5.85482 - 1.09816;
wgrains17KCs=wgrains17KC /30.15109 - 1.84823; 
legumes17KCs=legumes17KC /32.09786 - 1.7087; 
rice16KCs=rice16KC /114.89232 - 1.51305;
swtpot16KCs=swtpot16KC /39.4746 - 0.75105; 
VitAdeficms=VitAdeficm /9447 - 2.83083; 
PAMETs17ms=PAMETs17m /1260 - 4.02677; 
AmbientPM17ms=AmbientPM17m /23.18446 - 2.35202; 
smoke17ms=smoke17m /0.19136 - 1.01969; 
SLTobacco17ms=SLTobacco17m /0.10191 - 0.87387; 
HHairPoll17ms=HHairPoll17m /0.23444 - 2.68993; 
kidneydz17ms=kidneydz17m /0.02878 - 2.03845;
T1DM17ms=T1DM17m /10.05986 - 1.19509; 
T2DM17ms=T2DM17m /14.24966 - 1.25353; 
sex_IDs=sex_ID /0.50004 - 2.99976;	
run;

*Table 1;

proc corr data=Projects.source fisher;
	var NCD17ms FSVV FSVV2 pmeat17KC rmeat17KC fish17KC milk17KC poultry16KC eggs16KC aSFA16KC 
		aPUFA17KC aTFA17KC Alcohol17KC Sugarb17KC potatoes16KC corn16KC fruits17KC 
		Vegetables17KC nutsseeds17KC wgrains17KC legumes17KC rice16KC swtpot16KC 
		kcal2016m VitAdeficm sodium17m Calcium17m fiber17m PAMETs17m Childunwt17m 
		discbreastF17m AmbientPM17m smoke17m SHsmoke17m SLTobacco17m leadblood17m 
		HHairPoll17m kidneydz17m T1DM17m T2DM17m BMI17m LDLC17 FPG17m SBP17m 
		SDI_2016m sex_ID 
		
		pmeat17KCs rmeat17KCs fish17KCs milk17KCs poultry16KCs eggs16KCs aSFA16KCs 
		aPUFA17KCs aTFA17KCs Alcohol17KCs Sugarb17KCs potatoes16KCs corn16KCs fruits17KCs 
		Vegetables17KCs nutsseeds17KCs wgrains17KCs legumes17KCs rice16KCs swtpot16KCs 
		VitAdeficms PAMETs17ms AmbientPM17ms smoke17ms SLTobacco17ms HHairPoll17ms 
		kidneydz17ms T1DM17ms T2DM17ms sex_IDs 
 ;
	with NCD17m;
run; quit;


*Table 2: Finding the about 1-3 billion people with the lowest and highest
 mean NCD male/female averaged;

data Projects.source;
	set Projects.source;
	Where FSVV2 &amp;lt; 351.5724;
	NCD17f1=
-	pmeat17KCs	*	1.55152	*	0.006135589
-	rmeat17KCs	*	32.28236	*	0.013609556
-	fish17KCs	*	2.79879	*	0.022961341
+	milk17KCs	*	12.70714	*	0.027785556
-	poultry16KCs	*	20.43698	*	0.080338234
-	eggs16KCs	*	13.8234	*	0.108609794
-	aSFA16KCs	*	75.63065	*	0.031915823
-	aPUFA17KCs	*	22.25392	*	0.069902072
-	aTFA17KCs	*	4.82242	*	1.45926E-08
+	Alcohol17KCs	*	68.93836	*	0.123369538
+	Sugarb17KCs	*	283.40041	*	0.015805518
-	potatoes16KCs	*	75.44008	*	0.005246105
-	corn16KCs	*	34.17002	*	0.003071376
-	fruits17KCs	*	33.1684	*	0.111389063
-	Vegetables17KCs	*	72.30542	*	0.010870148
-	nutsseeds17KCs	*	6.42952	*	0.012809712
-	wgrains17KCs	*	55.72616	*	0.013597892
+	legumes17KCs	*	54.84575	*	0.032080392
-	rice16KCs	*	173.83774	*	0.008246456
-	swtpot16KCs	*	29.64738	*	0.059658063
;

NCD17f2=
+smoke17ms * 0.19513 * 0.1406325
+SLTobacco17ms * 0.08906 * 0.110164248
+HHairPoll17ms * 0.63063 * 0.03125824
;

NCD17f3=
+T1DM17ms *12.02246 * 0.161451276
+T2DM17ms * 17.86239 * 0.140392596
;
run; quit;
	
Proc reg data=Projects.source;
	Where FSVV2 &amp;lt; 351.5724;
	model NCD17ms=NCD17f1 NCD17f2 NCD17f3 PAMETs17ms AmbientPM17ms sex_ids
/ selection=STEPWISE slentry=.25 slstay=.25;
	run; quit;
	
*NCD17f1	0.01066	0.00078537	78.74145	184.08	&amp;lt;.0001
NCD17f2	5.76168	0.45383	68.94733	161.18	&amp;lt;.0001
NCD17f3	0.11820	0.00263	864.77577	2021.63	&amp;lt;.0001
PAMETs17ms	-0.14377	0.01079	76.00534	177.68	&amp;lt;.0001
AmbientPM17ms	0.19499	0.01298	96.47405	225.53	&amp;lt;.0001
sex_IDs	-0.32929	0.01355	252.63250	590.59	&amp;lt;.0001	
;

data Projects.source;
	set Projects.source;
	Where FSVV2 &amp;lt; 351.5724;
NCD17f4=
NCD17f1 * 0.01066
+	NCD17f2 * 5.76168	
+	NCD17f3 * 0.11820	
-	PAMETs17ms * 0.14377
+	AmbientPM17ms * 0.19499	
-	sex_IDs * 0.32929
;
run;

proc corr data=Projects.source fisher;
Where FSVV2 &amp;lt; 351.5724;
	var NCD17f1 NCD17f2 NCD17f3 NCD17f4 PAMETs17ms AmbientPM17ms sex_ids;
	with NCD17ms;
RUN; quit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
*AT THIS POINT, THE LIBREF "PRODUCTS" BECOMES UNASSIGNED;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data Projects.source;&lt;BR /&gt;set Projects.source;
	Where FSVV2 &amp;lt; 351.5724;
	NCD17f5=
-	pmeat17KCs	*	2.07116E-06
-	rmeat17KCs	*	9.55891E-05
-	fish17KCs	*	1.39819E-05
+	milk17KCs	*	7.68185E-05
-	poultry16KCs	*	0.000357222
-	eggs16KCs	*	0.00032665
-	aSFA16KCs	*	0.000525174
-	aPUFA17KCs	*	0.000338451
-	aTFA17KCs	*	1.53108E-11
+	Alcohol17KCs	*	0.00185041
+	Sugarb17KCs	*	0.000974559
-	potatoes16KCs	*	8.61069E-05
-	corn16KCs	*	2.28338E-05
-	fruits17KCs	*	0.000803833
-	Vegetables17KCs	*	0.000171004
-	nutsseeds17KCs	*	1.79191E-05
-	wgrains17KCs	*	0.000164865
+	legumes17KCs	*	0.000382809
-	rice16KCs	*	0.000311896
-	swtpot16KCs	*	0.000384817
-	PAMETs17m	*	0.14678
+	AmbientPM17m	*	0.31418
+	smoke17m	*	0.30116
+	SLTobacco17m	*	0.01873
+	HHairPoll17m	*	0.08264
+	T1DM17m	*	0.53065
+	T2DM17m	*	0.08949
-	sex_id	*	0.22966
;
run; quit;

proc corr data=Products.source fisher;
	Where FSVV2 &amp;lt; 351.5724;
	var NCD17f1 NCD17f2 NCD17f3 NCD17f4 NCD17f5 PAMETs17ms AmbientPM17ms sex_ids;
	with NCD17ms;
run; quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS Log&lt;/P&gt;
&lt;DIV id="accordionContainer" class="dijitBorderContainer dijitContainer leftcolumn dijitBorderContainer-child dijitBorderContainer-dijitBorderContainer dijitBorderContainerPane dijitAlignLeft dijitLayoutContainer" data-dojo-type="dijit/layout/BorderContainer"&gt;
&lt;DIV id="accContainer" class="dijitAccordionContainer dijitContainer dijitLayoutContainer accordion dijitBorderContainer-child dijitBorderContainer-dijitAccordionContainer dijitBorderContainerPane dijitAlignCenter" role="tablist" data-dojo-type="dijit/layout/AccordionContainer"&gt;
&lt;DIV id="projectsPane_wrapper" class="dijitAccordionInnerContainer dijitAccordionInnerContainerSelected dijitSelected" role="presentation"&gt;
&lt;DIV class="dijitAccordionChildWrapper" role="tabpanel" aria-labelledby="projectsPane_button"&gt;
&lt;DIV id="projectsPane" class="dijitContentPane element dijitAccordionContainer-child dijitAccordionContainer-dijitContentPane" data-dojo-type="dijit/layout/ContentPane"&gt;
&lt;DIV id="projects.tree" class="dojoDndSource dojoDndTarget dojoDndContainer dijitTree" tabindex="0" role="tree" aria-multiselectable="true" aria-expanded="true"&gt;
&lt;DIV class="dijitTreeContainer" role="presentation" data-dojo-attach-point="containerNode"&gt;
&lt;DIV id="dijit__TreeNode_3514" class="dijitTreeIsRoot dijitTreeNode dijitTreeNodeLoaded dijitLoaded" role="presentation"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="editTabContentPane" class="dijitContentPane dijitAlignCenter dijitContentPaneSingleChild dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane" data-dojo-type="dijit/layout/ContentPane"&gt;
&lt;DIV id="tabsBC" class="tabs dijitBorderContainer dijitContainer sasStudioTabsParentContainer dijitLayoutContainer dojoDndSource dojoDndTarget dojoDndContainerOver"&gt;
&lt;DIV id="tabsBC_mainTabs" class="dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled sasStudioTabsTabContainer sasStudioTabsTabContainerVertical sasStudioTabsTop dijitBorderContainer-child dijitBorderContainer-dijitTabContainerTop dijitBorderContainerPane dijitAlignCenter"&gt;
&lt;DIV id="tabsBC_mainTabs_tablist" class="dijitTabListContainer-top dijitTabController dijitScrollingTabController tabStrip-disabled dijitAlignTop dijitLayoutContainer"&gt;
&lt;DIV id="tabsBC_mainTabs_tablist_menuBtn" class="dijitTabInnerDiv dijitTabContent dijitButtonContents dijitTab tabStripButton dijitbelow-altArrowButton tabStripButton-top dijitAlignRight" tabindex="-1" title="List of tabs" role="button" data-dojo-attach-event="ondijitclick:_onClick" data-dojo-attach-point="focusNode"&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
 Errors (1)
 ERROR: Libref PRODUCTS is not assigned.
 Warnings (1)
 Notes (2)
 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         proc corr data=Products.source fisher;
 ERROR: Libref PRODUCTS is not assigned.
 70         Where FSVV2 &amp;lt; 351.5724;
 WARNING: No data sets qualify for WHERE processing.
 71         var NCD17f1 NCD17f2 NCD17f3 NCD17f4 NCD17f5 PAMETs17ms AmbientPM17ms sex_ids;
 72         with NCD17ms;
 73         run;
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE CORR used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              409.68k
       OS Memory           36016.00k
       Timestamp           08/31/2021 02:00:00 AM
       Step Count                        366  Switch Count  0
       Page Faults                       0
       Page Reclaims                     16
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 73       !      quit;
 74         
 75         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 85         &lt;/CODE&gt;&lt;/PRE&gt;
Thanks for your help.&lt;/DIV&gt;
&lt;DIV id="tabsBC_mainTabs_tablist_leftBtn" class="dijitTabInnerDiv dijitTabContent dijitButtonContents tabStripButton-top dijitAlignLeft dijitTab tabStripButton" tabindex="-1" title="Previous tab" role="button" data-dojo-attach-event="ondijitclick:_onClick" data-dojo-attach-point="focusNode" aria-disabled="false"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tabsBC_mainTabs_tablist_rightBtn" class="dijitTabInnerDiv dijitTabContent dijitButtonContents tabStripButton-top dijitAlignRight dijitTab tabStripButton" tabindex="-1" title="Next tab" role="button" data-dojo-attach-event="ondijitclick:_onClick" data-dojo-attach-point="focusNode" aria-disabled="false"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="dijitTabListWrapper dijitTabContainerTopNone dijitAlignCenter" data-dojo-attach-point="tablistWrapper"&gt;
&lt;DIV class="nowrapTabStrip dijitTabContainerTop-tabs dojoDndHorizontal dojoDndSource dojoDndTarget dojoDndContainer" role="tablist" data-dojo-attach-event="onkeydown:onkeydown" data-dojo-attach-point="containerNode"&gt;
&lt;DIV id="dojoUnique10" class="dijitTabInner dijitTabContent dijitClosable dojoDndItem dijitTab" role="presentation" data-dojo-attach-point="titleNode,innerDiv,tabContent"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Aug 2021 02:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764977#M37377</guid>
      <dc:creator>dkcundiffMD</dc:creator>
      <dc:date>2021-08-31T02:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libref PRODUCTS is not assigned.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764978#M37378</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=Projects.source fisher;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Isn't that a typo for Projects, not Products?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 02:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764978#M37378</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-08-31T02:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libref PRODUCTS is not assigned.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764979#M37379</link>
      <description>Thank you so much. Good eye.</description>
      <pubDate>Tue, 31 Aug 2021 03:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/764979#M37379</guid>
      <dc:creator>dkcundiffMD</dc:creator>
      <dc:date>2021-08-31T03:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libref PRODUCTS is not assigned.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/765083#M37382</link>
      <description>&lt;P&gt;Caution: Habitual use of the same data set as source and output data set as in&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data Projects.source;
	set Projects.source;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;has potential to corrupt your data set and require rebuilding from scratch if you make a logic error as that use completely replaces the source data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 15:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Libref-PRODUCTS-is-not-assigned/m-p/765083#M37382</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-31T15:24:53Z</dc:date>
    </item>
  </channel>
</rss>

