<?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: Move Spaces to Low values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17368#M3287</link>
    <description>[pre]&lt;BR /&gt;
%let LOW_VALUE = __________________ ; * fill in your low value ;&lt;BR /&gt;
data outdata;&lt;BR /&gt;
  infile indata isam;&lt;BR /&gt;
  input var1 $ var2 ;&lt;BR /&gt;
  if var1 lt &amp;amp;LOW_VALUE then var1 = " ";&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
 [/pre]&lt;BR /&gt;
&lt;BR /&gt;
this sounds like it may be a homework assignment, as it is very basic SAS coding.&lt;BR /&gt;
Have you read anything about how to program in SAS?&lt;BR /&gt;
The online SAS Documentation is rather extensive, and fairly good/well written.</description>
    <pubDate>Mon, 12 May 2008 12:38:18 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-05-12T12:38:18Z</dc:date>
    <item>
      <title>Move Spaces to Low values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17367#M3286</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
My code has to read a IMS database and has to generate an extract file for that upon certain validation.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;On which one of the field has low-values by default when there is no value to populate, in such case I have to replace them to spaces before I output to the extract file, other than that the actual value has to go for the extract.&lt;/B&gt; &lt;BR /&gt;
I seek solution for my above requirement from experts.&lt;BR /&gt;
Thanks in Advance,</description>
      <pubDate>Mon, 12 May 2008 11:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17367#M3286</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-12T11:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Move Spaces to Low values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17368#M3287</link>
      <description>[pre]&lt;BR /&gt;
%let LOW_VALUE = __________________ ; * fill in your low value ;&lt;BR /&gt;
data outdata;&lt;BR /&gt;
  infile indata isam;&lt;BR /&gt;
  input var1 $ var2 ;&lt;BR /&gt;
  if var1 lt &amp;amp;LOW_VALUE then var1 = " ";&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
 [/pre]&lt;BR /&gt;
&lt;BR /&gt;
this sounds like it may be a homework assignment, as it is very basic SAS coding.&lt;BR /&gt;
Have you read anything about how to program in SAS?&lt;BR /&gt;
The online SAS Documentation is rather extensive, and fairly good/well written.</description>
      <pubDate>Mon, 12 May 2008 12:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17368#M3287</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-12T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Move Spaces to Low values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17369#M3288</link>
      <description>Hi:&lt;BR /&gt;
  SAS does NOT have the same concept of HIGH-VALUES and LOW-VALUES as other languages like COBOL. For example, in this COBOL code snippet (from here: &lt;A href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apiref/exdqilecobol.htm" target="_blank"&gt;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apiref/exdqilecobol.htm&lt;/A&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
        *&lt;BR /&gt;
        * Initialize QCAPCMD options control block for CL processing&lt;BR /&gt;
        *&lt;BR /&gt;
           MOVE 0 TO COMMAND-PROCESS-TYPE.&lt;BR /&gt;
           MOVE "0" TO DBCS-DATA-HANDLING.&lt;BR /&gt;
           MOVE "0" TO PROMPTER-ACTION.&lt;BR /&gt;
           MOVE "0" TO COMMAND-STRING-SYNTAX.&lt;BR /&gt;
           MOVE SPACES TO MESSAGE-KEY.&lt;BR /&gt;
           MOVE LOW-VALUES TO RESERVED OF QCA-PCMD-CPOP0100.&lt;BR /&gt;
     &lt;BR /&gt;
[/pre]&lt;BR /&gt;
        &lt;BR /&gt;
This is how you initialize field values with COBOL -- essentially moving default values into the fields. &lt;BR /&gt;
As I remember, HIGH-VALUES was all hex FF and LOW-Values was all 00. As a COBOL programmer,&lt;BR /&gt;
it was easy to tell when you had "data" versus the "default" value because you could test for HIGH-VALUES&lt;BR /&gt;
or LOW-VALUES, which would never come from the users because they were impossible to type into a screen.&lt;BR /&gt;
&lt;BR /&gt;
COB2SAS is a SAS utility that we used to use to turn our COBOL copybooks into SAS INPUT statements, there's this note (in the documentation)&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts620.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts620.html&lt;/A&gt; &lt;BR /&gt;
about how to test for HIGH/LOW values (if you are getting INVALID data when you try to read a COBOL created file with SAS):&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
HIGH-VALUES or LOW-VALUES may be in your copybook. SAS doesn't have the concept of low or high values. &lt;BR /&gt;
This should be easy to detect by looking in the hex dump in your SASLOG of the record being read. &lt;BR /&gt;
If you do have high or low values in your data, one approach would be to read the field in as character &lt;BR /&gt;
and test for '00'x and 'FF'x. If it's not, then use the INPUT function to convert it to the appropriate &lt;BR /&gt;
numeric. Another approach would be to use the ? ? modifier on your INPUT statement &lt;BR /&gt;
so that the 'INVALID DATA' messages aren't generated. &lt;BR /&gt;
    &lt;BR /&gt;
[/pre]&lt;BR /&gt;
      &lt;BR /&gt;
Are you using SAS/Access to IMS??? Not that it matters much. Tech Support or the documentation might be able to tell you whether there's another &lt;BR /&gt;
option other than the test described above -- not that it's too hard, it would just be an IF statement.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 12 May 2008 15:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17369#M3288</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-05-12T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Move Spaces to Low values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17370#M3289</link>
      <description>As I said in different post that I haven't read any books on SAS and not trained I work with what exists already in the system.&lt;BR /&gt;
I found the answer using &lt;B&gt;RANK&lt;/B&gt; function, thank you for taking time to provide me a solution.</description>
      <pubDate>Thu, 22 May 2008 10:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Move-Spaces-to-Low-values/m-p/17370#M3289</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-22T10:05:47Z</dc:date>
    </item>
  </channel>
</rss>

