SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
harmonic
Quartz | Level 8

Hello community,

 

I would like to know if there is any way to output the tables VIP and Predictors Coeff for these plots using Proc PLS on Viya 4.

harmonic_0-1734429469708.png

harmonic_1-1734429494103.png

 


For the first table I tried ods output VariableImportancePlot=vip but doesn't work, and for the second one I didn't find any comand.

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

The answer to your first question is here: https://communities.sas.com/t5/Statistical-Procedures/VIP-values-in-PLS/m-p/114388#M6021

 

Since you said you tried that command "but doesn't work", please provide more information about what you did (the full PROC PLS code), what happened and what you saw that indicated it didn't work. Please, in the future, do not ever say "but doesn't work" by itself without more explanation that I just asked for..

 

Regarding your second question, you have to output the regression coefficients to a SAS data set and plot from there. Please use the command

 

ods output parameterestimates=parms;

 

--
Paige Miller

View solution in original post

9 REPLIES 9
PaigeMiller
Diamond | Level 26

The answer to your first question is here: https://communities.sas.com/t5/Statistical-Procedures/VIP-values-in-PLS/m-p/114388#M6021

 

Since you said you tried that command "but doesn't work", please provide more information about what you did (the full PROC PLS code), what happened and what you saw that indicated it didn't work. Please, in the future, do not ever say "but doesn't work" by itself without more explanation that I just asked for..

 

Regarding your second question, you have to output the regression coefficients to a SAS data set and plot from there. Please use the command

 

ods output parameterestimates=parms;

 

--
Paige Miller
harmonic
Quartz | Level 8
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.
Patrick
Opal | Level 21

@harmonic wrote:
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.

Help us help you!

There must be a SAS log somewhere that should provide a bit more info. Please share this log and the code you've used. Ideally also share sample data in the form of a SAS data step that works with your code so we can replicate what you describe.

And last but not least also tell us the exact SAS version you're using. 

harmonic
Quartz | Level 8

@Patrick wrote:

@harmonic wrote:
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.

Help us help you!

There must be a SAS log somewhere that should provide a bit more info. Please share this log and the code you've used. Ideally also share sample data in the form of a SAS data step that works with your code so we can replicate what you describe.

And last but not least also tell us the exact SAS version you're using. 


	proc pls data=campione_full cv=one method=PLS(algorithm=SVD) cvtest(seed=17112003 stat=press nsamp=1000) CENSCALE details plot=(XYScores ParmProfiles VIP);
/* 		class &class_var.; */
		ods output XWeights=outsim.&versione_modello._&versione_simu._XWeights 
Weights=outsim.&versione_modello._&versione_simu._YWeights 
ParameterEstimates=outsim.&versione_modello._&versione_simu._Pest 
VariableImportancePlot=outsim.&versione_modello._&versione_simu._VarImp;
		model tgt_n_interferenze =	&num_var. / solution; 
		output out=outsim.&versione_modello._&versione_simu._pls_factors xscore=pls_factor_  yscore=yscore_  predicted=predict_1-predict_15 
								xresidual=xresid_1-xresid_15 yresidual=yresid_1-yresid_15
								STDX=STDX_1-STDX_15 STDY=STDY_1-STDY_15;
	run;

	ods pdf close;
	ods graphics off;

 

There are the available tables, I can't open pest 

harmonic_4-1734434844760.png

 

 

harmonic_3-1734434823732.png

 

NOTE: The data set OUTSIM.M08F_VS801A1_D01_VARIMP has 71 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_VARIMP increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_PEST has 72 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PEST increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS has 8 observations and 73 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.

 

 

 

PaigeMiller
Diamond | Level 26

@harmonic 

Show us the code! Show us the log!

--
Paige Miller
PaigeMiller
Diamond | Level 26

I don't see the log. You have to show us the full log for PROC PLS, from the top where PROC PLS appears in the log, down to the last NOTE after PROC PLS, every line in the log between PROC PLS and the last NOTE. Screen captures are not preferred; copy the log as text and paste it into the window that appears when you click on the </> icon.

--
Paige Miller
harmonic
Quartz | Level 8

This is the log, It creates the table Pest, but I can't open it. I use just the data. I think I can bypass that but I do not understand why I got that error when I try to open it.

NOTE: The data set OUTSIM.M08F_VS801A1_D01_PEST has 61 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PEST increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.

PaigeMiller
Diamond | Level 26

The error you posted above looks like you are not trying to open the same data set. PROC PLS created OUTSIM.M08F_VS801A1_D01_PEST but your error message shows you are trying to open _TEMP16.M08F_VS801A1_D01_PEST.

 

We're trying to help you, but you have to help us as well. From now on, when we request the log, we want the log provided as we requested, which is not as a file attachment, but as stated above "copy the log as text and paste it into the window that appears when you click on the </> icon". We don't want hundreds of lines of the log before PROC PLS, we want the log between the line that says PROC PLS and the last line of the log for PROC PLS which is the NOTEs after the PROC PLS code.

--
Paige Miller
harmonic
Quartz | Level 8

@PaigeMiller wrote:

The error you posted above looks like you are not trying to open the same data set. PROC PLS created OUTSIM.M08F_VS801A1_D01_PEST but your error message shows you are trying to open _TEMP16.M08F_VS801A1_D01_PEST.

 

We're trying to help you, but you have to help us as well. From now on, when we request the log, we want the log provided as we requested, which is not as a file attachment, but as stated above "copy the log as text and paste it into the window that appears when you click on the </> icon". We don't want hundreds of lines of the log before PROC PLS, we want the log between the line that says PROC PLS and the last line of the log for PROC PLS which is the NOTEs after the PROC PLS code.


1    /* region: SAS session initialization */
2    /*----------------------------------------------------------------------
3    /
4    / SASStudio initialization file for SAS
5    /
6    *----------------------------------------------------------------------*/
7    /* Get the Git version */
8    DATA _NULL_;
9      GITVERSION = GIT_VERSION();
10     CALL SYMPUT('_GITVERSION', GITVERSION);
11   RUN;

NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
      10:30   
NOTE: Libgit2 version 1.3.0
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

12   
13   
14   %MACRO resolveHomeDirectory;
15   	%GLOBAL _USERHOME;
16   	%LOCAL _HOMEVAR;
17   
2                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

18   	%IF (&SYSSCP=WIN) %THEN
19   		%DO;
20   			%LET _HOMEVAR=USERPROFILE;
21   		%END;
22   	%ELSE
23   		%DO;
24   			%LET _HOMEVAR=HOME;
25   		%END;
26   
27   	%LET _USERHOME= %SYSFUNC(SYSGET(&_HOMEVAR));
28   
29   %MEND;
30   
31   %resolveHomeDirectory;
32   
33   %macro web_open_file(name,type);
34   %global _DATAOUT_NAME;
35   %global _DATAOUT_MIME_TYPE;
36   %let _DATAOUT_NAME=&name;
37   %let _DATAOUT_MIME_TYPE=&type;
38   %mend;
39   
40   %macro web_open_table(table);
41   %global _DATAOUT_TABLE;
42   %if %length(&_dataout_table)=0 %then %let _DATAOUT_TABLE=&table;
43   %else %let _DATAOUT_TABLE=&_DATAOUT_TABLE,&table;
44   %mend;
45   
46   %macro web_open_url(url);
47   %global _DATAOUT_URL;
48   %let _DATAOUT_URL=&url;
49   %mend;
50   
51   %macro sgdesign();
52   %put ERROR: SGDesigner macro can not be invoked from SAS Studio.;
53   %mend;
54   
55   %macro sgedit();
56   %put ERROR: SGEdit macro can not be invoked from SAS Studio.;
57   %mend;
58   
59   %macro web_list_entries(catalog,type);
60   
61   %let typearg=;
62   %let type=%upcase(&type);
63   %if &type^=_ALL_ and &type^=_all_ %then %let typearg= entrytype=&type;
64   
65   proc catalog catalog=&catalog &typearg;
66   contents;
67   title "Catalog Entries in &catalog";
68   run;
69   quit;
70   
71   %mend;
72   
73   %macro web_list_catalogs(library);
74       %let library=%upcase(&library);
75       proc sql ;
3                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

