<?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 Column Header Validation in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667440#M19409</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some help on creating some form of custom transformation to check the column headers a .csv file has when it get read into DI Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of headers which should be in the table and when the file gets read in if it doesn't contain the correct headers, i want it will get moved to a check file so that the job doesn't fail. Any suggestions on the best way to set this up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jul 2020 13:46:26 GMT</pubDate>
    <dc:creator>Flappyduck</dc:creator>
    <dc:date>2020-07-07T13:46:26Z</dc:date>
    <item>
      <title>Column Header Validation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667440#M19409</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some help on creating some form of custom transformation to check the column headers a .csv file has when it get read into DI Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of headers which should be in the table and when the file gets read in if it doesn't contain the correct headers, i want it will get moved to a check file so that the job doesn't fail. Any suggestions on the best way to set this up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 13:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667440#M19409</guid>
      <dc:creator>Flappyduck</dc:creator>
      <dc:date>2020-07-07T13:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Column Header Validation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667568#M19410</link>
      <description>&lt;P&gt;Unfortunately, I don't have access to DI studio, so I'm not sure how these could be implemented.&lt;/P&gt;
&lt;P&gt;If I were to try this in SAS code, I'd do one of the following:&lt;/P&gt;
&lt;P&gt;1. Read in the file, but write the first line as a text string (if _n_ = 1) to one SAS dataset, and process the rest of the lines normally. In another step, do all of the checking needed on the header line, and then use macro processing to do the correct thing with the data.&lt;/P&gt;
&lt;P&gt;2. Have a very basic data step, that splits the incoming dataset into two files, one with just the first line, and the other with all of the other lines. Then have a checking process to read in and check the one-line file, and set whatever macro variables are needed. Then process the other file, and based on the macro variables do something.&lt;/P&gt;
&lt;P&gt;I hope maybe this gives you some thoughts for things that can be done in DI.&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667568#M19410</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-07T20:21:13Z</dc:date>
    </item>
  </channel>
</rss>

