<?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 $Z was not found or could not be loaded in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694698#M211875</link>
    <description>&lt;P&gt;Character variables require character formats. So the data step compiler converted the attempt to use the numeric Z format with the character variable&amp;nbsp;NCRPV1 into a request for the character format $Z.&amp;nbsp; SAS does not delivery such a format and it couldn't find a user defined one either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You first need to figure out whether&amp;nbsp;NCRPV1 is supposed to be numeric or character in order to decide if you need to change your program or change your data.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 21:22:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-10-27T21:22:25Z</dc:date>
    <item>
      <title>Format $Z was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694691#M211871</link>
      <description>&lt;P&gt;I have a variable that is character that I am trying to convert numeric and ensure leading zeros. I have attempted the following, but get the message:&amp;nbsp;Format $Z was not found or could not be loaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;length ocounty $2. oid $6.;
	if NCRPV1   ne . then ocounty 	= strip(put(NCRPV1,z2.));&lt;/PRE&gt;
&lt;P&gt;Can someone help resolve this?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 21:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694691#M211871</guid>
      <dc:creator>raivester</dc:creator>
      <dc:date>2020-10-27T21:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Format $Z was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694696#M211873</link>
      <description>&lt;P&gt;Try to make you numeric and then convert back to char using Z format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;strip(put(input(NCRPV1,32.),z2.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can't apply a Z format for a char value. You need your value to standard numeric data. So you need INPUT function first&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 21:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694696#M211873</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-27T21:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Format $Z was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694697#M211874</link>
      <description>&lt;P&gt;To convert character to numeric, you need the INPUT function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ocounty  = input(NCRPV1,2.);
format ocounty z2.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But if the data is some kind of a code for something, keep it as character.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 21:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694697#M211874</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-27T21:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format $Z was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694698#M211875</link>
      <description>&lt;P&gt;Character variables require character formats. So the data step compiler converted the attempt to use the numeric Z format with the character variable&amp;nbsp;NCRPV1 into a request for the character format $Z.&amp;nbsp; SAS does not delivery such a format and it couldn't find a user defined one either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You first need to figure out whether&amp;nbsp;NCRPV1 is supposed to be numeric or character in order to decide if you need to change your program or change your data.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 21:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694698#M211875</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-10-27T21:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Format $Z was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694699#M211876</link>
      <description>&lt;P&gt;The error suggests your variable NCRPV1 is already character. If you want to add leading zeros then you will need to do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if NCRPV1   ne '' then ocounty 	= strip(put(input(NCRPV1, 2.),z2.));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 21:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Z-was-not-found-or-could-not-be-loaded/m-p/694699#M211876</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-10-27T21:17:26Z</dc:date>
    </item>
  </channel>
</rss>

