<?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: format zW. and EG 4.3 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121910#M10096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to solve common problem of importing Excel data - unpredictable data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jun 2013 14:00:20 GMT</pubDate>
    <dc:creator>Oleg_L</dc:creator>
    <dc:date>2013-06-28T14:00:20Z</dc:date>
    <item>
      <title>format zW. and EG 4.3</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121908#M10094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why the code below generates an error in EG 4.3 (SAS 9.2)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;length b $8.;&lt;/P&gt;&lt;P&gt;a='123456';&lt;/P&gt;&lt;P&gt;type=vtype(a);&lt;/P&gt;&lt;P&gt;if type='N' then b=put(a,z8. -l); else b=a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 12:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121908#M10094</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2013-06-28T12:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: format zW. and EG 4.3</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121909#M10095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because of the way DATA step works, the TYPE of the variable is determined at compile time.&amp;nbsp; Therefore, A is always a character type, and your PUT statement with the Zw.d format is "bad syntax" (because only a numeric is valid there).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use an intermediate INPUT function to convert the character value into a number, and then use the Zw.d format to create a version with the leading zeros.&amp;nbsp; I'm guessing your code snippet here is meant to be part of a larger program.&amp;nbsp; If you post more details about the data you have and what you're trying to get to, I'm sure others will provide some good ideas for how to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 13:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121909#M10095</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-06-28T13:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: format zW. and EG 4.3</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121910#M10096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to solve common problem of importing Excel data - unpredictable data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 14:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121910#M10096</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2013-06-28T14:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: format zW. and EG 4.3</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121911#M10097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Oleg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a rough-and-ready macro approach that might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data load;&lt;BR /&gt; a=123456;&lt;BR /&gt; b=123456;&lt;BR /&gt; c='123456';&lt;BR /&gt; d=123456;&lt;BR /&gt; e='123456';&lt;BR /&gt; f='123456';&lt;BR /&gt; g=123456;&lt;BR /&gt; h='123456';&lt;BR /&gt; i=123456;&lt;BR /&gt; j='123456';&lt;BR /&gt; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt; set load(obs=1);&lt;/P&gt;&lt;P&gt; if vtype(a) = 'N' then call symput('asub', 'anum = put(a, z8.);'); else call symput('asub', 'anum = a;');if vtype(b) = 'N' then call symput('bsub', 'bnum = put(b, z8.);'); else call symput('bsub', 'bnum = b;');&lt;BR /&gt; if vtype(c) = 'N' then call symput('csub', 'cnum = put(c, z8.);'); else call symput('csub', 'cnum = c;');&lt;BR /&gt; if vtype(d) = 'N' then call symput('dsub', 'dnum = put(d, z8.);'); else call symput('dsub', 'dnum = d;');&lt;BR /&gt; if vtype(e) = 'N' then call symput('esub', 'enum = put(e, z8.);'); else call symput('esub', 'enum = e;');&lt;BR /&gt; if vtype(f) = 'N' then call symput('fsub', 'fnum = put(f, z8.);'); else call symput('fsub', 'fnum = f;');&lt;BR /&gt; if vtype(g) = 'N' then call symput('gsub', 'gnum = put(g, z8.);'); else call symput('gsub', 'gnum = g;');&lt;BR /&gt; if vtype(h) = 'N' then call symput('hsub', 'hnum = put(h, z8.);'); else call symput('hsub', 'hnum = h;');&lt;BR /&gt; if vtype(i) = 'N' then call symput('isub', 'inum = put(i, z8.);'); else call symput('isub', 'inum = i;');&lt;BR /&gt; if vtype(j) = 'N' then call symput('jsub', 'jnum = put(j, z8.);'); else call symput('jsub', 'jnum = j;');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;length anum bnum cnum dnum enum fnum gnum hnum inum jnum $8.;&lt;BR /&gt;set load;&lt;/P&gt;&lt;P&gt;&amp;amp;asub&lt;BR /&gt;&amp;amp;bsub&lt;BR /&gt;&amp;amp;csub&lt;BR /&gt;&amp;amp;dsub&lt;BR /&gt;&amp;amp;esub&lt;BR /&gt;&amp;amp;fsub&lt;BR /&gt;&amp;amp;gsub&lt;BR /&gt;&amp;amp;hsub&lt;BR /&gt;&amp;amp;isub&lt;BR /&gt;&amp;amp;jsub&lt;BR /&gt;&amp;amp;ksub&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Jun 2013 20:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121911#M10097</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-06-29T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: format zW. and EG 4.3</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121912#M10098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 04:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/format-zW-and-EG-4-3/m-p/121912#M10098</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2013-07-01T04:44:51Z</dc:date>
    </item>
  </channel>
</rss>