76           create table work.catalogs as select memname as Catalog, memtype as
77               Type, engine as Engine from sashelp.vmember where
78               libname="&library" and memtype="CATALOG";
79           run;
80           quit;
81           title "Catalogs in &library";
82   
83       proc print data=work.catalogs;
84       run;
85   %mend;
86   
87   %macro web_replay_grseg(catalog,entry);
88   proc greplay nofs igout=&catalog;
89   replay &entry;
90   run;
91   %mend;
92   
93   %macro sasstudio_get_zos_ds_info(DSN);
94   
95   OPTIONS FILESYSTEM=MVS;
96   
97   DATA work._sasstudio_dataset_info_;
98   
99     LENGTH XDSN $32000;
100    XDSN=ZDSLIST('CATLG', &DSN, XVOLS, '');
101  
102    LENGTH XNUM 8;
103    XNUM=ZDSNUM(XDSN);
104    LENGTH XIDNM $4096;
105    LENGTH XATTR $4096;
106    LENGTH XATTRC $72;
107    LENGTH XATTRN 8;
108    LENGTH attributeType $10;
109  
110    DO I=1 to XNUM;
111      XIDNM=ZDSIDNM(XDSN, I);
112      XATTR=ZDSATTR(XIDNM, 'ALL');
113      XATTRN=ZDSXATT(XATTR);
114  
115      do j=1 to xattrn;
116       XATTRC=ZDSYATT(XATTR, j);
117       blank_pos = index(xattrc," ");
118             key = substr(xattrc, blank_pos,99);
119             val= substr(xattrc,1,blank_pos);
120             pos = index(key, 'FILE ATTRIBUTES');
121             if (pos > 0) then do;
122                attributeType = 'FILE';
123             end;
124             else do;
125                 pos = index(key, 'VOLUME ATTRIBUTES');
126                 if (pos > 0) then do;
127                    attributeType = 'VOLUME';
128                 end;
129                 else do;
130                     pos = index(key, 'MIGRATED DATA SET ATTRIBUTES');
131                     if (pos > 0) then do;
132                        attributeType = 'MIGRATED';
133                     end;
4                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

134                     else do;
135                        pos = index(key, '*****');
136                     end;
137                 end;
138             end;
139             if (pos = 0) then do;
140                output;
141             end;
142             keep key val attributeType;
143      end;
144    END;
145   RUN;
146  %mend sasstudio_get_zos_ds_info;
147  
148  %macro show_zos_dataset_attributes(dsn);
149     %sasstudio_get_zos_ds_info(&dsn);
150  
151     data work._sasstudio_dataset_info_ds_;
152         set work._sasstudio_dataset_info_;
153  
154         if strip(val)='.' then do;
155             val='***NONE***';
156         end;
157  
158         position = index(attributeType, 'FILE');
159         if position > 0 then do;
160             output;
161         end;
162         drop position attributeType;
163     run;
164  
165     data work._sasstudio_dataset_info_vol_;
166         set work._sasstudio_dataset_info_;
167  
168         if strip(val)='.' then do;
169             val='***NONE***';
170         end;
171  
172         position = index(attributeType, 'VOLUME');
173         if position > 0 then do;
174             output;
175         end;
176         drop position attributeType;
177     run;
178  
179      proc print data=work._sasstudio_dataset_info_ds_ noobs label;
180      LABEL key='Dataset Attribute'  val='00'x;
181         title1 &dsn;
182      run;
183  
184      proc print data=work._sasstudio_dataset_info_vol_ noobs label;
185          title1;
186          LABEL key='Volume Attribute'  val='00'x;
187      run;
188  
189      proc delete data=work._sasstudio_dataset_info_
190      work._sasstudio_dataset_info_ds_
191      work._sasstudio_dataset_info_vol_;
5                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

192  
193  %mend;
194  
195  %macro validCasEnvironment( sessionName=, createSession=, returnCode=RC);
196  
197  /* This section is just to give information about the CAS connection */
198  %let CASHOST = %SYSFUNC(GETOPTION(CASHOST));
199  
200  %if (%LENGTH(&CASHOST)=0) %then %do;
201      %put CASHOST is not set;
202  %end; %else %do;
203      %put CASHOST is &CASHOST;
204  %end;
205  
206  %let CASPORT = %SYSFUNC(GETOPTION(CASPORT));
207  
208  %if (&CASPORT=0) %then %do;
209      %put CASPORT is not set;
210  %end; %else %do;
211      %put CASPORT is &CASPORT;
212  %end;
213  
214  %let CASHOST = %SYSFUNC(GETOPTION(_CASHOST_));
215  %if (%LENGTH(&CASHOST)=0) %then %do;
216      %put _CASHOST_ is not set;
217  %end; %else %do;
218      %put _CASHOST_ is &CASHOST;
219  %end;
220  
221  %let CASPORT = %SYSFUNC(GETOPTION(_CASPORT_));
222  
223  %if (%LENGTH(&CASPORT)=0) %then %do;
224      %put _CASPORT_ is not set;
225  %end; %else %do;
226      %put _CASPORT_ is &CASPORT;
227  %end;
228  
229  %let CASUSER = %SYSFUNC(GETOPTION(CASUSER));
230  
231  %if (%LENGTH(&CASUSER) = 0) %then %do;
232      %put CASUSER is not set;
233  %end; %else %do;
234      %put CASUSER is &CASUSER;
235  %end;
236  
237  
238  %if &sessionName = %then %do;
239      %let DEFAULTSESS= %SYSFUNC(GETOPTION(SESSREF));
240      %let SESSIONFOUND = %SYSFUNC(SESSFOUND(&DEFAULTSESS));
241      %if (&SESSIONFOUND = 0) %then %do;
242         %put Default session &DEFAULTSESS is not available.;
243         %let &returnCode=0;
244      %end;
245      %else %do;
246         %put Default session &DEFAULTSESS is available.;
247         %let &returnCode=3;
248      %end;
249  %end; %else %do;                                                /* Session name was specified */
6                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

250      %if &createSession = %then %do;                             /* createSession not specified */
251         %let SESSIONFOUND = %SYSFUNC(SESSFOUND(&sessionName));   /* Default to false (don't create) */
252         %if (&SESSIONFOUND = 0) %then %do;
253            %put Session &sessionName is not available.;
254            %let &returnCode=0;
255         %end;
256         %else %do;
257            %put Session &sessionName already exists.;
258            %let &returnCode=2;
259         %end;
260      %end;
261      %else %do;
262         %let SESSIONFOUND = %SYSFUNC(SESSFOUND(&sessionName));  /* Does session already exist? */
263         %if (&createSession = false) %then %do;                 /* User does not want to create it. */
264            %put createSession is false;
265            %if (&SESSIONFOUND = 0) %then %do;
266               %put Session &sessionName is not available.;      /* Tell user it does not exist. */
267               %let &returnCode=0;
268            %end;
269            %else %do;
270               %put Session &sessionName exists;
271               %let &returnCode = 2;
272            %end;
273         %end;
274         %else %do;
275           %put createSession is true;
276           %if (&SESSIONFOUND = 0) %then %do;                    /* Session does not exist, so create it */
277               cas &sessionName;
278               %let SESSIONFOUND = %SYSFUNC(SESSFOUND(&sessionName));
279               %if (&SESSIONFOUND = 0) %then %do;               /* Session created successfully */
280                   %let &returnCode=1;
281               %end;
282               %else %do;
283                   %let &returnCode=4;                          /* Session creation failed. */
284               %end;
285           %end;
286           %else %do;                                           /* Session already exists, so user cannot create it */
287               %put Session &sessionName already exists;
288               %let &returnCode=2;
289           %end;
290         %end;
291      %end;
292  %end;
293  
294  
295  %mend validCasEnvironment;
296  
297  /* This macro is used by code generated for Query nodes in an EG Process flow *
298  /* Conditionally delete set of tables or views, if they exists          */
299  /* If the member does not exist, then no action is performed   */
300  %macro _eg_conditional_dropds /parmbuff;
301  
302      %local num;
303      %local stepneeded;
304      %local stepstarted;
305      %local dsname;
306      %local name;
307  
7                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

308      %let num=1;
309      /* flags to determine whether a PROC SQL step is needed */
310      /* or even started yet                                  */
311      %let stepneeded=0;
312      %let stepstarted=0;
313      %let dsname= %qscan(&syspbuff,&num,',()');
314      %do %while(&dsname ne);
315          %let name = %sysfunc(left(&dsname));
316          %if %qsysfunc(exist(&name)) %then %do;
317              %let stepneeded=1;
318              %if (&stepstarted eq 0) %then %do;
319                  proc sql;
320                  %let stepstarted=1;
321  
322              %end;
323                  drop table &name;
324          %end;
325  
326          %if %sysfunc(exist(&name,view)) %then %do;
327              %let stepneeded=1;
328              %if (&stepstarted eq 0) %then %do;
329                  proc sql;
330                  %let stepstarted=1;
331              %end;
332                  drop view &name;
333          %end;
334          %let num=%eval(&num+1);
335          %let dsname=%qscan(&syspbuff,&num,',()');
336      %end;
337      %if &stepstarted %then %do;
338          quit;
339      %end;
340  %mend _eg_conditional_dropds;
341  
342  /* Given a fileref and a memname and memtype, we attempt to open the
343  member of the directory (catalog or file system directory). We
344  set &member_found to 1 if it can be opened, 0 if not. */
345  %macro _entry_exists(fileref,memname,memtype);
346  %global _macro_found;
347  %let _macro_found = 0;
348  data _null_;
349  *-----open the directory and proceed if it can be opened-----*;
350  handle = dopen("&fileref.");
351  if handle ne 0;
352  *-----open the member and set the macro variable based on result-----*;
353  mem_handle = mopen(handle,"&memname..&memtype.",'i');
354  call symputx('_macro_found',mem_handle ne 0);
355  *-----close the member if it were opened successfully-----*;
356  if mem_handle then rc = fclose(mem_handle);
357  *-----close the directory-----*;
358  rc = dclose(handle);
359  run;
360  %mend _entry_exists;
361  
362  /* Given a macro name, we determine if it has already been
363  compiled. We first look in work.sasmacr, then in the sasmacr
364  referenced by sasmstore (if given) and then in work.sasmacX. */
365  %macro _compiled_macro_exists(macro_name);
8                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

