<?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: Importing TSV file to SAS _date of birth issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575198#M162644</link>
    <description>&lt;P&gt;If you already know the date format, DO NOT use an "any" format. Especially not the one for datetimes when you want to read dates.&lt;/P&gt;
&lt;P&gt;For a date in YY/MM/DD format, use the YYMMDD8. informat.&lt;/P&gt;
&lt;P&gt;BTW, who in his right mind uses a two-digit year anymore? The Y2K scare should have been enough to convince even a very unintelligent person to use FOUR digits! And you will have centenarians that are considered to be toddlers.&lt;/P&gt;</description>
    <pubDate>Sun, 21 Jul 2019 11:53:35 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-21T11:53:35Z</dc:date>
    <item>
      <title>Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575196#M162643</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about importing TSV file to sas.&lt;/P&gt;&lt;P&gt;the datafile has got date of birth variable ( yy/mm/dd). However, we importing the data, this variable is missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;data want;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;Filename&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Alii &lt;/SPAN&gt;'E:\want.tsv' encoding='utf8';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;infile Alii delimiter='09'x MISSOVER DSD lrecl=32767 firstobs=2 ;informat male_head_birth anydtdtm40. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; /*&lt;/SPAN&gt;for all variables&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;informat ID_date_birth anydtdtm40. ;&lt;/P&gt;&lt;P&gt;format &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;ID_date_birth&lt;/SPAN&gt; datetime. ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;ID_date_birth&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if _ERROR_ then call symputx('_EFIERR_',1);&amp;nbsp; /* set ERROR detection macro variable */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 11:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575196#M162643</guid>
      <dc:creator>ali_far</dc:creator>
      <dc:date>2019-07-21T11:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575198#M162644</link>
      <description>&lt;P&gt;If you already know the date format, DO NOT use an "any" format. Especially not the one for datetimes when you want to read dates.&lt;/P&gt;
