<?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: blank spaces char after in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288871#M19724</link>
    <description>&lt;P&gt;What is it your trying to do, post test data in the form of a datastep and what the output should look like. &amp;nbsp;The reason is that your code here doesn't make much sense. &amp;nbsp;Just take the first two data steps - these don't do anything, data _null_ doesn't create any output, so the code is pointless. &amp;nbsp;I am finding it very difficult to read the rest of the code which has varying mixed case, no indentations and macro code for no apparent reason.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2016 08:49:17 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-08-02T08:49:17Z</dc:date>
    <item>
      <title>blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288839#M19712</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE BELOW OUTPUT IS FROM THIS MACRO&amp;nbsp;&lt;/P&gt;&lt;P&gt;%MACRO ds2pipe1(dsname, outfile, title1=, title2=,mod=N,date=N,printLabels=N,zip=N);&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;SET WOOLWORTHyday_;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;RUN;&lt;BR /&gt;/*options noxwait; */&lt;BR /&gt;filename data temp;&lt;BR /&gt;proc contents data=&amp;amp;dsname noprint&lt;BR /&gt;out=_tmp_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=_tmp_;&lt;BR /&gt;by varnum;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;* to cater for no more than 100 vars;&lt;BR /&gt;data _null_;&lt;BR /&gt;length name label text $300;&lt;BR /&gt;set _tmp_ end=eof;&lt;BR /&gt;file data;&lt;BR /&gt;if type=2 then&lt;BR /&gt;/*rather export all as quote delimitted to be on the safe side;*/&lt;BR /&gt;name=name;&lt;BR /&gt;if eof then put name ');put info1;';&lt;BR /&gt;else if _n_=1 then do;&lt;BR /&gt;put 'info1= STRIP(' name'||"#"||';&lt;BR /&gt;/*put 'info1= (' name '||""||';*/&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;put 'STRIP(' name ')||"#"||';&lt;BR /&gt;/*put '(' name ')||""||';*/&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;file "&amp;amp;outfile..txt" ls=32767&lt;BR /&gt;%if "&amp;amp;mod"="Y" %then %do;&lt;BR /&gt;mod&lt;BR /&gt;%end;;&lt;BR /&gt;set &amp;amp;dsname end=eof;&lt;BR /&gt;if _n_=1 then do;&lt;BR /&gt;if "&amp;amp;title1" ^="" then do;&lt;BR /&gt;put "&amp;amp;title1";&lt;BR /&gt;put ;&lt;BR /&gt;%if "&amp;amp;title2"^="" %then %do;&lt;BR /&gt;put "&amp;amp;title2";&lt;BR /&gt;%end;&lt;BR /&gt;put ;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;/*%include header;*/&lt;BR /&gt;end;&lt;BR /&gt;%include data;&lt;BR /&gt;%if "&amp;amp;date"="Y" %then %do;&lt;BR /&gt;if eof then do;&lt;BR /&gt;put ;&lt;BR /&gt;_tod=today();&lt;BR /&gt;put "Date printed: " _tod yymmdd10.;&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;BR /&gt;run;&lt;BR /&gt;%if "&amp;amp;zip"="Y" %then %do;&lt;/P&gt;&lt;P&gt;/*options nowait;*/&lt;BR /&gt;data _null_;&lt;BR /&gt;rc=system('zip '||"&amp;amp;outfile..zip &amp;amp;outfile..txt");&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;proc datasets mt=data lib=work nolist nodetails;&lt;BR /&gt;delete _tmp_;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OUTPUT&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;14C#04799#0000011832#0000000000#00641934#0007406199999909#001#KKKONI________#ZZ____#000007000341#000000000M00223353#00000000#000563500.00#000524551.07#00000000#0240#000004996.38#000000000000&amp;nbsp;&lt;FONT color="#00FFFF"&gt;'65 BLANKS'&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#00FFFF"&gt;&amp;nbsp;&lt;/FONT&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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;AFTER THE LAST CHAR I WANT TO PUT MORE 65 BLANK SPACE&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 06:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288839#M19712</guid>
      <dc:creator>thaboseja_gmail_com</dc:creator>
      <dc:date>2016-08-02T06:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288871#M19724</link>
      <description>&lt;P&gt;What is it your trying to do, post test data in the form of a datastep and what the output should look like. &amp;nbsp;The reason is that your code here doesn't make much sense. &amp;nbsp;Just take the first two data steps - these don't do anything, data _null_ doesn't create any output, so the code is pointless. &amp;nbsp;I am finding it very difficult to read the rest of the code which has varying mixed case, no indentations and macro code for no apparent reason.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 08:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288871#M19724</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-02T08:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288876#M19725</link>
      <description>&lt;P&gt;I agree that it is unclear what you need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below tip can help you to add multiple spaces&amp;nbsp;&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 _null_;