366  options nonotes;
367  %global _macro_found;
368  *-----try work.sasmacr first to see if the compiled macro is there-----*;
369  filename maclib catalog "work.sasmacr";
370  %_entry_exists(maclib,&macro_name.,macro);
371  filename maclib clear;
372  %if &_macro_found %then %goto done;
373  *-----try sasmacr referenced by sasmstore if it were specified-----*;
374  %let sasmstore_option = %sysfunc(getoption(sasmstore));
375  %if %sysfunc(getoption(mstored))=MSTORED and %length(&sasmstore_option) > 0 %then %do;
376  filename maclib catalog "&sasmstore_option..sasmacr";
377  %_entry_exists(maclib,&macro_name.,macro);
378  %end;
379  
380  %do i=1 %to 9;
381  %if &_macro_found %then %goto done;
382  filename maclib catalog "work.sasmac&i.";
383  %_entry_exists(maclib,&macro_name.,macro);
384  filename maclib clear;
385  %end;
386  
387  %done: options notes;
388  %mend _compiled_macro_exists;
389  
390  %macro studio_cas_start;
391  
392  %global _macro_found;
393  %global syscasinit;
394  
395  %let syscasinit=0;
396  
397  %_compiled_macro_exists(studio_cas_init);
398  
399  %if &_macro_found %then %do;
400  
401  %let syscasinit=1;
402  
403  %studio_cas_init;
404  
405  %end;
406  %mend studio_cas_start;
407  
408  %macro studio_hide_wrapper;
409      %global _studionotes;
410      %global _studiosource;
411      %global _studiostimer;
412  
413      %if &_studionotes = %then %do;
414          %let _studionotes=%sysfunc(getoption(notes));
415      %end;
416      options nonotes;
417  
418      %if &_studiosource = %then %do;
419          %let _studiosource=%sysfunc(getoption(source));
420      %end;
421      options nosource;
422  
423      %if &_studiostimer = %then %do;
9                                                          The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

424          %let _studiostimer=%sysfunc(getoption(stimer));
425      %end;
426      options nostimer;
427  %mend studio_hide_wrapper;
428  
429  %macro studio_show_wrapper;
430      %global _studionotes;
431      %global _studiosource;
432      %global _studiostimer;
433  
434      %if &_studionotes = %then %do;
435          %let _studionotes=%sysfunc(getoption(notes));
436      %end;
437      options notes;
438  
439      %if &_studiosource = %then %do;
440          %let _studiosource=%sysfunc(getoption(source));
441      %end;
442      options source;
443  
444      %if &_studiostimer = %then %do;
445          %let _studiostimer=%sysfunc(getoption(stimer));
446      %end;
447      options stimer;
448  %mend studio_show_wrapper;
449  
450  %macro studio_show_only_notes_wrapper;
451      %global _studionotes;
452      %global _studiosource;
453      %global _studiostimer;
454  
455      %if &_studionotes = %then %do;
456          %let _studionotes=%sysfunc(getoption(notes));
457      %end;
458      options notes;
459  
460      %if &_studiosource = %then %do;
461          %let _studiosource=%sysfunc(getoption(source));
462      %end;
463      options nosource;
464  
465      %if &_studiostimer = %then %do;
466          %let _studiostimer=%sysfunc(getoption(stimer));
467      %end;
468      options nostimer;
469  %mend studio_show_only_notes_wrapper;
470  
471  
472  %macro studio_restore_wrapper;
473      %global _studionotes;
474      %global _studiosource;
475      %global _studiostimer;
476  
477      options &_studionotes;
478      options &_studiosource;
479      options &_studiostimer;
480  
481      /* Clear out values so we know they have been restored */
10                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

482      %let _studionotes=;
483      %let _studiosource=;
484      %let _studiostimer=;
485  %mend studio_restore_wrapper;
486  
487  %macro studio_setup_locale(requestedLocale);
488      %let validlocale=%SYSFUNC(getpxlocale(&requestedlocale));
489      %let validlocale=%trim(&validlocale);
490  
491      %if %length(&validlocale) > 0 %then
492          %do;
493              options locale=&validlocale DFLANG=LOCALE;
494          %end;
495      %else
496          %do;
497              options locale=en_US DFLANG=LOCALE;
498          %end;
499  %mend;
500  
501  /* This macro initializes a base results path for a submission, and sets up a
502     macro variable to access it. */
503  %macro studio_results_directory;
504      %global _results_prefix_;
505      %let _results_prefix_=!COMPUTESERVER_TMP_PATH/results-&SYS_COMPUTE_JOB_ID;
506  %mend;
507  
508  /*
509  This macro initializes the filename and type for any custom output created.
510  */
511  %macro studio_initialize_custom_output;
512      %global _dataout_name _dataout_mime_type;
513      %let _dataout_name=;
514      %let _dataout_mime_type=;
515  %mend;
516  
517  /*
518  This macro captures the filename and type for any custom output created.
519  */
520  %macro studio_capture_custom_output;
521      %if "&_dataout_name" ne "" and "&_dataout_mime_type" ne "" %then
522          %do;
523              filename _datname "!COMPUTESERVER_TMP_PATH/results-&SYS_COMPUTE_JOB_ID..datname";
524              filename _dattype "!COMPUTESERVER_TMP_PATH/results-&SYS_COMPUTE_JOB_ID..dattype";
525  
526              data _null_;
527                  file _datname;
528                  put "&_dataout_name";
529              run;
530  
531              data _null_;
532                  file _dattype;
533                  put "&_dataout_mime_type";
534              run;
535          %end;
536  %mend;
537  
538  /*
539  This macro captures a log for a background job to the specified destination
11                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

540  alongside any HTML results.
541  */
542  %macro studio_capture_background_log;
543  
544      /*
545      Capture original value for syntaxcheck, and set it to nosyntaxcheck so we
546      can capture the log even if there are errors above
547      */
548      %let _studiosyntaxcheck=%sysfunc(getoption(syntaxcheck));
549      options nosyntaxcheck;
550  
551      /*
552      Get base URL for compute, and download the log to the _logout fileref.
553      */
554      %let _url_template=%sysget(SAS_URL_SERVICE_TEMPLATE);
555      %let _url_base=%sysfunc(tranwrd(&_url_template,@k8s.service.name@,sas-compute));
556      proc http
557          url="&_url_base./compute/sessions/&SYS_COMPUTE_SESSION_ID/jobs/&SYS_COMPUTE_JOB_ID/log"
558          oauth_bearer = sas_services
559          method='get'
560          out=_logout;
561      headers 'accept'='text/plain';
562      quit;
563  
564      /*
565      Restore the original value for syntaxcheck.
566      */
567      options &_studiosyntaxcheck;
568  %mend;
569  
570  DATA _NULL_;
571  	ID=SYMGET("SYSUSERID");
572  	CALL SYMPUT("SYSUSERNAME",ID);
573  	RC=TSLVL('UWUUSERN','N');
574  	_ERROR_=0;
575  	IF (RC^=' ') THEN DO;
576  		call execute("DATA _NULL_;NAME=USERNAME();CALL SYMPUT('SYSUSERNAME',NAME);RUN;");
577  	END;
578  RUN;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

NOTE: CALL EXECUTE generated line.
1   + DATA _NULL_;NAME=USERNAME();CALL SYMPUT('SYSUSERNAME',NAME);RUN;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

579  
580  OPTIONS TIMEZONE='GMT+01:00';
581  %studio_setup_locale(en-US);
582  OPTIONS VALIDVARNAME=ANY VALIDMEMNAME=EXTEND;
583  /* endregion */
12                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

584  
585  /* region: SAS Studio autoexec */
586  /*%let server = MB;*/
587  %let server = MV;
588  
589  option mprint compress=yes;
590  options timezone='UTC-1';
591  
592  filename dbcon FILESRVC folderpath="/SNM/&server./MODELLI_E_JOB/shared"  filename="db_connections.sas";
593  %include dbcon;
MPRINT(DB_CONNECTIONS):   proc sql noprint;
MPRINT(DB_CONNECTIONS):   select 'Y' into :trovato from sashelp.library where libref='WEBDISP';
NOTE: No rows were selected.
MPRINT(DB_CONNECTIONS):   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

