<?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: licence num length format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655565#M196678</link>
    <description>&lt;P&gt;Where do you think that you are adding a 1 to first position of the value.&lt;/P&gt;
&lt;PRE&gt; licencec = PUT(licence_no,Z10.);  
&lt;/PRE&gt;
&lt;P&gt;Creates a 10 character output that will start with a 0 if the Licence_no does not have 10 signficant digits.&lt;/P&gt;
&lt;P&gt;The next code that you show:&lt;/P&gt;
&lt;PRE&gt;                                             
Recout = 'D' || delimtr ||                   
     trim (Left(licencec     )) || Delimtr;&lt;/PRE&gt;
&lt;P&gt;Does not do anything to insert a 1 in the first position. The only thing done to Licencec would be to remove leading spaces with Left, which it wont' have, and trim any trailing spaces, which it is very likely not to have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is why I ask where you think you inserted a 1 into the first position?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will also say the showing:&lt;/P&gt;
&lt;PRE&gt;Actual i/p file in log master format
CLST0*0 TLS27**_PAY**_CN**2020-06-08-08.32.18.129184     ü3* tM  &lt;/PRE&gt;
&lt;P&gt;without indicating the exact positions that might contain the license number is not helpful at all and even with that we would need the definition of your PD5 informat to make any sense of that.&lt;/P&gt;
&lt;P&gt;If you are expecting the PD5 informat to have the leading 1 then you don't want to use Z10 to create a text value but a corresponding custom format. Or other manipulation.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 15:51:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-06-09T15:51:36Z</dc:date>
    <item>
      <title>licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655071#M196615</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have an issue while converting log master to CSV format I am facing a license length issue&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;first, I have given&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt; license format PD5.&lt;/FONT&gt;&lt;/STRONG&gt; it contains 10 positions&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I mean 10 digits&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;while righting to o/p file I have given &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;license z10.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;but in the o/p file, it showing 0 instead of 1 so the value of license not picking correct record&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so kindly plz provide the solution of the problem&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rohit&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 07:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655071#M196615</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-06-09T07:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655470#M196636</link>
      <description>&lt;P&gt;Please post the log from your code, and an example of your "log master".&lt;/P&gt;
&lt;P&gt;Use this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg"&gt;&lt;img src="https://communities.sas.com/skins/images/2FD96521DCF95C42FE57BF2A7CB72678/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to post logs and textual data.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 10:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655470#M196636</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-09T10:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655537#M196665</link>
      <description>&lt;P&gt;Are you opening the CSV with spreadsheet software? Depending on actual values in a CSV file some spreadsheet software will "decide" on characteristics and possibly change values.&lt;/P&gt;
&lt;P&gt;I suggest opening the CSV with a text viewer to see if the values were written as intended. Be aware that if you opened the file in spreadsheet software and then saved the values may have been permanently altered and you should recreate the CSV file before checking.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 14:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655537#M196665</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-09T14:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655541#M196666</link>
      <description>&lt;PRE&gt;INFILE LSFIV**0 TRUNCOVER;                      
INPUT   TEXT                           $CHAR26. 
        CRTD_TS                        $CHAR26. 
        TEXT                           $CHAR13. 
        LICENCE_NO                     PD5.     

Format O/P file 
                                                  
 File LSFI2**1;  /* Output version of LSFI*** */ 
 PUT @1 LICENCE_NO                     Z10.       

+++++++++++++++++
 licencec = PUT(licence_no,Z10.);  
with Delimiter
                                             
Recout = 'D' || delimtr ||                   
     trim (Left(licencec     )) || Delimtr;

===============================================
Actual i/p file in log master format
CLST0*0 TLS27**_PAY**_CN**2020-06-08-08.32.18.129184     ü3* tM  

======================================================
The o/p 
D|&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0000044479&lt;/STRONG&gt;&lt;/FONT&gt;|"PY*_IN*_00#$$$1309.DAT"|20200717|"ACC"|
+++++++++++++++++++++++++++++++++++++++++++++++++++
The Expected o/p 
D|&lt;FONT color="#3366FF"&gt;1000044479&lt;/FONT&gt;|"PY*_IN*_00#$$1309.DAT"|20200717|"ACC"|

the Actual o/p as per the above one getting missing the one value it reading only 9 positions only that the region the first position of the license it seems 0 instead of 1 so kindly plz provide the solution the above problem 

Thanks &amp;amp; Regards 
Rohit



&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jun 2020 14:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655541#M196666</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-06-09T14:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655563#M196677</link>
      <description>&lt;P&gt;The PD format uses the last nibble (half-byte) to store the sign. This means that for every given number of bytes, you will always have an odd number of decimal digits stored. To store 10 digits, you need 6 bytes, which means that you actually have space for 11 digits and the sign.&lt;/P&gt;
&lt;P&gt;I suggest you restructure your INPUT statement like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input
  TEXT          $CHAR26. 
  CRTD_TS       $CHAR26. 
  TEXT          $CHAR12. 
  LICENCE_NO    PD6.
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jun 2020 15:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655563#M196677</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-09T15:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: licence num length format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655565#M196678</link>
      <description>&lt;P&gt;Where do you think that you are adding a 1 to first position of the value.&lt;/P&gt;
&lt;PRE&gt; licencec = PUT(licence_no,Z10.);  
&lt;/PRE&gt;
&lt;P&gt;Creates a 10 character output that will start with a 0 if the Licence_no does not have 10 signficant digits.&lt;/P&gt;
&lt;P&gt;The next code that you show:&lt;/P&gt;
&lt;PRE&gt;                                             
Recout = 'D' || delimtr ||                   
     trim (Left(licencec     )) || Delimtr;&lt;/PRE&gt;
&lt;P&gt;Does not do anything to insert a 1 in the first position. The only thing done to Licencec would be to remove leading spaces with Left, which it wont' have, and trim any trailing spaces, which it is very likely not to have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is why I ask where you think you inserted a 1 into the first position?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will also say the showing:&lt;/P&gt;
&lt;PRE&gt;Actual i/p file in log master format
CLST0*0 TLS27**_PAY**_CN**2020-06-08-08.32.18.129184     ü3* tM  &lt;/PRE&gt;
&lt;P&gt;without indicating the exact positions that might contain the license number is not helpful at all and even with that we would need the definition of your PD5 informat to make any sense of that.&lt;/P&gt;
&lt;P&gt;If you are expecting the PD5 informat to have the leading 1 then you don't want to use Z10 to create a text value but a corresponding custom format. Or other manipulation.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 15:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/licence-num-length-format/m-p/655565#M196678</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-09T15:51:36Z</dc:date>
    </item>
  </channel>
</rss>