put "START"   65*' '    "END";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;65* ' ' would insert 65 blank spaces between START and END&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 09:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/288876#M19725</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-08-02T09:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289971#M19806</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hi below is the data &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;14C&lt;/FONT&gt;#04799#0000011832#0000000000#00507774#0008204125200089#001#ABRAHAMS______#I_____#000007045820#000000000M00950189#00000000#000035000.00#000033230.18#00000000#0360#000000307.91#&lt;FONT color="#FF0000"&gt;000000000000&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;put 'info1= STRIP(' name'||"#"||';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/*put 'info1= (' name '||""||';*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else do;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;put 'STRIP(' name ')||"#"||';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/*put '(' name ')||""||';*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i used strip function to remove spaces and i also used # to separate data.the data for the first column is &amp;nbsp;&lt;FONT color="#FF0000"&gt;14C&lt;/FONT&gt; and the last data is&amp;nbsp;&lt;FONT color="#FF0000"&gt;000000000000&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;from the first column to the last &amp;nbsp;data is 191 in length ,so after this &amp;nbsp;&lt;FONT color="#FF0000"&gt;000000000000&lt;/FONT&gt; i want to add 65 more blank spaces.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2016 12:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289971#M19806</guid>
      <dc:creator>thaboseja_gmail_com</dc:creator>
      <dc:date>2016-08-06T12:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289972#M19807</link>
      <description>hi,can you put blank char and export data with txt&lt;BR /&gt;&lt;BR /&gt;hi below is the data&lt;BR /&gt;14C#04799#0000011832#0000000000#00507774#0008204125200089#001#ABRAHAMS______#I_____#000007045820#000000000M00950189#00000000#000035000.00#000033230.18#00000000#0360#000000307.91#000000000000&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;put 'info1= STRIP(' name'||"#"||';&lt;BR /&gt;/*put 'info1= (' name '||""||';*/&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;put 'STRIP(' name ')||"#"||';&lt;BR /&gt;/*put '(' name ')||""||';*/&lt;BR /&gt;i used strip function to remove spaces and i also used # to separate data.the data for the first column is 14C and the last data is 000000000000&lt;BR /&gt;from the first column to the last data is 191 in length ,so after this 000000000000 i want to add 65 more blank spaces.</description>
      <pubDate>Sat, 06 Aug 2016 12:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289972#M19807</guid>
      <dc:creator>thaboseja_gmail_com</dc:creator>
      <dc:date>2016-08-06T12:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289978#M19808</link>
      <description>&lt;P&gt;I really am having a hard time telling if you want to write all of those characters on one line or on multiple lines.&lt;/P&gt;
&lt;P&gt;If you are writing to a text file using a DATA step and a PUT statement and you want the lines to be exactly 191 characters long you can just put a space in column 191.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try running this litte program and you will see that the second line is 65 characters long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename example temp;
data _null_;
  file example lrecl=32767 ;
  put 'This is a line';
  put 'This is a line with many spaces' @65 ' ';
run;
data _null_;
  infile example;
  input;
  list;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If instead you want to add spaces instead then use the + for cursor movement instead of&amp;nbsp;@ .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put 'some text' +64 ' ';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the value used in both the + and&amp;nbsp;@ can be a reference to a data set variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;strng='stuff to write';
extra_spaces = 191-length(string);
put string +extra_spaces ' ';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2016 14:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289978#M19808</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-08-06T14:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: blank spaces char after</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289979#M19809</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please explain what you are trying to do. It is probably easier to just have the DATA step write the data in the form you need.&lt;/P&gt;
&lt;P&gt;So let's say your actual data looks like this simple data file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input string $50.;
cards;
14C
04799
0000011832
0000000000
00641934
0007406199999909
001
KKKONI________
ZZ____
000007000341
000000000M00223353
00000000
000563500.00
000524551.07
00000000
0240
000004996.38
000000000000
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to write that out to one line with # between the values and an extra 65 blanks after the last value then you could use this data step. &amp;nbsp;The +(-1) will&amp;nbsp;back up over the # delimiter that the PUT automatically generates before a new value when using DSD option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file example dsd dlm='#' lrecl=32767 ;
  set have end=eof ;
  put string @ ;
  if eof then put +(-1) 65*' ';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2016 15:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/blank-spaces-char-after/m-p/289979#M19809</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-08-06T15:43:49Z</dc:date>
    </item>
  </channel>
</rss>

