<?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: Data Step: trailing @@ for GWAS genotype data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679784#M205305</link>
    <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is data step read syntax, then an actual example of the text to read would be helpful.&lt;/P&gt;
&lt;P&gt;Things like the number and consistency of spaces, commas and other characters are very likely to play a role in reading a complex layout. Even things like the structure of your non-problem variables are an issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You show examples as triplets that are comma delimited inside () but the code you show would not read those. So that makes actual example data more critical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like there should be a fixed number of triplets, so perhaps an array based read will work.&lt;/P&gt;
&lt;P&gt;This example reads 2 triplets. If the data looks at all like yours then replace 2 with the number of triplets involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   infile datalines ;
   input id $ @;
   array AA{2};
   array AB{2};
   array BB{2}; 
   do i=1 to 2;
     input AA[i] AB[i] BB[i] @;
   end;
   input;
   do i=1 to 2;
      P_AA=AA[i];
      P_AB=AB[i];
      P_BB=BB[i];
      output;
   end;
   keep id  P_AA P_AB P_BB;

datalines;
abc   0.873 0.127 0.002    0.893 0.927 0.092 
pdq   0.973 0.197 0.902    0.879 0.129 0.009 
xyz   0.883 0.128 0.082    0.878 0.187 0.802 
;



&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 17:02:49 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-27T17:02:49Z</dc:date>
    <item>
      <title>Data Step: trailing @@ for GWAS genotype data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679762#M205292</link>
      <description>&lt;P&gt;I have been sent some genotype data and need help reading it into SAS.&lt;/P&gt;&lt;P&gt;Two files: first is a listing of subjects (text file with .&lt;EM&gt;sample&lt;/EM&gt; extension); second is a single record containing the genotype data (text file with .&lt;EM&gt;gen&lt;/EM&gt; extension).&lt;/P&gt;&lt;P&gt;The .&lt;EM&gt;gen&lt;/EM&gt; file starts (this is made up data):&amp;nbsp; &lt;FONT color="#0000ff"&gt;19&amp;nbsp; rs123456 12345678 T G 0 0 1 0.873 0.127 0.002&lt;/FONT&gt;... etc to column 38064 and is only one record.&lt;/P&gt;&lt;P&gt;The first five items in the .&lt;EM&gt;gen&lt;/EM&gt; file are the: chromosome=&lt;FONT color="#0000ff"&gt;19&lt;/FONT&gt;, SNP ID=&lt;FONT color="#0000ff"&gt;rs123456&lt;/FONT&gt;, position=&lt;FONT color="#0000ff"&gt;12345678&lt;/FONT&gt;, allele A='&lt;FONT color="#0000ff"&gt;T&lt;/FONT&gt;' and allele B='&lt;FONT color="#0000ff"&gt;G&lt;/FONT&gt;'&lt;/P&gt;&lt;P&gt;The next items are triplets of numbers (allele frequencies).&amp;nbsp; The first three numbers (&lt;FONT color="#0000ff"&gt;0, 0, 1&lt;/FONT&gt;) relate to the first record in the .&lt;EM&gt;sample&lt;/EM&gt; file and can be called P_AA, P_AB, P_BB, the second three numbers ( &lt;FONT color="#0000ff"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; 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;FONT color="#0000ff"&gt;0.873&lt;/FONT&gt;, &lt;FONT color="#0000ff"&gt;0.127, 0.002 &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;) relate to the second record (with same variable name P_AA, P_AB, P_BB). And so on.&amp;nbsp; Every triplet corresponds to a subject in the .&lt;EM&gt;sample&lt;/EM&gt; file, based on the ordering in both data files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I edit the .&lt;EM&gt;gen&lt;/EM&gt; file and remove the "&lt;FONT color="#0000ff"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; 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;FONT color="#0000ff"&gt;19&amp;nbsp; rs123456 12345678 T&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;G&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt; " from the start of the .&lt;EM&gt;gen&lt;/EM&gt; file I can read the data using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile 'myfile.gen' dlm=' ' lrecl=38039;
input P_AA P_AB P_BB @@;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And then 1:1 merge this with .&lt;EM&gt;sample&lt;/EM&gt; file, and get what I want.&amp;nbsp; It's a solution , but there must be a better way.&lt;/P&gt;&lt;P&gt;What I would like to do is read the original .&lt;EM&gt;gen&lt;/EM&gt; file, essentially starting from column 26. &amp;nbsp; I tried :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input @26  P_AA P_AB P_BB @@;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But his does not work.&amp;nbsp; I tried other variations using two input lines, but no luck.&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions?&amp;nbsp; This data structure is common in genotyping and GWAS, so I feel someone (smarter than me) must have solved this before.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Michael.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 15:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679762#M205292</guid>
      <dc:creator>Alchemi</dc:creator>
      <dc:date>2020-08-27T15:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step: trailing @@ for GWAS genotype data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679784#M205305</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is data step read syntax, then an actual example of the text to read would be helpful.&lt;/P&gt;
