<?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: Input output dataset search in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838071#M331401</link>
    <description>&lt;P&gt;And data set UPDATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS OUTPUT.&lt;/P&gt;
&lt;P&gt;Some procedures like Proc Compare can create more than one output data set such as with the OUTSTATS= and uses Base= and Compare= as input data.&lt;/P&gt;
&lt;P&gt;Proc Append with Base= and Data= input sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about Proc Datasets and renaming data sets? Does that count?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many procedures use more than one input data set. Proc Gmap for example has Data, Map and annotate as proc options and will accept additional Annotate data sets for each plot option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Graphics procedures also have the annotate and may have helper data sets in SGplot for DATTRMAP and Rattermap data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Survey procedures often have additional data set to deal with Sample information with names like Rate(R), Total, N, Sampsize, Samprate, Certsize, Maxsize and a bunch of others that may be data sets or values/value lists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Oct 2022 14:54:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-10-12T14:54:07Z</dc:date>
    <item>
      <title>Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/837998#M331360</link>
      <description>In a big list of sas programs, i would like to find out all the input and output dataset.. what is an easy way to do it?&lt;BR /&gt;&lt;BR /&gt;I am thinking search by key words eg&lt;BR /&gt;&lt;BR /&gt;Input dataset:&lt;BR /&gt;Use ’set’&lt;BR /&gt;&lt;BR /&gt;Output dataset:&lt;BR /&gt;Use ’data’, ’output’, ’create table’&lt;BR /&gt;&lt;BR /&gt;Have I missed out any??&lt;BR /&gt;&lt;BR /&gt;Any other easier ways?</description>
      <pubDate>Wed, 12 Oct 2022 09:41:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/837998#M331360</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-10-12T09:41:44Z</dc:date>
    </item>
    <item>
      <title>Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/837997#M331467</link>
      <description>In a big list of sas programs, i would like to find out sll the input snd output dataset.. what is an easy way to do it?&lt;BR /&gt;&lt;BR /&gt;I am thinking search by key words eg&lt;BR /&gt;&lt;BR /&gt;Input dataset:&lt;BR /&gt;Use ’set’&lt;BR /&gt;&lt;BR /&gt;Output dataset:&lt;BR /&gt;Use ’data’, ’output’, ’create table’&lt;BR /&gt;&lt;BR /&gt;Have I missed out any??&lt;BR /&gt;&lt;BR /&gt;Any other easier ways?</description>
      <pubDate>Wed, 12 Oct 2022 09:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/837997#M331467</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-10-12T09:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838025#M331376</link>
      <description>&lt;P&gt;Please post your questions only once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not exhaustive list of possible keywords:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For input:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;from, join (for sql)&lt;/P&gt;
&lt;P&gt;set, merge, modify&lt;/P&gt;
&lt;P&gt;dataset: (when loading a data into hash)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;create table&lt;/P&gt;
&lt;P&gt;create view&lt;/P&gt;
&lt;P&gt;out (for Procs)&lt;/P&gt;
&lt;P&gt;data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then you have also cases like below where SAS replaces the table without an out= or similar keyword:&lt;BR /&gt;proc sort data=mytable; by some_var; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then there is also SQL UPDATE, INSERT and DELETE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and last but not least: Formats and Informats.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 12:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838025#M331376</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-10-12T12:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838037#M331384</link>
      <description>&lt;P&gt;For the future you might want to consider the use of SASjs for documenting your SAS jobs.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If your developers follow the approach, you can generate Data Lineage diagrams (inputs/outputs) directly from the program headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the docs:&amp;nbsp;&amp;nbsp;&lt;A href="https://cli.sasjs.io/doc/" target="_blank"&gt;https://cli.sasjs.io/doc/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 12:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838037#M331384</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-10-12T12:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838060#M331396</link>
      <description>If you can run the programs, PROC SCAPROC will provide this information in the log. &lt;BR /&gt;If you have macros in the code the input/output could be dynamic.</description>
      <pubDate>Wed, 12 Oct 2022 14:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838060#M331396</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-12T14:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838071#M331401</link>
      <description>&lt;P&gt;And data set UPDATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS OUTPUT.&lt;/P&gt;
&lt;P&gt;Some procedures like Proc Compare can create more than one output data set such as with the OUTSTATS= and uses Base= and Compare= as input data.&lt;/P&gt;
&lt;P&gt;Proc Append with Base= and Data= input sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about Proc Datasets and renaming data sets? Does that count?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many procedures use more than one input data set. Proc Gmap for example has Data, Map and annotate as proc options and will accept additional Annotate data sets for each plot option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Graphics procedures also have the annotate and may have helper data sets in SGplot for DATTRMAP and Rattermap data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Survey procedures often have additional data set to deal with Sample information with names like Rate(R), Total, N, Sampsize, Samprate, Certsize, Maxsize and a bunch of others that may be data sets or values/value lists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 14:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838071#M331401</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-12T14:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838345#M331459</link>
      <description>&lt;P&gt;Instead of scanning programs, scan logs. The NOTEs detailing datasets read and datasets written are quite standardized and much easier to parse than program statements.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 07:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/838345#M331459</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-13T07:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Input output dataset search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/850590#M336152</link>
      <description>&lt;P&gt;As Reeza says, proc scaproc is the tool you need.&lt;/P&gt;
&lt;P&gt;Run this code and look at your sas log : a lot of information is written there&lt;/P&gt;
&lt;P&gt;Doc :&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0pbvhhaw4f7f7n1ukrvacsgulx1.htm" target="_blank" rel="noopener"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0pbvhhaw4f7f7n1ukrvacsgulx1.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* start gathering data - add timestamp  + variables-related information */
options msglevel=I;
proc scaproc; 
   record '!temp/record.txt' attr OPENTIMES; 
run;

data a(keep=i index=(i)) b(keep=i j k) ; 
   do i = 1 to 1e7; 
      j = round(i,1e6); 
      k=sin(i);
      if mod(i,2)=0 then output a;
      else output b;
   end; 
run;

ods output  Univariate.j.BasicMeasures=BasicMeasures;
proc univariate data=b;
var j;
run;
ods output close;

proc summary data=b;
class j;
var k;
output out=summary sum=;
run;

proc sql;
create table c as select * from a where i &amp;lt; 100;

proc means data=a;
run;
&lt;BR /&gt;/* write results to text file */
proc scaproc; 
   write; 
run;

/* examine what has been generated */
data _NULL_;
 infile    '!temp/record.txt'; 
 input;
 put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 08:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-output-dataset-search/m-p/850590#M336152</guid>
      <dc:creator>totoleheros</dc:creator>
      <dc:date>2022-12-21T08:12:29Z</dc:date>
    </item>
  </channel>
</rss>

