<?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 Creation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90794#M25924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes this is is what I seek. The original values are converted to a character to accomodate a slash (/) in the final value..I then need to have the final numeric values (1,2,3, etc.) have the format applied to them which contains the slash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Aug 2012 12:59:41 GMT</pubDate>
    <dc:creator>Doug</dc:creator>
    <dc:date>2012-08-13T12:59:41Z</dc:date>
    <item>
      <title>Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90789#M25919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the following macro to create a format lookup table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; where the first parameter is the library, the second is the dataset name and the third is the text variable I want to convert to numeric with formatted values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;create_numeric&lt;/EM&gt;&lt;/STRONG&gt; (work,vx,vxx);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro runs fine and the formats create just fine(a numeric format VXXA. and a character format $VXXAA.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I attempt to use the format it creates, I'm doing something wrong - I get all missing values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data VX2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set VX;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newvar = input(put(vxx,$VXXAA.),best8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format newvar vxxa.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? I used a similar procedure in other code successfully and cannot find the difference.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 20:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90789#M25919</guid>
      <dc:creator>Doug</dc:creator>
      <dc:date>2012-08-10T20:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90790#M25920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are some values of the variable you are referencing as vxx and the formatted value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try extra paranthesis around the PUT function to force resolution? (Sometimes helps)&lt;/P&gt;&lt;P&gt;newvar = input((put(vxx,$vxxaa.)),best8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might try making informats and using INPUTC and INPUTN instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 21:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90790#M25920</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-08-10T21:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90791#M25921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I see is a double conversion using three formats.&amp;nbsp; Since we don't see your data I will guess that it looks something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;value $vxxaa&lt;BR /&gt;'a' = '1'&lt;BR /&gt;'b' = '2'&lt;BR /&gt;'c' = '3';&lt;BR /&gt;value vxx&lt;BR /&gt;1 = 10&lt;BR /&gt;2 = 20&lt;BR /&gt;3 = 30;&lt;BR /&gt;invalue vxxbb&lt;BR /&gt;'a' = 1&lt;BR /&gt;'b' = 2&lt;BR /&gt;'c' = 3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input vxx $;&lt;BR /&gt;newvar = input(put(vxx,$vxxaa.),best.);&lt;BR /&gt;altvar = input(vxx,vxxbb.);&lt;BR /&gt;put newvar= vxx.;&lt;BR /&gt;put altvar= altvar vxx.;&lt;BR /&gt;datalines;&lt;BR /&gt;a&lt;BR /&gt;b&lt;BR /&gt;c&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice here that the informat VXXBB can be used to simplify the INPUT/PUT combination.&amp;nbsp; We could simplify further if the variable NEWVAR could contain its formatted value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to your errors it may be because VXX is not initially character.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2012 06:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90791#M25921</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-08-11T06:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90792#M25922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you plan to convert (from character to numeric), perhaps your earlier successes had just an input() function on the right hand side of the expression, and applied a format to the resulting value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to review your earlier,successful, code expressions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your initial definition of the requirement, I would have expected conversion to be:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; NumVar = input( charVar, ?? Informat. ) ;&lt;/SPAN&gt;&lt;BR /&gt;and the re-presentation of the character version of the data would be achieved by just &lt;BR /&gt;assigning the format as the default for NumValue, like:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; Format numVar num2char. ;&lt;/SPAN&gt;&lt;BR /&gt;Of course a macro implementation places &amp;amp; as often as needed in suitable places, but I &lt;BR /&gt;think it is important to get the central conversion clear first.&lt;/P&gt;&lt;P&gt;Having such a model you then set about creating the pair of formats:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/* for testing only .....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data your_data ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set sashelp.class ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; CharVar=name ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;*******end of testing only code *********/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Proc Sort data= your_data( keep= CharVar ) nodupkey&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Out= cntlin_data ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by charvar ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;* now create cntlin data set ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Data cntlin ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; Retain fmtnameF &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/* now here&lt;/SPAN&gt; is a design policy decision&lt;BR /&gt;What naming convention do you adopt for the for pair of formats?&lt;BR /&gt;To keep it simple I'm suggesting reusing the name of the CharVar&lt;BR /&gt;However, formats are used globally in a SAS session and you may&lt;BR /&gt;need to convert the same variable name in different tables with different &lt;BR /&gt;sets of values for CharVar. The simple design is reliable only within a table. &lt;BR /&gt;Extending the simple to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CharVar_tableName&lt;BR /&gt;combines two names each of which can be up to 32 wide, into a name that must be within 31 wide.&lt;/P&gt;&lt;P&gt;I expect you can adopt a suitable generic solution,&lt;BR /&gt;But for clarity of example, I ignore these issues.&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;******/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inFmtName "CharVar"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeF 'N' intype 'I' hlo 'O' ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; if 0 then set cntlin_data ;&amp;nbsp; * get attrib for CharVar ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; CharVar= 'notFound' ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; output ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; hlo = ' ' ;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; do NumVar = 1 by 1 while( not end_of_data ) ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cntlin_data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end= end_of_data ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; end ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; stop;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* each obs numbers the unique values of CharVar&lt;BR /&gt;and holds the required extras to build both format and informat ;;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc format /* you might want to define a format catalog */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cntlin = cntlin( rename= ( NumVar = start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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;&amp;nbsp;&amp;nbsp; CharVar= label &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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;&amp;nbsp; fmtnameF= fmtname &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeF= type ));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run ;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc format /* now build&amp;nbsp; the informat from the same table */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cntlin = cntlin( rename= ( NumVar = label&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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;&amp;nbsp;&amp;nbsp; CharVar= start &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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; inFmtname= fmtname &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&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;&amp;nbsp;&amp;nbsp; inType = type ));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;************demo ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put &amp;gt;%sysfunc(&amp;nbsp;&amp;nbsp; putn(&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, charvar ))&amp;lt; ;&amp;nbsp; *expect &amp;gt;Henry&amp;lt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put ?%sysfunc( inputn(&amp;nbsp; Henry, charvar ))? ;&amp;nbsp; *expect ?5?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put &amp;gt;%sysfunc(&amp;nbsp;&amp;nbsp; putn(&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -1, charvar ))&amp;lt; ;&amp;nbsp; *expect &amp;gt;notFound&amp;lt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put ?%sysfunc( inputn(unknown, charvar ))? ;&amp;nbsp; *expect ?.? ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put %sysfunc(&amp;nbsp; inputn(&amp;nbsp; Henry, charvar ), charvar); * Henry ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%put ?%sysfunc(&amp;nbsp; putn( %sysfunc(inputn( unknown, charvar )), charvar ))?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp;&amp;nbsp;&amp;nbsp; *?notFound? ;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2012 14:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90792#M25922</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-08-12T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90793#M25923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The values I am creating are fractions in the text format xx/xx from the original numeric values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 12:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90793#M25923</guid>
      <dc:creator>Doug</dc:creator>
      <dc:date>2012-08-13T12:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90794#M25924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes this is is what I seek. The original values are converted to a character to accomodate a slash (/) in the final value..I then need to have the final numeric values (1,2,3, etc.) have the format applied to them which contains the slash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 12:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90794#M25924</guid>
      <dc:creator>Doug</dc:creator>
      <dc:date>2012-08-13T12:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90795#M25925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;P&gt;Have you looked to see if the FRACT format might help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 17:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90795#M25925</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-08-13T17:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90796#M25926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[SAS 9.3]&lt;/P&gt;&lt;P&gt;Here is a format which uses an FCMP function to split the incoming string and calculate the fraction.&amp;nbsp; It also uses the FRACT. format to write the numeric result.&amp;nbsp; Notice one of the odd results of the FRACT format - something for me to look into. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options cmplib=work.functions;&lt;BR /&gt;proc fcmp outlib=work.functions.myfunc;&lt;BR /&gt;function nfract (f$) ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return(input(scan(f,1,'/'),best.)/input(scan(f,2,'/'),best.));&lt;BR /&gt;endsub;&lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;invalue $readfrac&lt;BR /&gt;&amp;nbsp;&amp;nbsp; other = [nfract()];&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;* Show two ways to convert the value;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input cfract $8.&amp;nbsp; @1 xfract $readfrac8.;&lt;BR /&gt;put cfract= ;&lt;/P&gt;&lt;P&gt;put xfract;&lt;BR /&gt;nfract= nfract(cfract);&lt;BR /&gt;put nfract= nfract= fract10.;&lt;BR /&gt;datalines;&lt;BR /&gt;1/4&lt;BR /&gt;234/67&lt;BR /&gt;3/4&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 22:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90796#M25926</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-08-13T22:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90797#M25927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Art ... looks similar to ... &lt;EM&gt;&lt;STRONG&gt;Create an Informat from a User-Defined Function&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Create_an_Informat_from_a_User-Defined_Function" title="http://www.sascommunity.org/wiki/Create_an_Informat_from_a_User-Defined_Function"&gt;http://www.sascommunity.org/wiki/Create_an_Informat_from_a_User-Defined_Function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 00:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90797#M25927</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-08-14T00:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Format Creation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90798#M25928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike, I would like to say that I did not know of your article on sasCommunity.org, but I know I did because I signed off on its associated sasCommunity.org tip &lt;A href="http://www.sascommunity.org/wiki/Tips:Create_an_Informat_from_a_User-Defined_Function"&gt;http://www.sascommunity.org/wiki/Tips:Create_an_Informat_from_a_User-Defined_Function&lt;/A&gt; back in January. Hey that was 8 months ago...sigh&amp;nbsp; The solution in your sasCommunity article addresses a broader problem and is a bit more sophisticated than mine.&amp;nbsp; I suggest readers take a look at Mikes article for a better FCMP example.&amp;nbsp; Again the link to his article is &lt;A href="http://www.sascommunity.org/wiki/Create_an_Informat_from_a_User-Defined_Function"&gt;http://www.sascommunity.org/wiki/Create_an_Informat_from_a_User-Defined_Function&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folks, if you are new to PROC FCMP take a look at Mike's article and some of the others on sasCommunity.org.&amp;nbsp; The idea of using a function within a format [starting in SAS 9.3] is extremely powerful as it makes most DATA step functions (and user defined functions) available in procedure steps and wherever formats are used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 05:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-Creation/m-p/90798#M25928</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-08-14T05:52:19Z</dc:date>
    </item>
  </channel>
</rss>