&lt;P&gt;For a date in YY/MM/DD format, use the YYMMDD8. informat.&lt;/P&gt;
&lt;P&gt;BTW, who in his right mind uses a two-digit year anymore? The Y2K scare should have been enough to convince even a very unintelligent person to use FOUR digits! And you will have centenarians that are considered to be toddlers.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 11:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575198#M162644</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-21T11:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575199#M162645</link>
      <description>Hi,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I dont have the format of the date from the TSV file( I should not have written that format).However, in the similar datafile I have ( I imported them from TSV to SAS with the similar code) the format of the variable (numeric) is DATETIME16.&lt;BR /&gt;&lt;BR /&gt;If I dont use any format then the variable will only contain the year!&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Jul 2019 12:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575199#M162645</guid>
      <dc:creator>ali_far</dc:creator>
      <dc:date>2019-07-21T12:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575203#M162647</link>
      <description>&lt;P&gt;Show an example of a couple of the lines from the file you are reading.&amp;nbsp; Use the Insert Code icon (looks like {i}) on the menu bar to get a pop-up window where you can paste in the lines. THis will preserve the formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to read the dates as actual DATE values instead of DATETIME values then use an INFORMAT that will create a date value (like YYMMDD.) and use a format that works on date values (like YYMMDD10.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your program does not have any INPUT statement.&amp;nbsp; So all of the variables will be missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 15:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575203#M162647</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-21T15:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575223#M162660</link>
      <description>&lt;P&gt;1. FILENAME statement needs to be before the PROC if you're using one (orange)&lt;/P&gt;
&lt;P&gt;2. 99% of the time you want TRUNCOVER instead of MISSOVER (purple)&lt;/P&gt;
&lt;P&gt;3. I have no idea what that line with just a variable name is supposed to be doing (green)&lt;/P&gt;
&lt;P&gt;4. You have no INPUT statement to actually read any variables from a file. You have to read all variables and then you can choose what to keep and what to leave via a DROP or KEEP statement. &amp;nbsp;(Red).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT size="5" color="#FF6600"&gt;&lt;STRONG&gt;Filename Alii 'E:\want.tsv' encoding='utf8';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;data want;

%let _EFIERR_ = 0; /* set the ERROR detection macro variable */


infile Alii delimiter='09'x &lt;FONT size="5" color="#800080"&gt;&lt;STRONG&gt;TRUNCOVER&lt;/STRONG&gt;&lt;/FONT&gt; DSD lrecl=32767 firstobs=2 ;

informat male_head_birth anydtdtm40. ;
 informat ID_date_birth anydtdtm40. ;
format ID_date_birth datetime. ;


&lt;FONT size="5" color="#008000"&gt;&lt;STRONG&gt;ID_date_birth;&lt;/STRONG&gt;&lt;/FONT&gt;

&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;INPUT .... list of variables go here.....;&lt;/STRONG&gt;&lt;/FONT&gt;
 
if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
run;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149294"&gt;@ali_far&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question about importing TSV file to sas.&lt;/P&gt;
&lt;P&gt;the datafile has got date of birth variable ( yy/mm/dd). However, we importing the data, this variable is missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;data want;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;Filename&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Alii &lt;/SPAN&gt;'E:\want.tsv' encoding='utf8';&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;infile Alii delimiter='09'x MISSOVER DSD lrecl=32767 firstobs=2 ;informat male_head_birth anydtdtm40. ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; /*&lt;/SPAN&gt;for all variables&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;informat ID_date_birth anydtdtm40. ;&lt;/P&gt;
&lt;P&gt;format &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;ID_date_birth&lt;/SPAN&gt; datetime. ;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;ID_date_birth&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if _ERROR_ then call symputx('_EFIERR_',1);&amp;nbsp; /* set ERROR detection macro variable */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 20:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575223#M162660</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-21T20:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575253#M162679</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; for sharing your thoughts.&lt;BR /&gt;Actually, I had tried TRUNCOVER before but It did not work.&lt;BR /&gt;In terms of Input statement, Of course, it is must and I had it in the code before entering the range of variables but I forgot to write it here!&lt;BR /&gt;&lt;BR /&gt;One thing I found is that when I import the variable individually (only one id_birth) it looks fine. but when I even import two variables ( two id_birth ) one of them will be completely missing. and when I run the whole code all id_birth variables are missing.&lt;BR /&gt;Do you have any idea about it?&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 02:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575253#M162679</guid>
      <dc:creator>ali_far</dc:creator>
      <dc:date>2019-07-22T02:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575260#M162681</link>
      <description>One guess is that your delimiter is not what you think it is.  The other is that your INPUT statement is wrong. For reading from a delimited file you just want to list the variables. If you decide you have to include an informat specification in the INPUT statement then make sure the prefix it with a colon to prevent SAS from reading a fixed number of characters and ignoring the delimiters.&lt;BR /&gt;To get real answers show the log of the code you actually ran.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 03:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575260#M162681</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-22T03:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575273#M162691</link>
      <description>&lt;P&gt;Provide an example of the data,&amp;nbsp;&lt;EM&gt;as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;already asked you to do.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Help us to help you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 06:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575273#M162691</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-22T06:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575351#M162731</link>
      <description>Hi,&lt;BR /&gt;Here is the log of the code which has been run.&lt;BR /&gt;No errors.! but the Id_date_birth are missing. Again if I just import these variables they will be imported properly.&lt;BR /&gt;&lt;BR /&gt;660 Filename Alii'D:\want.tsv' encoding='utf8';&lt;BR /&gt;661&lt;BR /&gt;662 data want;&lt;BR /&gt;663 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;664 infile Alii delimiter='09'x TRUNCOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;665&lt;BR /&gt;666 informat panel_year best32. ;&lt;BR /&gt;667 informat projection_factor best32. ;&lt;BR /&gt;668 informat projection_factor_magnet best32. ;&lt;BR /&gt;669 informat Id_Date_birth_1 anydtdtm40. ;&lt;BR /&gt;670 informat Id_Date_birth_2 anydtdtm40. ;&lt;BR /&gt;671 informat dma_code best32. ;&lt;BR /&gt;672&lt;BR /&gt;673 format panel_year best12. ;&lt;BR /&gt;674 format projection_factor best12. ;&lt;BR /&gt;675 format projection_factor_magnet best12. ;&lt;BR /&gt;676 format Id_Date_birth_1 datetime. ;&lt;BR /&gt;677 format Id_Date_birth_2 datetime. ;&lt;BR /&gt;678 format dma_code best12. ;&lt;BR /&gt;679&lt;BR /&gt;680 input&lt;BR /&gt;681 panel_year&lt;BR /&gt;682 projection_factor&lt;BR /&gt;683 projection_factor_magnet&lt;BR /&gt;684 Id_Date_birth_1&lt;BR /&gt;685 Id_Date_birth_2&lt;BR /&gt;686 dma_code&lt;BR /&gt;687&lt;BR /&gt;688 ;&lt;BR /&gt;689 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;BR /&gt;690 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The infile Alii is:&lt;BR /&gt;Filename=D:\want.tsv,&lt;BR /&gt;RECFM=V,LRECL=131068,&lt;BR /&gt;File Size (bytes)=10131988,&lt;BR /&gt;Last Modified=11Jul2018:23:45:43,&lt;BR /&gt;Create Time=19Jul2019:16:20:57&lt;BR /&gt;&lt;BR /&gt;NOTE: 63150 records were read from the infile Alii.&lt;BR /&gt;The minimum record length was 130.&lt;BR /&gt;The maximum record length was 220.&lt;BR /&gt;NOTE: The data set WORK.want has 63150 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.15 seconds&lt;BR /&gt;cpu time 0.14 seconds&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:55:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575351#M162731</guid>
      <dc:creator>ali_far</dc:creator>
      <dc:date>2019-07-22T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575361#M162736</link>
      <description>&lt;P&gt;The code looks fine (other than the unneeded informats and formats for the numeric variables).&lt;/P&gt;
&lt;P&gt;There is no variable named&amp;nbsp;&lt;SPAN&gt;Id_date_birth mentioned in the data step however. There are two other variables instead.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Id_date_birth_1 and&amp;nbsp;Id_date_birth_2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show one of the lines form the file that you think has a valid date that the code is not reading.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575361#M162736</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-22T13:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Importing TSV file to SAS _date of birth issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575411#M162756</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149294"&gt;@ali_far&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;Here is the log of the code which has been run.&lt;BR /&gt;No errors.! but the Id_date_birth are missing. Again if I just import these variables they will be imported properly.&lt;BR /&gt;&lt;BR /&gt;660 Filename Alii'D:\want.tsv' encoding='utf8';&lt;BR /&gt;661&lt;BR /&gt;662 data want;&lt;BR /&gt;663 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;664 infile Alii delimiter='09'x TRUNCOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;665&lt;BR /&gt;666 informat panel_year best32. ;&lt;BR /&gt;667 informat projection_factor best32. ;&lt;BR /&gt;668 informat projection_factor_magnet best32. ;&lt;BR /&gt;669 informat Id_Date_birth_1 anydtdtm40. ;&lt;BR /&gt;670 informat Id_Date_birth_2 anydtdtm40. ;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;WHICH Id_date_birth is missing. The proc import codes that you have two variables that could be the one you are talking about.&lt;/P&gt;
&lt;P&gt;And SAS would not be using anydtdtm40. as an informat if the value did not appear to contain time values along with the date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If, as you say, the date portion is formatted as &amp;nbsp;yy/mm/dd &lt;STRONG&gt;you&lt;/STRONG&gt; can change the generated code to use a different informat and format.&lt;/P&gt;
&lt;P&gt;Probably&lt;/P&gt;
&lt;P&gt;informat Id_Date_birth_1 Id_Date_birth_2 yymmdd10. ;&lt;/P&gt;
&lt;P&gt;would work just fine to read PART of the date from a longer string.&lt;/P&gt;
&lt;P&gt;If your value is a 2-digit year you may need yymmdd8.&lt;/P&gt;
&lt;P&gt;Use a matching format assignment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But ACTUAL examples of the file really help getting code that works.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 15:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-TSV-file-to-SAS-date-of-birth-issue/m-p/575411#M162756</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-22T15:13:17Z</dc:date>
    </item>
  </channel>
</rss>