&lt;P&gt;Things like the number and consistency of spaces, commas and other characters are very likely to play a role in reading a complex layout. Even things like the structure of your non-problem variables are an issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You show examples as triplets that are comma delimited inside () but the code you show would not read those. So that makes actual example data more critical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like there should be a fixed number of triplets, so perhaps an array based read will work.&lt;/P&gt;
&lt;P&gt;This example reads 2 triplets. If the data looks at all like yours then replace 2 with the number of triplets involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   infile datalines ;
   input id $ @;
   array AA{2};
   array AB{2};
   array BB{2}; 
   do i=1 to 2;
     input AA[i] AB[i] BB[i] @;
   end;
   input;
   do i=1 to 2;
      P_AA=AA[i];
      P_AB=AB[i];
      P_BB=BB[i];
      output;
   end;
   keep id  P_AA P_AB P_BB;

datalines;
abc   0.873 0.127 0.002    0.893 0.927 0.092 
pdq   0.973 0.197 0.902    0.879 0.129 0.009 
xyz   0.883 0.128 0.082    0.878 0.187 0.802 
;



&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 17:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679784#M205305</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-27T17:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step: trailing @@ for GWAS genotype data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679805#M205315</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343518"&gt;@Alchemi&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can move the pointer to column 26 with an INPUT statement that is executed only in the first iteration of the DATA step and then continue reading with the "@@" modifier until the end of the file (see &lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1rill4udj0tfun1fvce3j401plo.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p07e0pcmalha21n150e511bdo67f" target="_blank" rel="noopener"&gt;EOF= option&lt;/A&gt;).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile 'myfile.gen' eof=finish lrecl=38039;
if _n_=1 then input @26 @;
input P_AA P_AB P_BB @@;
return;
finish: stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 16:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679805#M205315</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-08-27T16:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step: trailing @@ for GWAS genotype data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679869#M205344</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I'd like to summarize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are example datasets:&lt;/P&gt;&lt;P&gt;subjects.sample (header, second record, and then 4 subject records, but my real data had more subjects)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;ID_1 ID_2 missing sex status&lt;BR /&gt;0 0 0 D B&lt;BR /&gt;A123E123 A123E123 0 0 -9&lt;BR /&gt;A123F456 A123F456 0 0 -9&lt;BR /&gt;A123G789 A123G789 0 0 -9&lt;BR /&gt;A456G123 A456G123 0 0 -9&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;genotype.gen (single record, this is a truncated example but my real data had length 30,000 characters with many more triplets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;19&amp;nbsp; rs123456 12345678 T G 0 0 1 0.873 0.127 0.002 0.252 0.746 0 0 1 0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;My solution was to edit the above to get simple triplets&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;editedgenotype.gen&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;0 0 1 0.873 0.127 0.002 0.252 0.746 0 0 1 0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test0;
infile 'Q:\USERS\MEJones\temp\subjects.sample' dlm=' ' firstobs=3;
input ID_1 $ ID_2 $ missing $ sex $ status $;
run;

data test1;
infile 'Q:\USERS\MEJones\temp\editedgenotype.gen' dlm=' ' lrecl=43;
input P_AA P_AB P_BB @@;
run;

data all;
merge test0 test1;
run;

proc print data=all;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;My output&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;The SAS System&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs ID_1 ID_2 missing sex status P_AA P_AB P_BB1234 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A123E123&lt;/TD&gt;&lt;TD&gt;A123E123&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;1.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A123F456&lt;/TD&gt;&lt;TD&gt;A123F456&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.873&lt;/TD&gt;&lt;TD&gt;0.127&lt;/TD&gt;&lt;TD&gt;0.002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A123G789&lt;/TD&gt;&lt;TD&gt;A123G789&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.252&lt;/TD&gt;&lt;TD&gt;0.746&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A456G123&lt;/TD&gt;&lt;TD&gt;A456G123&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;1.000&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution from&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_blank" rel="noopener"&gt;FreelanceReinhard&lt;/A&gt;&amp;nbsp;&lt;SPAN style="box-sizing: border-box;"&gt;Amethyst&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test2;
infile 'Q:\USERS\MEJones\temp\genotype.gen' dlm=' ' lrecl=69  eof=finish ;
if _n_=1 then input @26 @;
input P_AA P_AB P_BB @@;
return;
finish: stop;
run;

