<?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: special character conversion in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871457#M10652</link>
    <description>Cobol! Co(b)ol!&lt;BR /&gt;The table definition is broken.&lt;BR /&gt;It is also confusingly defined.&lt;BR /&gt;Maybe just sticking to the X(16) value throughout is more clear.&lt;BR /&gt;&lt;BR /&gt;Here is how I tested, after changing the 35 byte buffer to 255 byte in the program:&lt;BR /&gt;&lt;BR /&gt;$ pipe perl -e "print chr($_) for (32..255)" | run tmp &amp;gt; z.tmp&lt;BR /&gt;$ dump/recod z.tmp&lt;BR /&gt;&lt;BR /&gt;Or broken into two parts, and the data edited to remove the hex from the dump:&lt;BR /&gt;&lt;BR /&gt;$ defin/use sys$input x.tmp&lt;BR /&gt;$ defin/use sys$output y.tmp&lt;BR /&gt;$ run tmp&lt;BR /&gt;$ dump/reco x.tmp&lt;BR /&gt;$ dump/reco y.tmp&lt;BR /&gt;&lt;BR /&gt;Dump of file X.TMP;&lt;BR /&gt;Record number 1&lt;BR /&gt;&lt;BR /&gt; !"#$%&amp;amp;'()*+,-./ 000000&lt;BR /&gt;0123456789:;&amp;lt;=&amp;gt;? 000010&lt;BR /&gt;@ABCDEFGHIJKLMNO 000020&lt;BR /&gt;PQRSTUVWXYZ[\]^_ 000030&lt;BR /&gt;`abcdefghijklmno 000040&lt;BR /&gt;pqrstuvwxyz{|}~. 000050&lt;BR /&gt;................ 000060&lt;BR /&gt;................ 000070&lt;BR /&gt;.Â¡Â¢Â£Â¤Â¥Â¦Â§Â¨Â©ÂªÂ«Â¬Â­Â®Â¯ 000080&lt;BR /&gt;Â°Â±Â²Â³Â´ÂµÂ¶Â·Â¸Â¹ÂºÂ»Â¼Â½Â¾Â¿ 000090&lt;BR /&gt;Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  0000A0&lt;BR /&gt;Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  0000B0&lt;BR /&gt;Ã&amp;nbsp;Ã¡Ã¢Ã£Ã¤Ã¥Ã¦Ã§Ã¨Ã©ÃªÃ«Ã¬Ã­Ã®Ã¯ 0000C0&lt;BR /&gt;Ã°Ã±Ã²Ã³Ã´ÃµÃ¶Ã·Ã¸Ã¹ÃºÃ»Ã¼Ã½Ã¾. 0000D0&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Dump of file Y.TMP&lt;BR /&gt;Record number 1 &lt;BR /&gt; Name: .......... 000000&lt;BR /&gt;&lt;BR /&gt;Record number 2 &lt;BR /&gt;                  000000&lt;BR /&gt; 0123456789       000010&lt;BR /&gt;  ABCDEFGHIJKLMNO 000020&lt;BR /&gt; PQRSTUVWXYZ      000030&lt;BR /&gt;  ABCDEFGHIJKLMNO 000040&lt;BR /&gt; PQRSTUVWXYZ      000050&lt;BR /&gt; A                000060&lt;BR /&gt; S            n   000070&lt;BR /&gt; D    Â¥           000080&lt;BR /&gt; F                000090&lt;BR /&gt; G                0000A0&lt;BR /&gt; HÃ                0000B0&lt;BR /&gt; J                0000C0&lt;BR /&gt; K                0000D0&lt;BR /&gt;                  0000E0&lt;BR /&gt;                . 0000F0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you do not have perl, then you can of course create this x.tmp with dcl.&lt;BR /&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;$i=0&lt;BR /&gt;$loop:&lt;BR /&gt;$x[i*8,8]=i+32&lt;BR /&gt;$i=i+1&lt;BR /&gt;$if i.lt.(265-32) then goto loop&lt;BR /&gt;$open/write x x.tmp&lt;BR /&gt;$write/symb x x&lt;BR /&gt;$close x&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Sep 2006 08:00:54 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2006-09-28T08:00:54Z</dc:date>
    <item>
      <title>special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871454#M10649</link>
      <description>Hi,&lt;BR /&gt;  I have a requirement to convert some spanish characters to english equivalent and i am using lib$movtc RTL function to accomplish this. But for some reason i am able to convert characters till the ascii value of 127 and beyond that its not working. Any help in this regard would be greatly appreciated.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 07:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871454#M10649</guid>
      <dc:creator>sunilorg</dc:creator>
      <dc:date>2006-09-28T07:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871455#M10650</link>
      <description>LIB$MOVTC works. Period. Case closed.&lt;BR /&gt;If it does not appear to work for you, then it is used incorrectly.&lt;BR /&gt;&lt;BR /&gt;What translation table did you provide it?&lt;BR /&gt;What condition value does your call return?&lt;BR /&gt;Did you declare all variables properly? (Unsigned chars?!)&lt;BR /&gt;Why not provide a (short!) example as attachment to a reply, because there is literally nothing in the description so far what would allow us to help you.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 07:19:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871455#M10650</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-28T07:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871456#M10651</link>
      <description>HI Hein,&lt;BR /&gt;&lt;BR /&gt;       Thanks for your quick response. I am attaching the sample program. The program has been written in such a way that if the input is in lower case then it should convert to uppercase and this is working fine. Then i have some spanish characters where teh ascii values are 157, 158 etc and for these ascii values i am not getting the required output.Any help in this regard would be highly appreciated&lt;BR /&gt;Regards,&lt;BR /&gt;Sunny</description>
      <pubDate>Thu, 28 Sep 2006 07:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871456#M10651</guid>
      <dc:creator>sunilorg</dc:creator>
      <dc:date>2006-09-28T07:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871457#M10652</link>
      <description>Cobol! Co(b)ol!&lt;BR /&gt;The table definition is broken.&lt;BR /&gt;It is also confusingly defined.&lt;BR /&gt;Maybe just sticking to the X(16) value throughout is more clear.&lt;BR /&gt;&lt;BR /&gt;Here is how I tested, after changing the 35 byte buffer to 255 byte in the program:&lt;BR /&gt;&lt;BR /&gt;$ pipe perl -e "print chr($_) for (32..255)" | run tmp &amp;gt; z.tmp&lt;BR /&gt;$ dump/recod z.tmp&lt;BR /&gt;&lt;BR /&gt;Or broken into two parts, and the data edited to remove the hex from the dump:&lt;BR /&gt;&lt;BR /&gt;$ defin/use sys$input x.tmp&lt;BR /&gt;$ defin/use sys$output y.tmp&lt;BR /&gt;$ run tmp&lt;BR /&gt;$ dump/reco x.tmp&lt;BR /&gt;$ dump/reco y.tmp&lt;BR /&gt;&lt;BR /&gt;Dump of file X.TMP;&lt;BR /&gt;Record number 1&lt;BR /&gt;&lt;BR /&gt; !"#$%&amp;amp;'()*+,-./ 000000&lt;BR /&gt;0123456789:;&amp;lt;=&amp;gt;? 000010&lt;BR /&gt;@ABCDEFGHIJKLMNO 000020&lt;BR /&gt;PQRSTUVWXYZ[\]^_ 000030&lt;BR /&gt;`abcdefghijklmno 000040&lt;BR /&gt;pqrstuvwxyz{|}~. 000050&lt;BR /&gt;................ 000060&lt;BR /&gt;................ 000070&lt;BR /&gt;.Â¡Â¢Â£Â¤Â¥Â¦Â§Â¨Â©ÂªÂ«Â¬Â­Â®Â¯ 000080&lt;BR /&gt;Â°Â±Â²Â³Â´ÂµÂ¶Â·Â¸Â¹ÂºÂ»Â¼Â½Â¾Â¿ 000090&lt;BR /&gt;Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  0000A0&lt;BR /&gt;Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  0000B0&lt;BR /&gt;Ã&amp;nbsp;Ã¡Ã¢Ã£Ã¤Ã¥Ã¦Ã§Ã¨Ã©ÃªÃ«Ã¬Ã­Ã®Ã¯ 0000C0&lt;BR /&gt;Ã°Ã±Ã²Ã³Ã´ÃµÃ¶Ã·Ã¸Ã¹ÃºÃ»Ã¼Ã½Ã¾. 0000D0&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Dump of file Y.TMP&lt;BR /&gt;Record number 1 &lt;BR /&gt; Name: .......... 000000&lt;BR /&gt;&lt;BR /&gt;Record number 2 &lt;BR /&gt;                  000000&lt;BR /&gt; 0123456789       000010&lt;BR /&gt;  ABCDEFGHIJKLMNO 000020&lt;BR /&gt; PQRSTUVWXYZ      000030&lt;BR /&gt;  ABCDEFGHIJKLMNO 000040&lt;BR /&gt; PQRSTUVWXYZ      000050&lt;BR /&gt; A                000060&lt;BR /&gt; S            n   000070&lt;BR /&gt; D    Â¥           000080&lt;BR /&gt; F                000090&lt;BR /&gt; G                0000A0&lt;BR /&gt; HÃ                0000B0&lt;BR /&gt; J                0000C0&lt;BR /&gt; K                0000D0&lt;BR /&gt;                  0000E0&lt;BR /&gt;                . 0000F0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you do not have perl, then you can of course create this x.tmp with dcl.&lt;BR /&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;$i=0&lt;BR /&gt;$loop:&lt;BR /&gt;$x[i*8,8]=i+32&lt;BR /&gt;$i=i+1&lt;BR /&gt;$if i.lt.(265-32) then goto loop&lt;BR /&gt;$open/write x x.tmp&lt;BR /&gt;$write/symb x x&lt;BR /&gt;$close x&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 08:00:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871457#M10652</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-28T08:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871458#M10653</link>
      <description>Hmm,&lt;BR /&gt;&lt;BR /&gt;The forum ate my homework.&lt;BR /&gt;I should have asked "retain format", but the funny characters would still mess it up.&lt;BR /&gt;So I'll attach a txt file with the dumps.&lt;BR /&gt;&lt;BR /&gt;My conclusing from the experiment is that LIB$MOVTC did exactly what you told it to do.&lt;BR /&gt;&lt;BR /&gt;And it 'looks' like that is what you wanted it to do. More descriptive names for the 16 byte chunks might have helped.&lt;BR /&gt;Anyway, Please explain where, why, you expect a different translation?!&lt;BR /&gt;&lt;BR /&gt;also... the 265 in the DCL alternative test data generater should of course be 256 (2**8).&lt;BR /&gt;&lt;BR /&gt;And the dump shows 255 bytes, because that is how big I made the buffer in the cobol example.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 08:59:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871458#M10653</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-28T08:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871459#M10654</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt; Thank you. Probably i am asking a stupid question but excuse me. Below is a simple program which i wrote and my requirement is to convert the special characters like Â¥ whose ascii value is 157 to english equivalent like N. But i get a space when i run the program. Is there any other way to handle these type of special characters.&lt;BR /&gt;&lt;BR /&gt;IDENTIFICATION DIVISION.&lt;BR /&gt;PROGRAM-ID.  TSTMOV.&lt;BR /&gt;ENVIRONMENT DIVISION.&lt;BR /&gt;DATA DIVISION.&lt;BR /&gt;WORKING-STORAGE SECTION.&lt;BR /&gt;&lt;BR /&gt;01 WS-SOURCE-NAME   PIC X(35).&lt;BR /&gt;01 WS-DEST-NAME     PIC X(35).&lt;BR /&gt;01 FILL-CHAR PIC X VALUE "@".&lt;BR /&gt;&lt;BR /&gt;01 TX-TABLE.&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "                ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "                ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "                ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "0123456789      ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE " ABCDEFGHIJKLMNO".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "PQRSTUVWXYZ     ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE " ABCDEFGHIJKLMNO".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "PQRSTUVWXYZ     ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "$$$$$$$$$$$$    ".&lt;BR /&gt;        05 FILLER PIC X(16) VALUE "%%%%%%%%%%%%    ".&lt;BR /&gt;&lt;BR /&gt;PROCEDURE DIVISION.&lt;BR /&gt;PGM-BEGIN.&lt;BR /&gt;&lt;BR /&gt;        DISPLAY "Name: " NO ADVANCING.&lt;BR /&gt;        ACCEPT WS-SOURCE-NAME.&lt;BR /&gt;        display ws-source-name.&lt;BR /&gt;        CALL 'LIB$MOVTC' USING BY DESCRIPTOR WS-SOURCE-NAME,&lt;BR /&gt;                                             FILL-CHAR,&lt;BR /&gt;                                             TX-TABLE,&lt;BR /&gt;                                             WS-DEST-NAME.&lt;BR /&gt;        DISPLAY "WS-DEST-NAME", WS-DEST-NAME.&lt;BR /&gt;        STOP RUN.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 09:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871459#M10654</guid>
      <dc:creator>sunilorg</dc:creator>
      <dc:date>2006-09-28T09:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: special character conversion</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871460#M10655</link>
      <description>Well, if I use the $$$ and %%% from the last example, and expand then to 16 characters each, then I get % returned for character 157 as expected.&lt;BR /&gt;&lt;BR /&gt;Maybe you are NOT using a 8 bit character set, but a 7 bit extended?&lt;BR /&gt;&lt;BR /&gt;Maybe you are using the "SPANISH 7-bit NRC set" (National Replacement Characters"&lt;BR /&gt;&lt;BR /&gt;See for example the table in:&lt;BR /&gt;&lt;A href="http://vt100.net/dec/ek-vt240-hr-002.pdf" target="_blank"&gt;http://vt100.net/dec/ek-vt240-hr-002.pdf&lt;/A&gt;&lt;BR /&gt;(brings back memories :-)&lt;BR /&gt;&lt;BR /&gt;Did you try with my test data which can prove the byte values?&lt;BR /&gt;&lt;BR /&gt;When you write those 'funny characters', the expexted byte value 157 adn DUMP/RECORD that, then do you see byte value "9D" ?&lt;BR /&gt;&lt;BR /&gt;Or in cobol... move the byte to a comp and 'display with conversion' to see the decimal. Be sure to verify with simple text first ("0" or "A" :-)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.lookuptables.com/" target="_blank"&gt;http://www.lookuptables.com/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2006 09:46:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/special-character-conversion/m-p/3871460#M10655</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-28T09:46:59Z</dc:date>
    </item>
  </channel>
</rss>

