<?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: How do I match the field from one dataset to another dataset name? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12726#M1412</link>
    <description>It's likely that the SAS DATA step process can be used to SET on all company/hiring files if using SAS 9.2, where you can use SET DEPT: (that's a colon character), and also you didn't mention if a SAS variable department (dep_code) is in the DEPT_: / HINFO_: files.  If not, you can interrogate the input file using the SET statement parameter INDSNAME= to interrogate what SAS file is inputting the current observation and capture the file-name suffix to assign dep_code.&lt;BR /&gt;
&lt;BR /&gt;
Either a PROC FORMAT for VALUE look-up or a SAS DATA step MERGE process (with a BY statement and your match-variable list), will work with your SAS programming task to combine the different, but related input files.&lt;BR /&gt;
&lt;BR /&gt;
And, PROC PRINT or PROC REPORT can be used to generate a suitable report.&lt;BR /&gt;
&lt;BR /&gt;
You may also find that some tasks can be performed by PROC SQL, if you prefer that language technique.&lt;BR /&gt;
&lt;BR /&gt;
Suggest you make use of the SAS discussion forum archives and the SAS support &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website for SAS-hosted documentation and supplemental technical / conference reference materials.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming intro site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
data step merge by processing site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
set statement indsname site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
proc format table lookup site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
elearn site:sas.com</description>
    <pubDate>Wed, 06 Oct 2010 03:26:46 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-10-06T03:26:46Z</dc:date>
    <item>
      <title>How do I match the field from one dataset to another dataset name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12724#M1410</link>
      <description>There are 45 companies and several employee works in each company.&lt;BR /&gt;
Each company has its unique code &lt;BR /&gt;
EX: AA11, AA12..so on &lt;BR /&gt;
Each emp has a unique id in 16 digit numeric format&lt;BR /&gt;
In my SAS library I have, 90 datasets (name ends with unique code) 2 dataset for each company containing department and hiring information.&lt;BR /&gt;
names of the text files are in following format:&lt;BR /&gt;
Dep_code and Hinfo_code&lt;BR /&gt;
ex Dept_AA11, Hinfo_AA11 (datasets containing Department and hiring information for each Employee id)&lt;BR /&gt;
&lt;BR /&gt;
I have third dataset in SAS named Test which contains Employee id and company code.&lt;BR /&gt;
Now In this dataset, I have to look company code for each Employee id and company code, then need to select the 2 datasets containing Dept and Hiring info from the library ending with the matching code and then create a report containing both the Department and Hiring info.&lt;BR /&gt;
i.e. from the dataset, check the company code for each employee id ,  and then select 2 department and hiring datasets for the matching company code  and match the employee id,  get the Department and hiring info and create the report.&lt;BR /&gt;
&lt;BR /&gt;
I am new to sas..How should I start.&lt;BR /&gt;
Any suggesstion is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
sasuser</description>
      <pubDate>Wed, 06 Oct 2010 01:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12724#M1410</guid>
      <dc:creator>excelsas</dc:creator>
      <dc:date>2010-10-06T01:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match the field from one dataset to another dataset name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12725#M1411</link>
      <description>Is this real life or study excercise?</description>
      <pubDate>Wed, 06 Oct 2010 03:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12725#M1411</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-10-06T03:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match the field from one dataset to another dataset name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12726#M1412</link>
      <description>It's likely that the SAS DATA step process can be used to SET on all company/hiring files if using SAS 9.2, where you can use SET DEPT: (that's a colon character), and also you didn't mention if a SAS variable department (dep_code) is in the DEPT_: / HINFO_: files.  If not, you can interrogate the input file using the SET statement parameter INDSNAME= to interrogate what SAS file is inputting the current observation and capture the file-name suffix to assign dep_code.&lt;BR /&gt;
&lt;BR /&gt;
Either a PROC FORMAT for VALUE look-up or a SAS DATA step MERGE process (with a BY statement and your match-variable list), will work with your SAS programming task to combine the different, but related input files.&lt;BR /&gt;
&lt;BR /&gt;
And, PROC PRINT or PROC REPORT can be used to generate a suitable report.&lt;BR /&gt;
&lt;BR /&gt;
You may also find that some tasks can be performed by PROC SQL, if you prefer that language technique.&lt;BR /&gt;
&lt;BR /&gt;
Suggest you make use of the SAS discussion forum archives and the SAS support &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website for SAS-hosted documentation and supplemental technical / conference reference materials.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming intro site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
data step merge by processing site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
set statement indsname site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
proc format table lookup site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
elearn site:sas.com</description>
      <pubDate>Wed, 06 Oct 2010 03:26:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-match-the-field-from-one-dataset-to-another-dataset/m-p/12726#M1412</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-06T03:26:46Z</dc:date>
    </item>
  </channel>
</rss>