data new;
merge test0 test2;
run;
proc print data=new;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Reads the original dataset with no need to edit it&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt; and produces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;The SAS System&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs ID_1 ID_2 missing sex status P_AA P_AB P_BB1234 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A123E123&lt;/TD&gt;&lt;TD&gt;A123E123&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;1.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A123F456&lt;/TD&gt;&lt;TD&gt;A123F456&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.873&lt;/TD&gt;&lt;TD&gt;0.127&lt;/TD&gt;&lt;TD&gt;0.002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A123G789&lt;/TD&gt;&lt;TD&gt;A123G789&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.252&lt;/TD&gt;&lt;TD&gt;0.746&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A456G123&lt;/TD&gt;&lt;TD&gt;A456G123&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-9&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;TD&gt;1.000&lt;/TD&gt;&lt;TD&gt;0.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
      Licensed to INSTITUTE OF CANCER RESEARCH, Site 70092393.
NOTE: This session is executing on the W32_8PRO  platform.



NOTE: Updated analytical products:

      SAS/STAT 14.1
      SAS/ETS 14.1
      SAS/OR 14.1
      SAS/IML 14.1
      SAS/QC 14.1

NOTE: Additional host information:

 W32_8PRO WIN 6.2.9200  Workstation

NOTE: SAS initialization used:
      real time           2.06 seconds
      cpu time            0.71 seconds

1    data test0;
2    infile 'Q:\USERS\MEJones\temp\subjects.sample' dlm=' ' firstobs=3;
3    input ID_1 $ ID_2 $ missing $ sex $ status $;
4    run;

NOTE: The infile 'Q:\USERS\MEJones\temp\subjects.sample' is:
      Filename=Q:\USERS\MEJones\temp\subjects.sample,
      RECFM=V,LRECL=32767,File Size (bytes)=143,
      Last Modified=27 August 2020 19:04:52 o'clock,
      Create Time=27 August 2020 18:58:53 o'clock

NOTE: 4 records were read from the infile
      'Q:\USERS\MEJones\temp\subjects.sample'.
      The minimum record length was 24.
      The maximum record length was 24.
NOTE: The data set WORK.TEST0 has 4 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds


5
6    data test1;
7    infile 'Q:\USERS\MEJones\temp\editedgenotype.gen' dlm=' ' lrecl=43
7  ! ;
8    input P_AA P_AB P_BB @@;
9    run;

NOTE: The infile 'Q:\USERS\MEJones\temp\editedgenotype.gen' is:
      Filename=Q:\USERS\MEJones\temp\editedgenotype.gen,
      RECFM=V,LRECL=43,File Size (bytes)=45,
      Last Modified=27 August 2020 19:04:29 o'clock,
      Create Time=27 August 2020 19:04:29 o'clock

NOTE: 1 record was read from the infile
      'Q:\USERS\MEJones\temp\editedgenotype.gen'.
      The minimum record length was 43.
      The maximum record length was 43.
NOTE: SAS went to a new line when INPUT statement reached past the end
      of a line.
NOTE: The data set WORK.TEST1 has 4 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds


10
11   data all;
12   merge test0 test1;
13   run;

NOTE: There were 4 observations read from the data set WORK.TEST0.
NOTE: There were 4 observations read from the data set WORK.TEST1.
NOTE: The data set WORK.ALL has 4 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds


14
15   proc print data=all;
NOTE: Writing HTML Body file: sashtml.htm
16   run;

NOTE: There were 4 observations read from the data set WORK.ALL.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.34 seconds
      cpu time            0.06 seconds


17
18
19   data test2;
20   infile 'Q:\USERS\MEJones\temp\genotype.gen' dlm=' ' lrecl=69
20 ! eof=finish ;
21   if _n_=1 then input &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/250606"&gt;@26&lt;/a&gt; @;
22   input P_AA P_AB P_BB @@;
23   return;
24   finish: stop;
25   run;

NOTE: The infile 'Q:\USERS\MEJones\temp\genotype.gen' is:
      Filename=Q:\USERS\MEJones\temp\genotype.gen,
      RECFM=V,LRECL=69,File Size (bytes)=71,
      Last Modified=27 August 2020 19:01:18 o'clock,
      Create Time=27 August 2020 18:59:38 o'clock

NOTE: 1 record was read from the infile
      'Q:\USERS\MEJones\temp\genotype.gen'.
      The minimum record length was 69.
      The maximum record length was 69.
NOTE: SAS went to a new line when INPUT statement reached past the end
      of a line.
NOTE: The data set WORK.TEST2 has 4 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.06 seconds
      cpu time            0.03 seconds


26
27   data new;
28   merge test0 test2;
29   run;

NOTE: There were 4 observations read from the data set WORK.TEST0.
NOTE: There were 4 observations read from the data set WORK.TEST2.
NOTE: The data set WORK.NEW has 4 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds


30   proc print data=new;
31   run;

NOTE: There were 4 observations read from the data set WORK.NEW.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 18:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step-trailing-for-GWAS-genotype-data/m-p/679869#M205344</guid>
      <dc:creator>Alchemi</dc:creator>
      <dc:date>2020-08-27T18:41:45Z</dc:date>
    </item>
  </channel>
</rss>

