<?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: is it possible to tell from codes if a var is new created or from input datasets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809253#M319099</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416388"&gt;@HeatherNewton&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;my question is "is it possible to tell if r_dte is created newly in this program or it comes from input dataset RAW_PENDING_PATH.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;you can look at the code; or&lt;/LI&gt;
&lt;LI&gt;you can look at the variables in RAW_PENDING_PATH via PROC CONTENTS or other means.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Fri, 22 Apr 2022 10:43:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-22T10:43:52Z</dc:date>
    <item>
      <title>is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809251#M319097</link>
      <description>&lt;PRE&gt;data AMBSA_STATIC(drop=flag tmp point tmp2 _rowcnt);
infile "&amp;amp;G_IFC_RAW_PENDING_PATH./ambsa.static.txt" RECEM+N;
RETAIN flag 0;
If flag=0 then 0;
input tmp $EBCDIC87. @@;
point=index(tmp, '#BEGIN');
if point then do;
call cynput("header_ind",'Y');
header=substr(tmp,1,86);
point =point+86;
flag=1;
input @point r_dte $EBCDIC10. @@;
link readdata;
end;
end;
else do;
input r_dte $EBCDIC10. @@;
link readdata;
end;
if flag=1;
return:
readdata:
if substr(r_dte,1,4) ne '#END' or substr(r_Dte,1,1)ne '#' THEN DO;
input r_type $EBCDIC1.
ABMS_ORG $EBCDIC3.
.
.
AMBS_USER_AMT S370FPD9.0
.
.
.
AMBS_LOAN_TRF_IND    $EBCDIC1

@@;
END;
ELSE DO;
input tmp2 $EBCDIC76.;
CALL SYMPUT("trailer_ind",'y');
trailer=r_dte || tmp2
_rowcnt=sub(trailer,70,9);
FILE log;
IF input(_rowcnt,9)=_n_-1 then do;
PUT_rowcnt _n_;
put "correct_Row_number";
.
.
.&lt;/PRE&gt;
&lt;P&gt;my question is "is it possible to tell if r_dte is created newly in this program or it comes from input dataset RAW_PENDING_PATH.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 10:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809251#M319097</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-04-22T10:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809253#M319099</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416388"&gt;@HeatherNewton&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;my question is "is it possible to tell if r_dte is created newly in this program or it comes from input dataset RAW_PENDING_PATH.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;you can look at the code; or&lt;/LI&gt;
&lt;LI&gt;you can look at the variables in RAW_PENDING_PATH via PROC CONTENTS or other means.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 22 Apr 2022 10:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809253#M319099</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-22T10:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809265#M319106</link>
      <description>&lt;P&gt;Option 3: read the log. A message about uninitialized variables positively tells you it's not in an incoming dataset.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 11:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809265#M319106</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-22T11:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809267#M319108</link>
      <description>&lt;P&gt;I don't see any statement in your code, that processes a dataset at all, so all variables are created in the step you have posted.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 11:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809267#M319108</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-04-22T11:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809269#M319110</link>
      <description>The variable r_dte does not come from RAW_PEBDING_PATH. It is indeed created newly by the code.</description>
      <pubDate>Fri, 22 Apr 2022 12:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809269#M319110</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-04-22T12:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to tell from codes if a var is new created or from input datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809294#M319129</link>
      <description>&lt;P&gt;Can you attempt again to explain what your question is?&amp;nbsp; The current question does not appear to have anything to do with the example code posted.&amp;nbsp; The posted code is not using any existing DATASET.&amp;nbsp; It is reading from a TEXT FILE.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you asking if the data step is reading the value of the variable from the contents of the text file?&lt;/P&gt;
&lt;P&gt;Then yes there are two different INPUT statement that are setting the value of&amp;nbsp;r_dte by reading characters from the text file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input @point r_dte $EBCDIC10. @@;
...
input r_dte $EBCDIC10. @@;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2022 13:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-it-possible-to-tell-from-codes-if-a-var-is-new-created-or/m-p/809294#M319129</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-22T13:06:04Z</dc:date>
    </item>
  </channel>
</rss>

