<?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: printout of Hash Object variable in the SAS log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964015#M375489</link>
    <description>&lt;P&gt;The most obvious reason is the hash objects are not included in the list of variables when you use the _ALL_ shortcut in the PUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is a good reason why they aren't included.&amp;nbsp; What the heck would it write to the LOG?&lt;/P&gt;
&lt;PRE&gt;30    data _null_;
31    declare hash H;
32    H = _new_ hash();
33    put _all_;
34     put h=;
ERROR: Invalid operation for object type.
35   run;

NOTE: The SAS System stopped processing this step because of errors.
&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Apr 2025 14:35:55 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-04-10T14:35:55Z</dc:date>
    <item>
      <title>printout of Hash Object variable in the SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964014#M375488</link>
      <description>&lt;P&gt;Hi SAS-C!&lt;/P&gt;
&lt;P&gt;I have a favour to ask.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you be so kind and run the following snippet in your SAS and share the log output?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;sysvlong.;
data _null_;
  declare hash H;
  H = _new_ hash();
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to figure out at what "M" SAS stopped to print out hash object variable and its value in the log.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I know form&amp;nbsp;&lt;/STRONG&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/21262"&gt;@hashman&lt;/a&gt;&amp;nbsp;&lt;STRONG&gt;it was printable&lt;/STRONG&gt; in 9.4M4.&amp;nbsp; I've checked, it was "visible" in older versions too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did tests on M7:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1          %put &amp;amp;sysvlong.;
9.04.01M7P080620
2          data _null_;
3            declare hash H;
4            H = _new_ hash();
5            put _all_;
6          run;

_ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and M8:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %put &amp;amp;sysvlong.;
9.04.01M8P011823
2    data _null_;
3      declare hash H;
4      H = _new_ hash();
5      put _all_;
6    run;

_ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
      system cpu time     0.01 seconds
      memory              364.87k
      OS Memory           29952.00k
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;also on Workbench for Learners:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %put &amp;amp;sysvlong.;
V.04.00M0P020625
2    data _null_;
3      declare hash H;
4      H = _new_ hash();
5      put _all_;
6    run;

_ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              442.12k
      OS Memory           16740.00k&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and Viya for Learners:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %put &amp;amp;sysvlong.;
V.04.00M0P091624
2    data _null_;
3      declare hash H;
4      H = _new_ hash();
5      put _all_;
6    run;
_ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interesting is that on EG8 data step debugger, under SAS9.4M8, hash object variable &lt;STRONG&gt;is&lt;/STRONG&gt; "visible":&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yabwon_1-1744294530893.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106145iEB10D6B280109623/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yabwon_1-1744294530893.png" alt="yabwon_1-1744294530893.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It looks that also with SAS Studio (on VFL) we can see it, but in contrary to EG, Studio "fails" to proceed:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yabwon_2-1744294791917.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106146i5917F500CAAC6F41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yabwon_2-1744294791917.png" alt="yabwon_2-1744294791917.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964014#M375488</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-04-10T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: printout of Hash Object variable in the SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964015#M375489</link>
      <description>&lt;P&gt;The most obvious reason is the hash objects are not included in the list of variables when you use the _ALL_ shortcut in the PUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is a good reason why they aren't included.&amp;nbsp; What the heck would it write to the LOG?&lt;/P&gt;
&lt;PRE&gt;30    data _null_;
31    declare hash H;
32    H = _new_ hash();
33    put _all_;
34     put h=;
ERROR: Invalid operation for object type.
35   run;

NOTE: The SAS System stopped processing this step because of errors.
&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964015#M375489</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-04-10T14:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: printout of Hash Object variable in the SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964021#M375490</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In older versions, you can see something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1  data _null_;
2    declare hash H;
3    H = _new_ hash();
4    put _all_;
5  run;

H=5.6817E-299 _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.04 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. BTW, if you run:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ / PMML; /* PMML option */
  declare hash H;
  H = _new_ hash();
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you will see:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-sas"&gt;&lt;CODE&gt;Symbol=H kind=? type=T_OBJECT&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the LOG:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;1    data _null_ / PMML;
2      declare hash H;
3      H = _new_ hash();
4    run;

NOTE: Generating PMML.

--------------- Symbol table ------------------

21: Symbol=_THREADID_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

23: Symbol=_FILE_ kind=K_IDENTIFIER type=T_CHARACTER
 - retain
 - pseudovariable
 - internal

47: Symbol='.'n kind=K_REAL_CONSTANT type=T_REAL

49: Symbol='0'n kind=K_REAL_CONSTANT type=T_REAL

50: Symbol='1'n kind=K_REAL_CONSTANT type=T_REAL

62: Symbol=_NTHREADS_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

74: Symbol=H kind=? type=T_OBJECT
 - internal

131: Symbol=_RANKID_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

141: Symbol=_IORC_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

174: Symbol=_NRANKTHREADS_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

189: Symbol=_NRANKS_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

237: Symbol=_INFILE_ kind=K_IDENTIFIER type=T_CHARACTER
 - retain
 - pseudovariable
 - internal

263: Symbol='#macbig'n kind=K_REAL_CONSTANT type=T_REAL

264: Symbol='DATASTEP.HASH'n kind=K_CLASSOBJECT type=T_OBJECT
 - internal

270: Symbol='#macseps'n kind=K_REAL_CONSTANT type=T_REAL

278: Symbol='#macnbig'n kind=K_REAL_CONSTANT type=T_REAL

312: Symbol=_RANKTHREADID_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

322: Symbol='BASE.OBJECT'n kind=K_CLASSOBJECT type=T_OBJECT
 - internal

357: Symbol=_HOSTNAME_ kind=K_IDENTIFIER type=T_CHARACTER
 - retain
 - internal

384: Symbol=_N_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

443: Symbol=_ERROR_ kind=K_IDENTIFIER type=T_REAL
 - retain
 - internal

504: Symbol='V@0'n kind=? type=T_OBJECT
 - internal

end of symbol table

NOTE: Writing HTML Body file: sashtml1.htm
NOTE: Finished PMML.
NOTE: DATA statement used (Total process time):
      real time           0.34 seconds
      user cpu time       0.14 seconds
      system cpu time     0.17 seconds
      memory              6924.71k
      OS Memory           29952.00k
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964021#M375490</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-04-10T14:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: printout of Hash Object variable in the SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964023#M375491</link>
      <description>&lt;P&gt;VNEXT sees the hash object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;9.04.01M8P011823
73         data _null_;
74           declare hash H;
75           H = _new_ hash();
76           put _all_;
77           length _name_ $32 type $1;
78           do until(missing(_name_));
79              call vnext(_name_,type,length);
80              put 'NOTE: ' (_all_)(=);
81              end;
82         run;

_name_=  type=  length=. _ERROR_=0 _N_=1
NOTE: _name_=H type=  length=0
NOTE: _name_=_name_ type=C length=32
NOTE: _name_=type type=C length=1
NOTE: _name_=length type=N length=8
NOTE: _name_=_ERROR_ type=N length=8
NOTE: _name_=_N_ type=N length=8
NOTE: _name_=  type=  length=0
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964023#M375491</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2025-04-10T14:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: printout of Hash Object variable in the SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964027#M375492</link>
      <description>&lt;P&gt;The VNEXT(), ha! I forgot!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;, thanks a 1e6!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:59:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/printout-of-Hash-Object-variable-in-the-SAS-log/m-p/964027#M375492</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-04-10T14:59:07Z</dc:date>
    </item>
  </channel>
</rss>

