<?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 truncation of rows while running proc sql in sas macro, please help. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82981#M17907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir, i am trying this requirement on AIX (unix) machine. And the db2 database i am connecting to in proc sql is also hosted on AIX server. ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have mostly worked with oracle databases over unix , and generating a flat file by querying db tables does not have such limitations. SAS is deemed much roboust and i am needing to study more to achieve a often generic need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Sep 2013 17:34:46 GMT</pubDate>
    <dc:creator>Ashfaq_BOA</dc:creator>
    <dc:date>2013-09-15T17:34:46Z</dc:date>
    <item>
      <title>Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82975#M17901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi folks,&amp;nbsp; i am trying to generate a data file by running a proc sql step having a select query from database table.&lt;/P&gt;&lt;P&gt;i am selecting many columns in the multi-table select.&lt;/P&gt;&lt;P&gt;and set options as "options nonumber nocenter nolabel nodate pagesize=MAX linesize=MAX;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the data in each row is getting truncated to 256 chars&amp;nbsp; in the listing file that is generated ( while my data is way beyond 400 chars per selected row)&lt;/P&gt;&lt;P&gt;Please could someone help what other options i may have to achieve my requirement to dump data from database tables to a .txt file (to be sent to other downstream application).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide a pseudo code if possible.&amp;nbsp; ( i just started studying and coding sas macro and have no formal training with this tech)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 15:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82975#M17901</guid>
      <dc:creator>Ashfaq_BOA</dc:creator>
      <dc:date>2013-09-15T15:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82976#M17902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The default linesize off&lt;STRONG&gt; all IO in&lt;/STRONG&gt; Windows/Unix is that length of 255.&lt;/P&gt;&lt;P&gt;At the options statement it is just defning the old classic dms approach off the output file (output window / log window / editor window).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining an interface file in the old historical way of defining an file lays-out by yourself will need some programming as:&lt;/P&gt;&lt;P&gt;- using the datastep&lt;/P&gt;&lt;P&gt;- dinfing the needed technical attributes along with the file statement (filename)&amp;nbsp; &lt;/P&gt;&lt;P&gt;- using put statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As being very tedious and needing those skills all those interface connectors has been introduced as.&lt;/P&gt;&lt;P&gt;- using SQL with SAS/ACCESS to exterenal dbms&lt;/P&gt;&lt;P&gt;- XML file formatting (many subtypes)&lt;/P&gt;&lt;P&gt;- proc import/export wiht file pc file formats&lt;/P&gt;&lt;P&gt;- Encoding standards like codepages Unicode&lt;/P&gt;&lt;P&gt;All is related and dependant to the used environments and versions. Possible having some additional restrictions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are possible feeling with this you have given to little information to give a good answer.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 15:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82976#M17902</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-09-15T15:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82977#M17903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jaap with your swift response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i googled through many pages to try file statement and also ods clause, but since i am novoice with this tech i am not sure how this goes with&amp;nbsp; "proc sql"&lt;/P&gt;&lt;P&gt;The other options you suggested may work well. However ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- i have-to/am invoking the sas macro from AIX unix shell script to be able to automate this as a daily job producing the .txt file output&lt;/P&gt;&lt;P&gt;- then use the ndm on unix to&amp;nbsp; send the file to a downstream system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( my job is at stake :S )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 15:57:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82977#M17903</guid>
      <dc:creator>Ashfaq_BOA</dc:creator>
      <dc:date>2013-09-15T15:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82978#M17904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the format or the length of the variable set to 256? Run a proc contents on your data to check this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you talking about a row or a specific character variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post your code and the sample output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 16:52:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82978#M17904</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-15T16:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82979#M17905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the excerpt of the code i am trying (cannot put the entire code for compliance reason, the colums in the select are | concatenated to form a single line for each row returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have set the options in data step as "pagesize=MAX linesize=MAX;" The MAX for linesize defaults to 256, even setting to a bigger value say 1000 does not desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=============================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect to db2(database=&amp;amp;dbase authdomain="AAA");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table Gen_UnionQuery_Data as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from connection to db2&lt;/P&gt;&lt;P&gt;&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;&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;&amp;nbsp; SELECT T.OUTPUT FROM (&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; select query with many coulums from a multi-table join &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disconnect from db2;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp;&lt;BR /&gt;set Gen_UnionQuery_Data;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;options nonumber nocenter nolabel nodate pagesize=MAX linesize=MAX;&lt;BR /&gt;titlel;&lt;BR /&gt;proc print data=temp noobs;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=============================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check an help ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 17:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82979#M17905</guid>
      <dc:creator>Ashfaq_BOA</dc:creator>
      <dc:date>2013-09-15T17:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82980#M17906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ashfaq,&amp;nbsp; as you are starting to code in SAS avoid the word macro for that. &lt;BR /&gt;SAS-macros are used in advanced techniques modifying preparing the sas code in a more dynamic way.&lt;/P&gt;&lt;P&gt;Understandable samples to do your work will be most usefull for you. The mind loop for that is: you need to know the solution to find examples.&lt;/P&gt;&lt;P&gt;As yoy are telling having varaibles with al length up to 400 this could be another issue resulting in a tremendous long record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n15o12lpyoe4gfn1y1vcp6xs6966.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n15o12lpyoe4gfn1y1vcp6xs6966.htm"&gt;SAS(R) 9.4 Statements: Reference&lt;/A&gt; (File statement)&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n1spe7nmkmi7ywn175002rof97fv.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n1spe7nmkmi7ywn175002rof97fv.htm"&gt;SAS(R) 9.4 Statements: Reference&lt;/A&gt; (put statement)&lt;/P&gt;&lt;P&gt;You could process the sas dataset "temp" to dat defining a fixed&amp;nbsp; structure of your txt file,&lt;/P&gt;&lt;P&gt;As you are indicating db2. It could be a mainframe dbms. What machine-types are you working on? .&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 17:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82980#M17906</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-09-15T17:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82981#M17907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir, i am trying this requirement on AIX (unix) machine. And the db2 database i am connecting to in proc sql is also hosted on AIX server. ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have mostly worked with oracle databases over unix , and generating a flat file by querying db tables does not have such limitations. SAS is deemed much roboust and i am needing to study more to achieve a often generic need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 17:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82981#M17907</guid>
      <dc:creator>Ashfaq_BOA</dc:creator>
      <dc:date>2013-09-15T17:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data truncation of rows while running proc sql in sas macro, please help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82982#M17908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Unix (Aix Linux IOS Android etc) is a little bit different as working on Windows.&amp;nbsp; As:&lt;/P&gt;&lt;P&gt;- no drive-letters but mount-points.&lt;/P&gt;&lt;P&gt;- using the / instead of the \&lt;/P&gt;&lt;P&gt;- case sensitive as file namings in upper and lower case are really different files&lt;/P&gt;&lt;P&gt;&amp;nbsp; For advice:&amp;nbsp; use just lower case within file names.&lt;/P&gt;&lt;P&gt;- cr-lf (Windows) convention as being lf (or newline&amp;nbsp; nl) in Unix&lt;/P&gt;&lt;P&gt;- using terminal emulators like putty and winscp (filetransfer) being normal to go to the black hole access.&lt;/P&gt;&lt;P&gt;- a simple effective but mostly very bad understood security approach.&lt;/P&gt;&lt;P&gt;When being a newby in this it is very easy to maker failures on those Unix limitations. Adding some Sas behavior on top of that can become confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SAS EGuide (BI/DI server) there is a good transparant approach for most common tasks.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Building and testing the wanted sas code should be easy with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 18:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-truncation-of-rows-while-running-proc-sql-in-sas-macro/m-p/82982#M17908</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-09-15T18:46:02Z</dc:date>
    </item>
  </channel>
</rss>

