<?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: Sas Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297918#M62607</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104102"&gt;@xavpontes&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your reply.&amp;nbsp; Even without the %macro and %mend, I don't see this code working. From your answer,&lt;/P&gt;
&lt;P&gt;I could&amp;nbsp;ftp the mainframe file to the PC as a text file. And how&amp;nbsp;would I write it to a folder as sas data set? Thanks.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To repeat myself:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you encounter problems, post the log, including the filename and libname declarations for fileref TGCONT and library CONTROL, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AND I MEAN IT!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2016 06:05:57 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-09-13T06:05:57Z</dc:date>
    <item>
      <title>Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297771#M62565</link>
      <description>&lt;P&gt;I am new to sas macro. If you know of a good book or resource to help me speed up my knowledge please share.&lt;/P&gt;&lt;P&gt;I am trying to download a mainframe file into MS Access to this address C:\2016\Access as a sas data set called&lt;/P&gt;&lt;P&gt;tgcont.&amp;nbsp; Please review my program and make any corrections.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;/* Program Name MACRO_LOAD_TGCONT */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%MACRO&lt;/STRONG&gt; LOAD_TGCONT();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;DATA TGCONT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; INFILE TGCONT MISSOVER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; INPUT @&lt;STRONG&gt;01&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; SSN $CHAR9.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=TGCONT OUT=CONTROL.TGCONT NODUPKEY;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%MEND&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 14:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297771#M62565</guid>
      <dc:creator>xavpontes</dc:creator>
      <dc:date>2016-09-12T14:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297775#M62566</link>
      <description>&lt;P&gt;Since you do not use macro logic, the macro is not necessary at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you encounter problems, post the log, including the filename and libname declarations for fileref TGCONT and library CONTROL, respectively.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 15:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297775#M62566</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-12T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297780#M62568</link>
      <description>&lt;P&gt;Thank you for your reply. You said macro isn't necessary. Please share your solution. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 15:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297780#M62568</guid>
      <dc:creator>xavpontes</dc:creator>
      <dc:date>2016-09-12T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297785#M62569</link>
      <description>&lt;P&gt;Just for us to have anything to look at, you would have to remove two lines from the program (the lines that begin with %MACRO and %MEND).&amp;nbsp; Then run what you have and see what you get.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be helpful to see the DD statements that define TGCONT and CONTROL.&amp;nbsp; Or if there are no DD statements, the SAS statements that define them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would also be helpful to know what SAS software you have that would let a mainframe write to a PC.&amp;nbsp; The two would not normally be connected without additional software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eventually you may need a macro to make the program more flexible.&amp;nbsp; Right now, you just need a working program without any macro language.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 16:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297785#M62569</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-12T16:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297822#M62574</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; Even without the %macro and %mend, I don't see this code working. From your answer,&lt;/P&gt;&lt;P&gt;I could&amp;nbsp;ftp the mainframe file to the PC as a text file. And how&amp;nbsp;would I write it to a folder as sas data set? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 17:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297822#M62574</guid>
      <dc:creator>xavpontes</dc:creator>
      <dc:date>2016-09-12T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297823#M62575</link>
      <description>&lt;P&gt;The structure of a SAS data set is different on a mainframe than on a PC.&amp;nbsp; So the process you are expecting has to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If TGCONT represents a text file (as it would if you were to INPUT variables from it), there is no reason to move it to a SAS data set first.&amp;nbsp; Just move text from the mainframe to the PC, then use a SAS program on the PC to create a SAS data set there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If TGCONT represents a SAS data set, you would probably use a SAS program to dump it to a text file. (Alternatively, use a SAS program to download it to a SAS Transport file, but let's hold off on that conversation.)&amp;nbsp; Then use the above steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, it's difficult to know what you are starting with.&amp;nbsp; What is in TGCONT?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 18:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297823#M62575</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-12T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297918#M62607</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104102"&gt;@xavpontes&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your reply.&amp;nbsp; Even without the %macro and %mend, I don't see this code working. From your answer,&lt;/P&gt;
&lt;P&gt;I could&amp;nbsp;ftp the mainframe file to the PC as a text file. And how&amp;nbsp;would I write it to a folder as sas data set? Thanks.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To repeat myself:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you encounter problems, post the log, including the filename and libname declarations for fileref TGCONT and library CONTROL, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AND I MEAN IT!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-Macro/m-p/297918#M62607</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-13T06:05:57Z</dc:date>
    </item>
  </channel>
</rss>

