<?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 Question Regarding Mainframe Data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23308#M5139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid this is approach is in the "brute force" arena ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the SAS side, you might set up a set of macro variables that contain allowable characters.&amp;nbsp; Just a couple of examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let caps_only = ABCDEFGHIJKLMNOPQRSTUVWXYZ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let caps_plus_digits = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would let you apply the COMPRESS function down the road:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = compress(var1, "&amp;amp;caps_only", 'Keep'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var2 = compress(var2, "&amp;amp;caps_plus_digits", 'Keep');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's clumsy, but at least it gives you a way to apply different rules to different fields.&amp;nbsp; And unfortunately, it will take some CPU time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2012 18:36:49 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-03-06T18:36:49Z</dc:date>
    <item>
      <title>Question Regarding Mainframe Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23306#M5137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We seem to have some people here who will go to any lengths to bypass any rules regarding data entry.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone has been entering invalid characters into a mainframe CICS based system from which we extract data and FTP it to a local server.&amp;nbsp; The FTP is now failing because they have entered a "Carriage Return" as data into a text field (hex '25').&amp;nbsp; It seems that they are being clever and cutting-and-pasting data into this field and there is no field level data validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easy way for me to fix this is to go beat that user about the head and shoulders and make them stop it right now!&amp;nbsp; But, alas, I am limited to how much injury I am allowed to inflict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, I will need to remove the offending characters in the code that reads the mainframe table and prepares the data for download. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question - what is the most efficient way to remove the offending characters?&amp;nbsp; The "Translate" function seems to be the best option, but I would like to remove ANY "non display" character and I have a boat load of data to process (7+ million really big records), so I don't want the batch job to run much longer than it does now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can limit what needs to be done to a handfull of text fields (about 120 bytes) out of a 337 byte record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions, or should I just go with brute force?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 17:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23306#M5137</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-03-06T17:34:00Z</dc:date>
    </item>
    <item>
      <title>Question Regarding Mainframe Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23307#M5138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; It has been a long time since I dealt with FTP but it may be possible to set switches in your FTP code. I remember a similar issue when transferring "text" files that was fixed by changing a setting to use a "binary" transport option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also document time used to fix this problem and let management know about wasted assets caused by folks not following prototcol assuming the entry procedures are documented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 17:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23307#M5138</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-03-06T17:39:58Z</dc:date>
    </item>
    <item>
      <title>Question Regarding Mainframe Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23308#M5139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid this is approach is in the "brute force" arena ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the SAS side, you might set up a set of macro variables that contain allowable characters.&amp;nbsp; Just a couple of examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let caps_only = ABCDEFGHIJKLMNOPQRSTUVWXYZ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let caps_plus_digits = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would let you apply the COMPRESS function down the road:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = compress(var1, "&amp;amp;caps_only", 'Keep'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var2 = compress(var2, "&amp;amp;caps_plus_digits", 'Keep');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's clumsy, but at least it gives you a way to apply different rules to different fields.&amp;nbsp; And unfortunately, it will take some CPU time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 18:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23308#M5139</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-03-06T18:36:49Z</dc:date>
    </item>
    <item>
      <title>Question Regarding Mainframe Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23309#M5140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; OK, these's much more to the COMPRESS function than I realized.&amp;nbsp; Sometimes I guess it pays to read the documentation before you post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Keep" is illegal as a third parameter.&amp;nbsp; Use "K" instead.&amp;nbsp; But all of these macro variables may not be necessary.&amp;nbsp; Varying the third parameter may give you all that you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to read about the "o" as well, for speeding up the processing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 19:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-Regarding-Mainframe-Data/m-p/23309#M5140</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-03-06T19:09:15Z</dc:date>
    </item>
  </channel>
</rss>

