<?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: Problem reading box charactor from the mainframe in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54243#M11483</link>
    <description>Thank so much Duke.&lt;BR /&gt;
                       I know I can use Compress function to suppress the box char, if  I find the hex value of the box char. But is it possible to find any options to ignore globally any special char like this when I read any input that have special char because I don't know if other variable have the same issue.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Inpan</description>
    <pubDate>Wed, 15 Oct 2008 21:00:18 GMT</pubDate>
    <dc:creator>Inp</dc:creator>
    <dc:date>2008-10-15T21:00:18Z</dc:date>
    <item>
      <title>Problem reading box charactor from the mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54241#M11481</link>
      <description>Here is my problem&lt;BR /&gt;
&lt;BR /&gt;
I am reading a flat file on the mainframe using SAS spawner. One of the input reading field is &lt;BR /&gt;
@0198 DESCRIPT   $CHAR45.&lt;BR /&gt;
. &lt;BR /&gt;
When I read it, one of the following filed value on the file(input file) is &lt;BR /&gt;
toifcitrixc14p. Endpoint Unreachble&lt;BR /&gt;
After I read, I see the value in the SAS dataset is&lt;BR /&gt;
toifcitrixc14p'box' Endpoint Unreachble&lt;BR /&gt;
Note that , here I write box instead of box character because I am not able write a box char.&lt;BR /&gt;
&lt;BR /&gt;
When I put the following option  &lt;BR /&gt;
&lt;BR /&gt;
infile info lrecl=700 pad ignoredoseof.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I see the following error message.&lt;BR /&gt;
&lt;BR /&gt;
3    infile info lrecl=700 pad ignoredoseof;&lt;BR /&gt;
                                        -------------------&lt;BR /&gt;
                               23&lt;BR /&gt;
ERROR 23-2: Invalid option name IGNOREDOSEOF.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Can any one help me out, how to ignore this box char when I read the file. because when I write back to text file, it shift all fields after the filed DESCRIPT.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Inpan</description>
      <pubDate>Wed, 15 Oct 2008 18:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54241#M11481</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2008-10-15T18:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading box charactor from the mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54242#M11482</link>
      <description>The "box" is a character that can't be printed in your current character set.  It is probably a tab character.&lt;BR /&gt;
&lt;BR /&gt;
You can find the hex code for the character by using a PUT statement and formatting DESCRIPT using the HEX format.  Then you can manipulate or remove it using the various character functions in SAS.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Wed, 15 Oct 2008 20:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54242#M11482</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-10-15T20:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading box charactor from the mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54243#M11483</link>
      <description>Thank so much Duke.&lt;BR /&gt;
                       I know I can use Compress function to suppress the box char, if  I find the hex value of the box char. But is it possible to find any options to ignore globally any special char like this when I read any input that have special char because I don't know if other variable have the same issue.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Inpan</description>
      <pubDate>Wed, 15 Oct 2008 21:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54243#M11483</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2008-10-15T21:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading box charactor from the mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54244#M11484</link>
      <description>Hi Inp&lt;BR /&gt;
&lt;BR /&gt;
If I understand that right then you want to have SAS to solve an issue which you have with your data.&lt;BR /&gt;
It sounds to me as if you will need some data cleansing after reading the data. You could use translate for that - translating a defined set of special characters to blanks.&lt;BR /&gt;
More general would be to use Perl Regular Expressions (have a look at PRXCHANGE), "\s" matches all whitespace characters - that is what most probably then shows up as a 'box'. So just translate all whitespace characters to blanks.&lt;BR /&gt;
&lt;BR /&gt;
Something close to the following should do the job:&lt;BR /&gt;
data ...&lt;BR /&gt;
PID=PRXPARSE ('s/\s/ /io'); &lt;BR /&gt;
infile .... truncover;&lt;BR /&gt;
input @;&lt;BR /&gt;
call PRXCHANGE(PID,-1,_infile_);&lt;BR /&gt;
input @1 var1 @3var2;&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
Your file and all the processing happens on the Mainframe (EBCDIC) but you see the result in an 'ASCII environment (EG?). It could be (less likely) that there is some problem with the translation (trantab) between this two environments.&lt;BR /&gt;
&lt;BR /&gt;
To see the special character in your Mainframe file use your Mainframe editor and type on the command line "Hex on"; a tab (the most likely problem char) would have the Hex value 05.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;BR /&gt;
&lt;BR /&gt;
P.S: forget about 'pad', just use 'truncover'

Message was edited by: Patrick</description>
      <pubDate>Thu, 16 Oct 2008 10:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54244#M11484</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-10-16T10:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading box charactor from the mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54245#M11485</link>
      <description>Hi Pat,&lt;BR /&gt;
           Thank you so much ; Your solution resoved my problem, sorry for my late response.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Inpan</description>
      <pubDate>Mon, 27 Oct 2008 15:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-reading-box-charactor-from-the-mainframe/m-p/54245#M11485</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2008-10-27T15:39:14Z</dc:date>
    </item>
  </channel>
</rss>