MPRINT(DB_CONNECTIONS):   filename keyvltc filesrvc folderPath = '/SNM/MV/MODELLI_E_JOB/shared/';
NOTE: %INCLUDE (level 2) file KEYVLTC(keyvault_connection.sas) is file keyvault_connection.sas.
691 +/******************************************************
692 +KeyVault Preprod
693 +AZURE_CLIENT_ID = 'cc544065-dab6-4c4a-8ff4-97999c638412'
694 +AZURE_CLIENT_SECRET = 'JRF8Q~XYzf4yXwPEXDGQjUzAEW.ccGBwJ~aPFcmS'
695 +AZURE_TENANT_ID = '19646c18-1578-452e-b5fb-8504eb919aaa'
696 +KVUri= 'https://snrec00048-key.vault.azure.net'
697 +******************************************************/
698 +
699 +%global secname secpwd;
700 +
701 +%let secname=.;
702 +%let secpwd=.;
703 +
704 +proc python;
MPRINT(DB_CONNECTIONS):   proc python;
705 +submit
MPRINT(DB_CONNECTIONS):   submit;
NOTE: Python initialized.
Python 3.9.16 (main, Jan 19 2024, 19:26:49) 
[GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
705!+      ;
706 +
707 +from azure.identity import DefaultAzureCredential
708 +from azure.keyvault.secrets import SecretClient
709 +import os
710 +import time
711 +
712 +secretName='sas-user'
713 +secretPwd='sas-psw'
714 +
715 +def getKWdbl(secretName,secretPwd):
716 +	N_MAX_RETRY=5
717 +	TIME_SLEEP=1
718 +	EXP_FACTOR=2
719 +
13                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

720 +	os.environ['AZURE_CLIENT_ID'] = '1fef8cc1-92cf-457b-96d5-4f90e375dedb'
721 +	os.environ['AZURE_CLIENT_SECRET'] = 'b1a8Q~ryzTMiNYZCy28uoOkS1TkTNfHm947GqdlC'
722 +	os.environ['AZURE_TENANT_ID'] = '19646c18-1578-452e-b5fb-8504eb919aaa'
723 +	KVUri = 'https://snreb00054-key.vault.azure.net'
724 +	AzureClientId = os.environ["AZURE_CLIENT_ID"]
725 +	print("AzureClientId = " + AzureClientId)
726 +	credential =  DefaultAzureCredential(managed_identity_client_id = AzureClientId,
727 +	                                            additionally_allowed_tenants=["*"])
728 +	for n in range(N_MAX_RETRY):
729 +		try:
730 +			client = SecretClient(KVUri, credential)
731 +			retrieved_secret = client.get_secret(secretName)
732 +			secret_bundle = client.get_secret(secretName)
733 +			print("secret user = " + secret_bundle.value)
734 +			valueUSR=str(secret_bundle.value)
735 +			SAS.symput('secname', valueUSR )
736 +			secret_bundle = client.get_secret(secretPwd)
737 +			print("password = " +secret_bundle.value)
738 +			valueUSR=str(secret_bundle.value)
739 +			SAS.symput('secpwd', valueUSR)
740 +		except Exception as e:
741 +			print(f"Error: {e}")
742 +			TIME_SLEEP = TIME_SLEEP * EXP_FACTOR
743 +			print(f"... Trying to reconnet to Remote Vault {KVUri} in the next {TIME_SLEEP} seconds")
744 +			time.sleep(TIME_SLEEP)
745 +		else:
746 +			print("Connection successfully.. retrieved secret user and pwd")			
747 +			break
748 +
749 +getKWdbl(secretName,secretPwd)
750 +endsubmit;
751 +run;
MPRINT(DB_CONNECTIONS):   run;

>>>
AzureClientId = 1fef8cc1-92cf-457b-96d5-4f90e375dedb
secret user = ut-2034-sas-p-01
password = D6Ueh6v5W0pP2fgAyfJW
Connection successfully.. retrieved secret user and pwd
>>> 
NOTE: PROCEDURE PYTHON used (Total process time):
      real time           4.24 seconds
      cpu time            0.01 seconds
      

MPRINT(DB_CONNECTIONS):   quit;
752 +
753 +quit;
NOTE: %INCLUDE (level 2) ending.
NOTE: %INCLUDE (level 1) resuming.
SECNAME=ut-2034-sas-p-01
SECPWD=D6Ueh6v5W0pP2fgAyfJW
MPRINT(DB_CONNECTIONS):   libname webdisp odbc datasrc='SQLSRV_PROD' user="ut-2034-sas-p-01" password="D6Ueh6v5W0pP2fgAyfJW" 
schema="sasviya_exposure";
NOTE: Libref WEBDISP was successfully assigned as follows: 
      Engine:        ODBC 
      Physical Name: SQLSRV_PROD
0
14                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

MPRINT(DB_CONNECTIONS):   libname ORALPBP2 odbc datasrc='SQLSRV_PROD' user="ut-2034-sas-p-01" password="D6Ueh6v5W0pP2fgAyfJW" 
schema="sasviya_exposure";
NOTE: Libref ORALPBP2 was successfully assigned as follows: 
      Engine:        ODBC 
      Physical Name: SQLSRV_PROD
0
MPRINT(DB_CONNECTIONS):   libname backup odbc datasrc='SQLSRV_PROD' user="ut-2034-sas-p-01" password="D6Ueh6v5W0pP2fgAyfJW" 
schema="output" insertbuff=20000;
NOTE: Libref BACKUP was successfully assigned as follows: 
      Engine:        ODBC 
      Physical Name: SQLSRV_PROD
0
MPRINT(DB_CONNECTIONS):   libname bus_rep odbc datasrc='SQLSRV_PROD' user="ut-2034-sas-p-01" password="D6Ueh6v5W0pP2fgAyfJW" 
schema="output" insertbuff=20000;
NOTE: Libref BUS_REP was successfully assigned as follows: 
      Engine:        ODBC 
      Physical Name: SQLSRV_PROD
0
754   
755   libname for_svil "/snm/projects/&server./for_svil";
NOTE: Libref FOR_SVIL was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/for_svil
756   
757   libname stlin    "/snm/projects/&server./settlement/prod/data/stlin";
NOTE: Libref STLIN was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/settlement/prod/data/stlin
758   libname stlmd    "/snm/projects/&server./settlement/prod/data/stlmd";
NOTE: Libref STLMD was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/settlement/prod/data/stlmd
759   libname stlmdcas "/snm/projects/&server./settlement/prod/data/stlmdcas";
NOTE: Libref STLMDCAS was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/settlement/prod/data/stlmdcas
760   libname stlmi    "/snm/projects/&server./settlement/prod/data/stlmi";
NOTE: Libref STLMI was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/settlement/prod/data/stlmi
761   libname stlou    "/snm/projects/&server./settlement/prod/data/stlou";
NOTE: Libref STLOU was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MV/settlement/prod/data/stlou
762   
763   /* MB
764   option cashost='sas-cas-server-default-client' casport=5570 ;
765   */
766   
767   /* MV
768   option cashost='sas-cas-server-shared-validation-client' casport=5570 ;
769   /*
770   
771   /* CAS
772   options casdatalimit=ALL;
773   cas myses sessopts=(caslib=casuser timeout=1800 locale="en_US");
774   caslib _all_ assign;
775   */
15                                                         The SAS System                     Tuesday, December 17, 2024 02:23:00 PM

776   
777   
778   
779   /* endregion */
780   
781   /* region: Generated preamble */
782   /* Make sure the current directory is writable */
783   data _null_;
784       length rc 4;
785       %let tworkloc="%sysfunc(getoption(work))";
786       rc=dlgcdir(&tworkloc);
787   run;

NOTE: The current working directory is now 
      "/data/saswork/SAS_work7C7F00000181_sas-compute-server-3a81016d-54c3-4a2a-ae77-5ae332b61ca9-tqht4".
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

788   
789   /* Setup options */
790   title;
791   footnote;
792   options validvarname=any;
793   options validmemname=extend;
794   options dtreset date number;
795   options device=png;
796   
797   /* Setup macro variables */
798   %let syscc=0;
799   %let _clientapp = %nrquote(%nrstr(SAS Studio));
800   %let _clientappabbrev = %nrquote(%nrstr(Studio));
801   %let _clientappversion=2024.03;
802   %let _clientversion=;
803   %let _sasservername=&SYSHOSTNAME;
804   %let _sashostname=&SYSHOSTNAME;
805   %let _sasprogramfilehost=&SYSHOSTNAME;
806   %let _clientuserid = %nrquote(%nrstr(snm0mxf));
807   %let _clientusername = %nrquote(%nrstr(Monica Fontana));
808   %let clientmachine = %nrquote(%nrstr());
809   %let _clientmachine = %nrquote(%nrstr());
810   %let _clientmode = %nrquote(%nrstr(viya));
811   %let sasworklocation="%sysfunc(getoption(work))/";
812   filename _cwd &sasworklocation;
813   data _null_;
814       call symput('_sasworkingdir',pathname('_cwd'));
815   run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

816   filename _cwd;
NOTE: Fileref _CWD has been deassigned.
817   %let _sasprogramfile = %nrquote(%nrstr(/files/files/aa6ef4f1-8bf4-4368-b4d1-d7632a6afae9));
818   %let _baseurl = %nrquote(%nrstr(https://snamprodmp.ondemand.sas.com/SASStudio/));
16                                                         The SAS System                     Tuesday, December 17, 2024 03:23:45 PM

819   %let _execenv = %nrquote(%nrstr(SASStudio));
820   %symdel _dataout_mime_type _dataout_name _dataout_url _dataout_table / nowarn;
821   %let _sasws_ = %bquote(%sysfunc(getoption(work)));
822   %let _saswstemp_ = %bquote(%sysfunc(getoption(work)));
823   
824   /* Detect SAS/Graph and setup graph options */
825   data _null_;
826       length rc $255;
827       call symput("graphinit","");
828       call symput("graphterm","");
829       rc=tslvl('sasxgopt','n');
830       _error_=0;
831       if (rc^=' ') then do;
832           call symput("graphinit","goptions reset=all gsfname=_gsfname;");
833           call symput("graphterm","goptions noaccessible;");
834       end;
835   run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

836   data _null_;
837       length rc 4;
838       rc=sysprod("PRODNUM002");
839       if (rc^=1) then do;
840           call symput("graphinit","");
841           call symput("graphterm","");
842       end;
843   run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

844   
845   /* Setup ODS destinations */
846   ods _all_ close;
847   %studio_results_directory;
848   filename _htmlout filesrvc folderuri='/folders/folders/a98d0d50-128f-4436-b235-3ef56fe0afdf'
848 ! filename='00_vs801a1_d01_v06.html';
849   filename _gsfname temp;
850   filename _dataout "&_results_prefix_..dat";
851   ods autonavigate off;
852   ods graphics on;
853   ods html5 (id=web) METATEXT='http-equiv="Content-Security-Policy" content="default-src ''none''; style-src ''unsafe-inline'';
853 ! img-src data: ;"' device=png gpath="&_saswstemp_" path="&_saswstemp_" encoding=utf8 file=_htmlout
853 ! (title='Results:00_vs801a1_d01_v06.sas') style=Illuminate options(bitmap_mode='inline' outline='on' svg_mode='inline'
853 ! css_prefix=".ods_&SYS_COMPUTE_JOB_ID" body_id="div_&SYS_COMPUTE_JOB_ID" );
NOTE: Writing HTML5(WEB) Body file: _HTMLOUT
854   &graphinit;
855   filename _logout filesrvc folderuri='/folders/folders/a98d0d50-128f-4436-b235-3ef56fe0afdf' filename='00_vs801a1_d01_v06.log';
856   %studio_show_only_notes_wrapper;
MPRINT(STUDIO_SHOW_ONLY_NOTES_WRAPPER):   options notes;
MPRINT(STUDIO_SHOW_ONLY_NOTES_WRAPPER):   options nosource;
MPRINT(STUDIO_SHOW_ONLY_NOTES_WRAPPER):   options nostimer;
17                                                         The SAS System                     Tuesday, December 17, 2024 03:23:46 PM

NOTE: ODS statements in the SAS Studio environment may disable some output features.
MPRINT(STUDIO_RESTORE_WRAPPER):   options NOTES;
MPRINT(STUDIO_RESTORE_WRAPPER):   options SOURCE;
MPRINT(STUDIO_RESTORE_WRAPPER):   options STIMER;
859   /* endregion */
860   
861   
862   options validvarname=v7;
863   %let versione_modello = m08f;
864   %let distretto= d01;
865   %let versold= vs801;
866   %let versione = vs801a1;
867   %let versione_simu = &versione._&distretto.;
868   /* commentare location se si usa server privato */
869   %let location= snam;
870   %let simulazioneold = s002;
871   %let simulazione = s003;
872   %let ds_input = outsas.gasdotti_input_&versione_simu.;
873   %let sisver=V.04.00;
874   
875   %put &versold;
vs801
876   %put &=versione;
VERSIONE=vs801a1
877   %put &=versione_modello;
VERSIONE_MODELLO=m08f
878   %put &=versione_simu;
VERSIONE_SIMU=vs801a1_d01
879   %put &=distretto;
DISTRETTO=d01
880   %put &=location;
LOCATION=snam
881   %put &=sisver;
SISVER=V.04.00
882   
883   
884   /* V.03.05 */
885   %if &sisver = V.04.00 AND &location.=snam %then %do;
886   	%let prj_path = /snm/projects/MB/bip/intcomm/&versione_modello.;
887   	%let log_path = /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/03-simulazioni/fp/&simulazione.;
888   	options casdatalimit=ALL;
889   	cas mysession sessopts=(caslib=casuser timeout=36000);
NOTE: The session MYSESSION connected successfully to Cloud Analytic Services sas-cas-server-default-client using port 5570. The 
      UUID is 581cb1ea-0c88-b442-b89e-546ee4694ca9. The user is snm0mxf and the active caslib is CASUSER(snm0mxf).
NOTE: The SAS option SESSREF was updated with the value MYSESSION.
NOTE: The SAS macro _SESSREF_ was updated with the value MYSESSION.
NOTE: The session is using 0 workers.
NOTE: 'CASUSER(snm0mxf)' is now the active caslib.
NOTE: The CAS statement request to update one or more session options for session MYSESSION completed.
890   	caslib _all_ assign;
NOTE: A SAS Library associated with a caslib can only reference library member names that conform to SAS Library naming conventions.
NOTE: CASLIB CASUSER(snm0mxf) for session MYSESSION will be mapped to SAS Library CASUSER.
NOTE: CASLIB CASVIL for session MYSESSION will be mapped to SAS Library CASVIL.
NOTE: CASLIB Formats for session MYSESSION will be mapped to SAS Library FORMATS.
NOTE: CASLIB ModelPerformanceData for session MYSESSION will not be mapped to SAS Library ModelPerformanceData. The CASLIB name is 
      not valid for use as a libref.
NOTE: CASLIB Models for session MYSESSION will be mapped to SAS Library MODELS.
NOTE: CASLIB Public for session MYSESSION will be mapped to SAS Library PUBLIC.
18                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

NOTE: CASLIB Samples for session MYSESSION will be mapped to SAS Library SAMPLES.
NOTE: CASLIB TETIMOD for session MYSESSION will be mapped to SAS Library TETIMOD.
NOTE: CASLIB stlmdcas for session MYSESSION will be mapped to SAS Library STLMDCAS.
NOTE: CASLIB stlrecas for session MYSESSION will be mapped to SAS Library STLRECAS.
891   %end;
892   
893   %if &sisver = V.04.00 AND &location. ne snam %then %do;
894   	%let prj_path = /data/mydata/25-Interferenze_2024;
895   %end;
896   
897   %if &sisver = V.03.05 AND &location. ne snam %then %do;
898   	%let prj_path = /mnt/storage/sasdata/Interferenze;
899   	options casdatalimit=ALL;
900   	cas mysession sessopts=(caslib=casuser timeout=1800);
901   	caslib _all_ assign;
902   %end;
903   
904   %if  &sisver = V.03.05 AND &location.=snam %then %do;
905   	%let prj_path = /sasdata/bip/inter;
906   	options casdatalimit=ALL;
907   	cas mysession sessopts=(caslib=casuser timeout=36000);
908   	caslib _all_ assign;
909   %end;
910   
911   %put &=prj_path;
PRJ_PATH=/snm/projects/MB/bip/intcomm/m08f
912   
913   %let simold = &prj_path./Fase_02/03-Data/10-output-versioni/&versione_modello./03-simulazioni/fp/&simulazioneold.;
914   libname simold "&simold.";
NOTE: Libref SIMOLD was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/03-simulazioni/fp/s002
915   %let outsim = &prj_path./Fase_02/03-Data/10-output-versioni/&versione_modello./03-simulazioni/fp/&simulazione.;
916   libname outsas "&prj_path./Fase_02/03-Data/10-output-versioni/&versione_modello./02-output-sas-persimulazioni/fp/&versione.";
NOTE: Libref OUTSAS was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/02-output-sas-persimulazioni/fp/vs801a1
917   libname outsim "&outsim.";
NOTE: Libref OUTSIM was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/03-simulazioni/fp/s003
918   libname input "&prj_path./Fase_02/03-Data/10-output-versioni/&versione_modello./02-output-sas-persimulazioni/fp";
NOTE: Libref INPUT was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/02-output-sas-persimulazioni/fp
919   
920   proc report data=simold.&versione_modello._&versold._&distretto._pest (obs=71) nowd;
921       columns _all_; /* Include all columns */
922   run;

NOTE: There were 71 observations read from the data set SIMOLD.M08F_VS801_D01_PEST.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

923   
19                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

924   
925   proc sql;
926   	create table features as
927   	select a.*, b.vip
928   	from simold.&versione_modello._&versold._&distretto._pest a inner join simold.&versione_modello._&versold._&distretto._varimp
928 !  b
929   	on a.RowName=b.Label;
NOTE: Compressing data set WORK.FEATURES increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: Table WORK.FEATURES created, with 71 rows and 3 columns.

930   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

931   
932   title "Features da rimuovere";
933   proc sql print;
934   	select RowName from features
935   	where abs(tgt_n_interferenze)<0.001 and VIP<0.8;
936   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

937   
938   title "Features da tenere";
939   proc sql print;
940   	select RowName into :num_var separated by ' ' from features
941   	where abs(tgt_n_interferenze)>0.001 or VIP>0.8;
942   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

943   
944   
945   
946   /*  */
947   /*  */
948   /* %let num_var=	 */
949   /* 				cpn_clc_AGRIC */
950   /* 				cpn_clc_BOSCH  */
951   /* 				cpn_clc_INDUS */
952   /* 				cpn_clc_INFRA */
953   /* 				cpn_clc_NONAB */
954   /* 				cpn_clc_PASCO */
955   /* 				cpn_clc_RESID */
956   /* 				fgr_val */
957   /* 				gsd_diametro */
958   /* 				gsd_lunghezza */
959   /* 				inf_osped_count */
960   /* 				inf_total_count */
961   /* 				inf_trasp_count */
20                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

962   /* 				ist_abi_avg */
963   /* 				ist_abi_sum */
964   /* 				ist_alt_avg  */
965   /* 				ist_cap_sum */
966   /* 				ist_edi_sum */
967   /* 				ist_ediinf2000_sum */
968   /* 				ist_ediinf4_sum */
969   /* 				ist_ediott_sum */
970   /* 				ist_edipes_sum */
971   /* 				ist_ediprod_avg */
972   /* 				ist_ediprod_sum */
973   /* 				ist_edires_sum */
974   /* 				ist_edisup2000_sum */
975   /* 				ist_edisup5_sum */
976   /* 				ist_fam_avg */
977   /* 				ist_fam_sum */
978   /* 				ist_lc_amploc */
979   /* 				ist_lc_combopost */
980   /* 				ist_lc_combopre */
981   /* 				ist_lc_tipoloc */
982   /* 				ist_popforlav_avg */
983   /* 				ist_popforlav_sum */
984   /* 				ist_popforlav_wgt_avg */
985   /* 				ist_popres_avg */
986   /* 				ist_popres_sum */
987   /* 				ist_popres_wgt_avg */
988   /* 				ist_popres_wgt_sum */
989   /* 				ist_popspoest_sum */
990   /* 				ist_popspoint_sum */
991   /* 				ist_popspoint_wgt_sum */
992   /* 				rsk_catcons_mod */
993   /* 				rsk_clc_AGRIC */
994   /* 				rsk_clc_ALTRO */
995   /* 				rsk_clc_BOSCH  */
996   /* 				rsk_clc_INDUS  */
997   /* 				rsk_clc_INFRA */
998   /* 				rsk_clc_NONAB  */
999   /* 				rsk_clc_PASCO  */
1000  /* 				rsk_clc_RESID  */
1001  /* 				rsk_eanres_sum */
1002  /* 				rsk_eares_sum */
1003  /* 				rsk_enres_sum  */
1004  /* 				rsk_eres_sum */
1005  /* 				rsk_interferr_sum  */
1006  /* 				rsk_interstrad_sum */
1007  /* 				rsk_opeprot_sum */
1008  /* 				rsk_popferr_sum  */
1009  /* 				rsk_popnres_sum  */
1010  /* 				rsk_popres_sum */
1011  /* 				rsk_popstrad_sum */
1012  /* 				rsk_poptot_sum */
1013  /* 				rsk_prof_avg */
1014  /* 				rsk_prof_max */
1015  /* 				rsk_prof_min */
1016  /* 				rsk_soraer_avg */
1017  /* 				rsk_spess_avg */
1018  /* 				rsk_spess_max */
1019  /* 				rsk_spess_min */
21                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

1020  /*  				;  */
1021  /*  */
1022  
1023  
1024  
1025  /* macro per i TEMPI */
1026  %macro put_time_start(function);
1027  /* 	Start Timer 	 */
1028  	%global dt_run_&function.;
1029  	data _null_;
1030  		call symputx("dt_run_&function.",datetime());
1031  	run;
1032  %mend put_time_start;
1033  %macro put_time_stop(lib, ds_timer, function);
1034  /* 	End Timer and save Time Execution 	 */
1035  
1036  	* check if the timer dataset exist, if return 1 then exist;
1037  	%let mainTableExist = %sysfunc(exist(&lib..&ds_timer.));
1038  
1039  	/* ds does NOT exist */
1040  	%if &mainTableExist. = 0 %then
1041  	%do;
1042  		data &lib..&ds_TIMER;
1043  			length id $60. time_exe start_time end_time 8 ;
1044  			format time_exe time8. start_time end_time datetime20.;
1045  			delete;
1046  		run;
1047  	%end;
1048  
1049  
1050  			data time_execution;
1051  				length id $60. time_exe start_time end_time 8 ;
1052  				id="&function.";
1053  				time_exe= abs(datetime()-&&dt_run_&function.);
1054  				start_time=&&dt_run_&function.;
1055  				end_time = datetime();
1056  				format time_exe time8. start_time end_time datetime20.;
1057  			run;
1058  		
1059  			%let table_access=0;
1060  			%tryopen(member=&lib..&ds_TIMER,timeout=60,retry=5);
1061  			%if &table_access. = 1 %then %do;
1062  				proc append base=&lib..&ds_TIMER data=time_execution force;
1063  				run;
1064  			%end;
1065  			%else %do;
1066  				%put Mancata scrittura per id=&function.;
1067  				%tryopen(member=&lib..errori_scrittura_TIMER,timeout=180,retry=5);
1068  				%if &table_access. = 1 %then %do;
1069  					proc append base=&lib..errori_sovrascrittura_TIMER data=time_execution force;
1070  					run;
1071  				%end;
1072  			%end;
1073  
1074  %mend put_time_stop;
1075  %macro tryopen(member=,timeout=10,retry=5);
1076  	/*
1077  	member -> dataset che provo ad aprire
22                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

1078  	timeout -> per quanti secondo continuo a provare
1079  	retry -> intervallo di tempo tra una prova  e l'altra
1080  	*/
1081  	%local starttime;
1082  	%let starttime = %sysfunc(datetime());
1083  
1084  	/* continuo a ciclare finche riesco ad aprire la tabella oppure finche sono passati piu di &timeout. secondi da quando ho
1084! iniziato */
1085  	%put Trying open ...;
1086  
1087  	data _null_;
1088  		dsid = 0;
1089  		/*  mi fermo quando la condizione diventa vera ovvero quando sono riuscito ad aprire la tabella o è passato troppo tempo
1089! */
1090  		do until (dsid > 0 or datetime() > (&starttime + &timeout));
1091  			put 'Open cycle';
1092  			dsid = open("&member");
1093  			/* dsid = 0 indica che il ds non può essere aperto */
1094  			if (dsid = 0) then rc = sleep(&retry);
1095  		end;
1096  		if (dsid > 0) then
1097  		do;
1098  			call symputx('table_access', 1);
1099  			rc = close(dsid);
1100  			put "Table OPENED!";
1101  		end;
1102  	run;
1103  %mend tryopen;
1104  %macro log_redirect_start(log_name=, log_path=);	
1105  	data _null_;
1106  		log_name_long =
1106! cat("&log_name.","_",put(datepart(datetime()),date9.),"_",putn(hour(datetime()),'Z2.'),putn(minute(datetime()),'Z2.'),
1106! putn(second(datetime()),'Z2.'),"_","&SYSJOBID.");
1107  		call symputx("log_name_long",log_name_long);
1108  	run;
1109  	
1110  	%put &=log_path.;
1111  	%put &=log_name_long.;
1112  	
1113  	proc printto log="&log_path./&log_name_long..log";
1114  	run;
1115  	
1116  	%let rundatetime = %sysfunc(datetime());
1117  	%put rundatetime -->  %sysfunc(putn(&rundatetime., datetime.));
1118  %mend log_redirect_start;
1119  
1120  %macro log_redirect_stop;
1121  	proc printto;
1122  	run;
1123  	%put ======> LOG REDIRECT STOP;
1124  %mend log_redirect_stop;
1125  
1126  
1127  /*===========================================*/
1128  /* INIZIO REGISTRAZIONE TIMER  e REDIRECT LOG*/
1129  *%log_redirect_start(log_name=&versione_modello._&versione_simu., log_path=&log_path.);
1130  %put_time_start(&versione_modello._&versione_simu.);
MPRINT(PUT_TIME_START):   data _null_;
23                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

MPRINT(PUT_TIME_START):   call symputx("dt_run_m08f_vs801a1_d01",datetime());
MPRINT(PUT_TIME_START):   run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1131  
1132  /* Check sulle variabili categoriche */
1133  
1134  %macro countvar(ds=, var=);	
1135  	proc sql;
1136  		create table count_&var. as
1137  			select &var., count(*) as count from &ds. group by &var.;
1138  	quit;
1139  	
1140  /* 	proc univariate data=&ds.; */
1141  /* 		var &var.; */
1142  /* 		histogram / normal; */
1143  /* 	run; */
1144  %mend countvar;
1145  
1146  /*
1147  %countvar(ds=test, var=DIAMETRO);
1148  %countvar(ds=test, var=ist_cap_sum);
1149  %countvar(ds=test, var=fgr_val);
1150  %countvar(ds=test, var=rsk_catcons_mod);
1151  %countvar(ds=test, var=rsk_eanres_sum);
1152  %countvar(ds=test, var=rsk_eares_sum);
1153  %countvar(ds=test, var=rsk_interferr_sum);
1154  %countvar(ds=test, var=rsk_interstrad_sum);
1155  %countvar(ds=test, var=rsk_clc_ALTRO);
1156  */
1157  
1158  /* proc means data=test nmiss; run; */
1159  /*
1160  	Sostituisco i valori mancanti con zeri per le variabili numeriche
1161  	Sostituisco i valori categorici zero inflated con variabile booleana
1162  */
1163  
1164  
1165  /* data campione; */
1166  /* 	set test; */
1167  /* 	 */
1168  /* 	array numeriche(*) _numeric_; */
1169  /* 	do i=1 to dim(numeriche); */
1170  /* 		if missing(numeriche[i]) then */
1171  /* 			numeriche[i]=0; */
1172  /* 	end; */
1173  /* 	rsk_clc_ALTRO_BOOL = rsk_clc_ALTRO; */
1174  /* 	if rsk_clc_ALTRO_BOOL > 1 then rsk_clc_ALTRO_BOOL = 1; */
1175  /* 	 */
1176  /* 	rsk_interferr_sum_BOOL = rsk_interferr_sum; */
1177  /* 	if rsk_interferr_sum_BOOL > 1 then rsk_interferr_sum_BOOL = 1; */
1178  /* 	 */
1179  /* 	rsk_eares_sum_BOOL = rsk_eares_sum; */
1180  /* 	if rsk_eares_sum_BOOL > 1 then rsk_eares_sum_BOOL = 1; */
24                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

1181  /* 	 */
1182  /* 	rsk_eanres_sum_BOOL = rsk_eanres_sum; */
1183  /* 	if rsk_eanres_sum_BOOL > 1 then rsk_eanres_sum_BOOL = 1; */
1184  /* 	drop i; */
1185  /* run; */
1186  
1187  /* %let class_var=	DIAMETRO */
1188  /* 				ist_cap_sum */
1189  /* 				fgr_val */
1190  /* 				rsk_catcons_mod */
1191  /* 				rsk_eanres_sum_BOOL */
1192  /* 				rsk_eares_sum_BOOL		 */
1193  /* 				rsk_interferr_sum_BOOL */
1194  /* 				rsk_interstrad_sum */
1195  /* 				rsk_clc_ALTRO_BOOL */
1196  /* 				; */
1197  
1198  
1199  	
1200  data campione;
1201  	 set input.gasdotti_input;
1202  	 keep tgt_n_interferenze &num_var. id_tratto;
1203  	 where distretto= upcase("&distretto.") or near_&distretto.=1;
1204  run;

NOTE: There were 5580 observations read from the data set INPUT.GASDOTTI_INPUT.
      WHERE (distretto='D01') or (near_d01=1);
NOTE: The data set WORK.CAMPIONE has 5580 observations and 62 variables.
NOTE: Compressing data set WORK.CAMPIONE decreased size by 32.56 percent. 
      Compressed is 29 pages; un-compressed would require 43 pages.
NOTE: DATA statement used (Total process time):
      real time           0.14 seconds
      cpu time            0.12 seconds
      

1205  		
1206  %if &sisver = V.04.00 AND &location.=snam %then %do;
1207  	
1207!  data campione_full;
1208  		set campione;
1209  		keep tgt_n_interferenze  &num_var. id_tratto;
1210  	run;

NOTE: There were 5580 observations read from the data set WORK.CAMPIONE.
NOTE: The data set WORK.CAMPIONE_FULL has 5580 observations and 62 variables.
NOTE: Compressing data set WORK.CAMPIONE_FULL decreased size by 32.56 percent. 
      Compressed is 29 pages; un-compressed would require 43 pages.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.02 seconds
      

1211  	
1212  	ods graphics on;
1213  	ods pdf file="&outsim./&versione_modello._&versione_simu._results.pdf";
NOTE: Writing ODS PDF output to DISK destination 
      "/snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/03-simulazioni/fp/s003/m08f_vs801a1_d01_results.pdf
      ", printer "PDF".
25                                                         The SAS System                     Tuesday, December 17, 2024 03:23:47 PM

1214  
1215  	/* New Vars Factors */
1216  	
1216!  proc pls data=campione_full cv=one method=PLS(algorithm=SVD) cvtest(seed=17112003 stat=press nsamp=1000) CENSCALE details
1216! plot=(XYScores ParmProfiles VIP);
1217  /* 		class &class_var.; */
1218  		ods output XWeights=outsim.&versione_modello._&versione_simu._XWeights
1219  Weights=outsim.&versione_modello._&versione_simu._YWeights
1220  ParameterEstimates=outsim.&versione_modello._&versione_simu._Pest
1221  VariableImportancePlot=outsim.&versione_modello._&versione_simu._VarImp;
1222  		model tgt_n_interferenze =	&num_var. / solution;
1223  		output out=outsim.&versione_modello._&versione_simu._pls_factors xscore=pls_factor_  yscore=yscore_
1223! predicted=predict_1-predict_15
1224  								xresidual=xresid_1-xresid_15 yresidual=yresid_1-yresid_15
1225  								STDX=STDX_1-STDX_15 STDY=STDY_1-STDY_15;
1226  	run;

NOTE: Maximum number of factors to extract set to 15.
NOTE: Compressing data set WORK._DOCTMP000000000000000000000 decreased size by 26.67 percent. 
      Compressed is 11 pages; un-compressed would require 15 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000001 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000002 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000003 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
WARNING: This graph has too many graphical elements. You may not be able to get any vector graphics output and in that case, you 
         can set your output format to an image type.
NOTE: Compressing data set WORK._DOCTMP000000000000000000004 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000005 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000006 increased size by 42.86 percent. 
      Compressed is 10 pages; un-compressed would require 7 pages.
WARNING: This graph has too many graphical elements. You may not be able to get any vector graphics output and in that case, you 
         can set your output format to an image type.
NOTE: Compressing data set WORK._DOCTMP000000000000000000007 increased size by 40.00 percent. 
      Compressed is 7 pages; un-compressed would require 5 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000008 increased size by 40.00 percent. 
      Compressed is 7 pages; un-compressed would require 5 pages.
NOTE: Compressing data set WORK._DOCTMP000000000000000000009 increased size by 40.00 percent. 
      Compressed is 7 pages; un-compressed would require 5 pages.
NOTE: Extra names on the STDY= list ignored.
NOTE: Extra names on the PRED= list ignored.
NOTE: Extra names on the YRESIDUAL= list ignored.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_VARIMP has 60 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_VARIMP increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_PEST has 61 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PEST increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS has 10 observations and 62 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
WARNING: Output 'Weights' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
         verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
         the NOPRINT option is not used.
NOTE: There were 5580 observations read from the data set WORK.CAMPIONE_FULL.
26                                                         The SAS System                     Tuesday, December 17, 2024 03:26:28 PM

NOTE: The data set OUTSIM.M08F_VS801A1_D01_PLS_FACTORS has 5580 observations and 125 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PLS_FACTORS decreased size by 19.54 percent. 
      Compressed is 70 pages; un-compressed would require 87 pages.
NOTE: PROCEDURE PLS used (Total process time):
      real time           2:41.45
      cpu time            2:35.83
      

1227  
1228  	ods pdf close;
NOTE: ODS PDF printed 31 pages to 
      /snm/projects/MB/bip/intcomm/m08f/Fase_02/03-Data/10-output-versioni/m08f/03-simulazioni/fp/s003/m08f_vs801a1_d01_results.pdf.
1229  	ods graphics off;
1230  	
1231  	
1231!  proc sort data=input.gasdotti_input out=gasdotti_input;by id_tratto;run;

NOTE: Input data set is already sorted; it has been copied to the output data set.
NOTE: There were 37331 observations read from the data set INPUT.GASDOTTI_INPUT.
NOTE: The data set WORK.GASDOTTI_INPUT has 37331 observations and 86 variables.
NOTE: Compressing data set WORK.GASDOTTI_INPUT decreased size by 73.03 percent. 
      Compressed is 1119 pages; un-compressed would require 4149 pages.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.59 seconds
      cpu time            0.59 seconds
      

1232  	
1232!  proc sort data=outsim.&versione_modello._&versione_simu._pls_factors out=pls_factors_keep(keep=id_tratto pls_factor_:);by
1232! id_tratto;run;

NOTE: There were 5580 observations read from the data set OUTSIM.M08F_VS801A1_D01_PLS_FACTORS.
NOTE: The data set WORK.PLS_FACTORS_KEEP has 5580 observations and 16 variables.
NOTE: Compressing data set WORK.PLS_FACTORS_KEEP increased size by 18.18 percent. 
      Compressed is 13 pages; un-compressed would require 11 pages.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
      

1233  	
1234  	data outsas.gasdotti_input_&versione_simu.;
1235  		merge INPUT.GASDOTTI_INPUT pls_factors_keep(in=b);
1236  		by id_tratto;
1237  		if b;
1238  	run;

NOTE: There were 37331 observations read from the data set INPUT.GASDOTTI_INPUT.
NOTE: There were 5580 observations read from the data set WORK.PLS_FACTORS_KEEP.
NOTE: The data set OUTSAS.GASDOTTI_INPUT_VS801A1_D01 has 5580 observations and 101 variables.
NOTE: Compressing data set OUTSAS.GASDOTTI_INPUT_VS801A1_D01 decreased size by 69.89 percent. 
      Compressed is 187 pages; un-compressed would require 621 pages.
NOTE: DATA statement used (Total process time):
      real time           0.33 seconds
      cpu time            0.23 seconds
      

1239  %end;
27                                                         The SAS System                     Tuesday, December 17, 2024 03:26:29 PM

1240  %else %do;
1241  	%put ======> PLS MOD ======;
1242  	data casuser.campione_full;
1243  		set campione;
1244  		keep tgt_n_interferenze &num_var. id_tratto;
1245  	run;
1246  	ods pdf file="&outsim./&versione_modello._&versione_simu._results.pdf";	
1247  
1248  /* ods trace on; */
1249  ods listing close;
1250  /* ods output C=ResidualSummary ; */
1251  	proc plsmod data=casuser.campione_full method=pls(algorithm=SVD)  cvtest(seed=17112003 stat=press nsamp=1000) CENSCALE
1251! details;
1252  /* 		class &class_var.; */
1253  /* 		display trace; */
1254   		displayout  / includeall; /* a=PLSMod.CrossValidation.ResidualSummary b=PLSMod.CrossValidation.CVResults  */
1255  /* 			c=PLSMod.PercentVariation d=PLSMod.OutputCasTables; */
1256  		model tgt_n_interferenze =	&num_var. / solution;
1257  		partition fraction(test=.3);
1258  		output out=casuser.pls_factors_keep xscore=pls_factor_  copyvars=id_tratto;
1259  	run;
1260  /* ods trace off; */
1261  	ods pdf close;
1262  
1263  
1264  /* 	data outsim.&versione_modello._&versione_simu._XWeights;set casuser.&versione_modello._&versione_simu._XWeights;run; */
1265  /*  */
1266  /* 	data outsim.&versione_modello._&versione_simu._XWeights;set casuser.&versione_modello._&versione_simu._YWeights;run; */
1267  /*  */
1268  /* 	data outsim.&versione_modello._&versione_simu._ParamEstimates;set
1268! casuser.&versione_modello._&versione_simu._ParamEstimates;run; */
1269  
1270  	data casuser.gasdotti_input;set input.gasdotti_input;run;
1271  	
1272  	data casuser.gasdotti_input_&versione_simu.;
1273  		merge casuser.GASDOTTI_INPUT
1274  			  casuser.pls_factors_keep(in=b);
1275  		by id_tratto;
1276  		if b;
1277  	run;
1278  	
1279  	proc sort data=casuser.gasdotti_input_&versione_simu. out=outsas.gasdotti_input_&versione_simu.;by id_tratto;run;
1280  	
1281  	*cas mysession terminate;
1282  %end;
1283  
1284  /*============================*/
1285  /* FINE REGISTRAZIONE TIMER e REDIRECT LOG */
1286  %put_time_stop(outsim, &versione_modello._&versione_simu._timer, &versione_modello._&versione_simu.);
MPRINT(PUT_TIME_STOP):   * check if the timer dataset exist, if return 1 then exist;
MPRINT(PUT_TIME_STOP):   data time_execution;
MPRINT(PUT_TIME_STOP):   length id $60. time_exe start_time end_time 8 ;
MPRINT(PUT_TIME_STOP):   id="m08f_vs801a1_d01";
MPRINT(PUT_TIME_STOP):   time_exe= abs(datetime()-2050068227.2);
MPRINT(PUT_TIME_STOP):   start_time=2050068227.2;
MPRINT(PUT_TIME_STOP):   end_time = datetime();
MPRINT(PUT_TIME_STOP):   format time_exe time8. start_time end_time datetime20.;
MPRINT(PUT_TIME_STOP):   run;
28                                                         The SAS System                     Tuesday, December 17, 2024 03:26:29 PM


NOTE: The data set WORK.TIME_EXECUTION has 1 observations and 4 variables.
NOTE: Compressing data set WORK.TIME_EXECUTION increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

Trying open ...
MPRINT(TRYOPEN):   data _null_;
MPRINT(TRYOPEN):   dsid = 0;
MPRINT(TRYOPEN):   do until (dsid > 0 or datetime() > (2050068389.8479 + 60));
MPRINT(TRYOPEN):   put 'Open cycle';
MPRINT(TRYOPEN):   dsid = open("outsim.m08f_vs801a1_d01_timer");
MPRINT(TRYOPEN):   if (dsid = 0) then rc = sleep(5);
MPRINT(TRYOPEN):   end;
MPRINT(TRYOPEN):   if (dsid > 0) then do;
MPRINT(TRYOPEN):   call symputx('table_access', 1);
MPRINT(TRYOPEN):   rc = close(dsid);
MPRINT(TRYOPEN):   put "Table OPENED!";
MPRINT(TRYOPEN):   end;
MPRINT(TRYOPEN):   run;

Open cycle
Table OPENED!
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

MPRINT(PUT_TIME_STOP):  ;
MPRINT(PUT_TIME_STOP):   proc append base=outsim.m08f_vs801a1_d01_timer data=time_execution force;
MPRINT(PUT_TIME_STOP):   run;

NOTE: Appending WORK.TIME_EXECUTION to OUTSIM.M08F_VS801A1_D01_TIMER.
NOTE: There were 1 observations read from the data set WORK.TIME_EXECUTION.
NOTE: 1 observations added.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_TIMER has 2 observations and 4 variables.
NOTE: PROCEDURE APPEND used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1287  *%log_redirect_stop;
1288  
1289  /* region: Generated postamble */
1290  /* Close ODS destinations */
1291  &graphterm; ;*';*";*/;run;quit;
1292  quit;run;
1293  ods html5 (id=web) close;
1294  %if %sysfunc(fileref(_gsfname)) lt 0 %then %do;
1295      filename _gsfname clear;
NOTE: Fileref _GSFNAME has been deassigned.
1296  %end;
1297  %studio_capture_background_log;
MPRINT(STUDIO_CAPTURE_BACKGROUND_LOG):   options nosyntaxcheck;
MPRINT(STUDIO_CAPTURE_BACKGROUND_LOG):   proc http 
29                                                         The SAS System                     Tuesday, December 17, 2024 03:26:30 PM

url="https://sas-compute/compute/sessions/8e28caf8-0375-49d1-8faf-5222bdfb023f-ses0000/jobs/1661BA44-44C7-D040-95E3-5F0323033C87/log
" oauth_bearer = sas_services method='get' out=_logout;
MPRINT(STUDIO_CAPTURE_BACKGROUND_LOG):   headers 'accept'='text/plain';
MPRINT(STUDIO_CAPTURE_BACKGROUND_LOG):   quit;


Sorry about the delay, this is the log, It should be a problem in the sas settings

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 3311 views
  • 0 likes
  • 3 in conversation