<?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: dectpu truncating lines longer than 79 characters in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755770#M33951</link>
    <description>Thanks a lot for the responses!&lt;BR /&gt;&lt;BR /&gt;I was also looking at some perl scripts, which could do the job to reformat the text source, but I will have to install perl first. &lt;BR /&gt;&lt;BR /&gt;What would be the latest perl supported under OpenVMS 7.1-2. It's an old AS2100 server. The last version of perl 5.8.6 seems to require 7.3-2. Since this is a production system, I'd like to make sure there won't be a problem. There is a link at the HP openvms perl support page for the previous version 5.6.1,  but it does not outline the requirements.&lt;BR /&gt;&lt;BR /&gt;The text file I'm trying to convert uses end of line as paragraph, probably CRLF. &lt;BR /&gt;As such it is not possible for the DECTPU "fill" command to determine the difference between a short and long line, and will wrap everything together. It also eliminates blank lines, which screws it up. Some of these lines are certainly longer than 500 characters. The file is actually an extract from vmsmail that I processed by "munpack" mime utility. The original email (quoted-printable) comes from a News agency.&lt;BR /&gt;&lt;BR /&gt;I need to do some sequential file operations with DCL "read" to split the contents of the source file based on certain paragraph headers, save them into individual files and mail them again. But the "read" command will fail if a line of text is more than the max. record length, probably 255 characters. I'm afraid the solutions suggested so far won't work.&lt;BR /&gt;&lt;BR /&gt;Is there really no way using DECTPU to reformat the text, or some other utility, beside Perl?&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;     He stressed that the entry denial is a "sovereign right of Belarus to contr&lt;BR /&gt;ol flows of foreigners entering the country." "Our invitation to an internationa&lt;BR /&gt;l institution such as the OSCE does not annul the Vienna Convention," he said.&lt;BR /&gt;%DCL-W-TKNOVF, command element is too long - shorten&lt;BR /&gt; \     Georgian Ambassador Grigor Katamadze insisted that the Georgians had the &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 21 Mar 2006 11:43:26 GMT</pubDate>
    <dc:creator>Markus Waldorf_1</dc:creator>
    <dc:date>2006-03-21T11:43:26Z</dc:date>
    <item>
      <title>dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755766#M33947</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to process a text file in DCL that contains text lines that are longer than 255 characters. Otherwise, using the text for sequential file operations returns:&lt;BR /&gt;&lt;BR /&gt;%DCL-W-TKNOVF, command element is too long - shorten&lt;BR /&gt;&lt;BR /&gt;And I also need to write output that does not ecxeed the 80 character limits. I've played around with dectpu, creating a procedure, but it's not that easy, and I haven't had too much fun so far. EVE (TPU) offers the Fill command, but it removes blank lines, etc. Unfortunatelly the source text does not have any paragraph markers. Basically all I need to do with the source text is to wrap lines that are longer than 79 characters - and only those lines - and then end each line with a LF and CR. Removing any text ident is another thing I need to apply. &lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Best regads,&lt;BR /&gt;Markus</description>
      <pubDate>Tue, 21 Mar 2006 09:25:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755766#M33947</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-21T09:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755767#M33948</link>
      <description>Hi Markus &lt;BR /&gt;&lt;BR /&gt;Do you have access to a VMS V7.3-2 system ? as you can read beyond the previous limitation of 255 bytes, you can read up to 8192. What's your longest record length ?&lt;BR /&gt;&lt;BR /&gt;J.</description>
      <pubDate>Tue, 21 Mar 2006 09:55:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755767#M33948</guid>
      <dc:creator>John Abbott_2</dc:creator>
      <dc:date>2006-03-21T09:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755768#M33949</link>
      <description>Though DCL is limiting you to 255 characters on a single command line, the internal DCL command buffer is larger. Try breaking your longer command line into shorter segments and use the hyphen continuation character to string them across several command lines as seen in the following trivial example.&lt;BR /&gt;&lt;BR /&gt;$ show -&lt;BR /&gt;system -&lt;BR /&gt;/noprocess</description>
      <pubDate>Tue, 21 Mar 2006 10:08:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755768#M33949</guid>
      <dc:creator>Jim_McKinney</dc:creator>
      <dc:date>2006-03-21T10:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755769#M33950</link>
      <description>Here is a basic 'wrap.com' DCL script that probably does what you want.&lt;BR /&gt;You may need to tweak the conditions to see whether 80 columns is acceptable and whether the space to wrap on needs to be retained or not.&lt;BR /&gt;&lt;BR /&gt;Works for me. Used the following perl to verify:&lt;BR /&gt;&lt;BR /&gt;$ @wrap a.tmp b.tmp&lt;BR /&gt;$ perl -pe "last if ($i++&amp;gt;5); $l=length; $h=substr($_,0,20); $_= ""$i $l $h\n""", b.tmp&lt;BR /&gt;1 78 And I also need to w&lt;BR /&gt;2 77 I've played around w&lt;BR /&gt;3 78 and I haven't had to&lt;BR /&gt;4 29 it removes blank lin&lt;BR /&gt;5 78 Unfortunatelly the s&lt;BR /&gt;6 55 all I need to do wit&lt;BR /&gt;&lt;BR /&gt;$ perl -pe "last if ($i++&amp;gt;5); $l=length; $h=substr($_,0,20); $_= ""$i $l $h\n""", a.tmp&lt;BR /&gt;1 262 And I also need to w&lt;BR /&gt;2 133 Unfortunatelly the s&lt;BR /&gt;3 234 that are longer than&lt;BR /&gt;4 133 but it's not that ea&lt;BR /&gt;5 132 nfortunatelly the so&lt;BR /&gt;6 102 that are longer than&lt;BR /&gt;&lt;BR /&gt;---- wrap.com -------&lt;BR /&gt;&lt;BR /&gt;$open/read input 'p1&lt;BR /&gt;$if p2.eqs."" then p2="sys$output"&lt;BR /&gt;$open/write output 'p2&lt;BR /&gt;$record_loop:&lt;BR /&gt;$read/end=done input record&lt;BR /&gt;$word_loop:&lt;BR /&gt;$if f$len(record).lt.80&lt;BR /&gt;$then&lt;BR /&gt;$ write output record&lt;BR /&gt;$ goto record_loop&lt;BR /&gt;$else&lt;BR /&gt;$i=80&lt;BR /&gt;$byte_loop:&lt;BR /&gt;$i = i - 1&lt;BR /&gt;$if i.eq.0&lt;BR /&gt;$then&lt;BR /&gt;$write sys$output "OOOPS!"&lt;BR /&gt;$exit 0&lt;BR /&gt;$endif&lt;BR /&gt;$&lt;BR /&gt;$if f$extr(i,1,record).nes." " then goto byte_loop&lt;BR /&gt;$write output f$extr(0,i,record)&lt;BR /&gt;$record = f$extr(i+1,999,record)&lt;BR /&gt;$goto word_loop&lt;BR /&gt;$endif&lt;BR /&gt;$&lt;BR /&gt;$done:&lt;BR /&gt;$close input&lt;BR /&gt;$close output&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 10:21:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755769#M33950</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-21T10:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755770#M33951</link>
      <description>Thanks a lot for the responses!&lt;BR /&gt;&lt;BR /&gt;I was also looking at some perl scripts, which could do the job to reformat the text source, but I will have to install perl first. &lt;BR /&gt;&lt;BR /&gt;What would be the latest perl supported under OpenVMS 7.1-2. It's an old AS2100 server. The last version of perl 5.8.6 seems to require 7.3-2. Since this is a production system, I'd like to make sure there won't be a problem. There is a link at the HP openvms perl support page for the previous version 5.6.1,  but it does not outline the requirements.&lt;BR /&gt;&lt;BR /&gt;The text file I'm trying to convert uses end of line as paragraph, probably CRLF. &lt;BR /&gt;As such it is not possible for the DECTPU "fill" command to determine the difference between a short and long line, and will wrap everything together. It also eliminates blank lines, which screws it up. Some of these lines are certainly longer than 500 characters. The file is actually an extract from vmsmail that I processed by "munpack" mime utility. The original email (quoted-printable) comes from a News agency.&lt;BR /&gt;&lt;BR /&gt;I need to do some sequential file operations with DCL "read" to split the contents of the source file based on certain paragraph headers, save them into individual files and mail them again. But the "read" command will fail if a line of text is more than the max. record length, probably 255 characters. I'm afraid the solutions suggested so far won't work.&lt;BR /&gt;&lt;BR /&gt;Is there really no way using DECTPU to reformat the text, or some other utility, beside Perl?&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;     He stressed that the entry denial is a "sovereign right of Belarus to contr&lt;BR /&gt;ol flows of foreigners entering the country." "Our invitation to an internationa&lt;BR /&gt;l institution such as the OSCE does not annul the Vienna Convention," he said.&lt;BR /&gt;%DCL-W-TKNOVF, command element is too long - shorten&lt;BR /&gt; \     Georgian Ambassador Grigor Katamadze insisted that the Georgians had the &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 11:43:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755770#M33951</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-21T11:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755771#M33952</link>
      <description>Are you sure that it is the READ that is failing? Could it be a subsequent command where you're attempting to process a symbol returned from the read? If so, what is the command?</description>
      <pubDate>Tue, 21 Mar 2006 12:17:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755771#M33952</guid>
      <dc:creator>Jim_McKinney</dc:creator>
      <dc:date>2006-03-21T12:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755772#M33953</link>
      <description>DECTPU will do what you want -- you just need to find the correct commands to set the right margin column, select the buffer and tell it to fill/wrap.&lt;BR /&gt;&lt;BR /&gt;$ create wrap_text.eve:&lt;BR /&gt;SET RIGHT MARGIN 79&lt;BR /&gt;SET WRAP&lt;BR /&gt;SELECT ALL&lt;BR /&gt;FILL&lt;BR /&gt;EXIT&lt;BR /&gt;$!&lt;BR /&gt;$ edit/tpu  my_input_file.txt -&lt;BR /&gt;/output=my_output_file.txt - &lt;BR /&gt;/nodisplay/initialization=wrap_text.eve &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 12:18:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755772#M33953</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2006-03-21T12:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755773#M33954</link>
      <description>I don't know exactly what the problem is, but is sure sounds like perl will be the solution :-) :-).&lt;BR /&gt;&lt;BR /&gt;As you are talking about very basic text processsing I would not worry in the least about the exact perl version being used.&lt;BR /&gt;&lt;BR /&gt;But first and foremost you need to e more clear about the exact DCL operation which is failing for you, hopefull reduced to its basics: As simple as possible, but no simpler. Probably something along the lines of&lt;BR /&gt;:&lt;BR /&gt;$read file record&lt;BR /&gt;$var = f$extr(p,l,record)&lt;BR /&gt;:&lt;BR /&gt;Add to that details on the failing condition:&lt;BR /&gt;$SHOW SYMB record&lt;BR /&gt;$WRITE SYS$OUTPUT F$LEN(record)&lt;BR /&gt;DUMP/RECOR=(START=x,COUNT=1) raw.dat&lt;BR /&gt;... whatever seems needed to folks that do not see your environment.&lt;BR /&gt;&lt;BR /&gt;DCL can and will read lines longer than 255 bytes as I showed above. Now let's focus on what it does not do for you, and under which conditions it fails.&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 12:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755773#M33954</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-21T12:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755774#M33955</link>
      <description>My apologies Markus,&lt;BR /&gt;&lt;BR /&gt;I missed the part where you say you don't want blank lines removed.&lt;BR /&gt;&lt;BR /&gt;There is a way to do it in TPU ... but I'll have to think about this some more.&lt;BR /&gt;&lt;BR /&gt;It's really fairly straightforward... the simplest is to write a TPU procedure that scans forward one paragraph using calls to EVE$NEXT_PARAGRAPH at a time then does a call to EVE_FILL_PARAGRAPH.  The loop should terminate when reaching the end of the buffer.&lt;BR /&gt;&lt;BR /&gt;Robert</description>
      <pubDate>Tue, 21 Mar 2006 12:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755774#M33955</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2006-03-21T12:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755775#M33956</link>
      <description>Also,  have you tried using WRITE/SYMBOL to get around the TKNOVF error?&lt;BR /&gt;&lt;BR /&gt;Even on older OpenVMS systems this should let you write records up to about 1000 characters long.&lt;BR /&gt;&lt;BR /&gt;Robert</description>
      <pubDate>Tue, 21 Mar 2006 12:43:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755775#M33956</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2006-03-21T12:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755776#M33957</link>
      <description>Have you looked at the FILL RANGE command in EVE? FILL will try to do a FILL PARAGRAPH unless you have selected an area then it will do a FILL RANGE. So, if I understand your problem correctly, you can do a simple learn sequence that moves to the start of the line, selects the entire line then do a FILL RANGE command, you may want to insert a new line here then move to the next line and repeat.&lt;BR /&gt;&lt;BR /&gt;If you do insert a blank line after the new paragraph then you will end up with two blank lines if the original file had one blank line. If that is not what you want then the code for EVE_FILL_RANGE and EVE_FILL_PARAGRAPH are in EVE$FORMAT.TPU, so you can use that as a starting point if you have to write some code to skip working on lines that are 0 bytes long.</description>
      <pubDate>Tue, 21 Mar 2006 14:46:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755776#M33957</guid>
      <dc:creator>Peter Weaver_1</dc:creator>
      <dc:date>2006-03-21T14:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755777#M33958</link>
      <description>&lt;BR /&gt;Btw... a perl 'one liner' for this wrap is:&lt;BR /&gt;&lt;BR /&gt;perl -pe "while (length &amp;gt; 80){ if (/^.{0,79}\s/) {print ""$&amp;amp;\n""; $_=$'} else {die ""oops""}}" a.tmp&lt;BR /&gt;&lt;BR /&gt;-p = loop over input printing $_ each time&lt;BR /&gt;-e = Program follows in text&lt;BR /&gt;while (length &amp;gt; 80){ = into sub-block if too long otherwise go print $_&lt;BR /&gt;&lt;BR /&gt;if (/^.{0,79}\s/)  = regular expression which matches :&lt;BR /&gt;^ == start at begin of line&lt;BR /&gt;. == any character&lt;BR /&gt;{0,79} == at least none, at most 79, greedy&lt;BR /&gt;\s == whitespace character&lt;BR /&gt;&lt;BR /&gt;$&amp;amp; = matching string&lt;BR /&gt;&lt;BR /&gt;$_=$' = Make default variable $_ the post-matching string (remainder)&lt;BR /&gt;&lt;BR /&gt;else {die "oops"} = better find some space&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 21:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755777#M33958</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-21T21:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755778#M33959</link>
      <description>Hello and thanks again for all the responses!&lt;BR /&gt;&lt;BR /&gt;I've tried the Fill and Fill range tpu functions, but they don't seem to do the trick. &lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;If this is a line that's longer than the specified right margin, the tpu fill command will wrap it nicely.&lt;BR /&gt;&lt;BR /&gt;however, if this line ends here.&lt;BR /&gt;and another line right there there.&lt;BR /&gt;The fill command will wrap the two lines together, which is not good..&lt;BR /&gt;&lt;BR /&gt;I tried the above selecting (highlighting) one line, but it affects the subsequent line too, as it's not a paragraph. This would screw up list items.&lt;BR /&gt;&lt;BR /&gt;Regarding the statement that DCL can read lines that are longer than 255 characters, even on older systems. I would assume there is probably some RMS parameter that can be tweaked, but in my case it seems to bail out at 315. Maybe writing the line into a symbol would work, but I can't see how to get the text out of the text file in the first place.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%DCL-W-TKNOVF, command element is too long - shorten&lt;BR /&gt; \     Mr. Milinkevich's close aides Anatol Lyabedzka and Alyaksandr Dabravolski&lt;BR /&gt; were reportedly arrested by police when they left the square to bring food. Als&lt;BR /&gt;o arrested during the night were Alyaksey Yanukevich, deputy chairman of the Bel&lt;BR /&gt;arusian Popular&lt;BR /&gt;315&lt;BR /&gt;&lt;BR /&gt;I have attached a test.txt file and test.com to test for yourself if you like. Dir/full on the file test.txt shows variable length record, longest 566 bytes.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So far it seems I will need Perl ;-(.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Markus</description>
      <pubDate>Wed, 22 Mar 2006 04:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755778#M33959</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-22T04:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755779#M33960</link>
      <description>&amp;gt;&amp;gt;&amp;gt; So far it seems I will need Perl ;-(.&lt;BR /&gt;&lt;BR /&gt;Yes you will need perl. &lt;BR /&gt;Everyone needs perl.&lt;BR /&gt;But not for this problem.&lt;BR /&gt;&lt;BR /&gt;For this problem you needed to READ the advice offered more carefully, and WRITE/SYMBOL&lt;BR /&gt;&lt;BR /&gt;Jim&amp;gt;&amp;gt; Are you sure that it is the READ that is failing? &lt;BR /&gt;&lt;BR /&gt;Hein&amp;gt;&amp;gt; But first and foremost you need to e more clear about the exact DCL operation which is failing for you&lt;BR /&gt;&lt;BR /&gt;Robert&amp;gt;&amp;gt; Also, have you tried using WRITE/SYMBOL to get around the TKNOVF error?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for attaching the script.&lt;BR /&gt;Runnning it with SET VERI (and cutting down the sample data some :-), it is soon clear that a WRITE is failing.&lt;BR /&gt;This can readily be fixed by using WRITE/SYMBOL&lt;BR /&gt;&lt;BR /&gt;[ but don't just redefine your 'prn' as write /sym can only be used for symbols like your 'line', but not "x" + "y". You'd have to move that in a temp symbol first. ]&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 07:42:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755779#M33960</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-22T07:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755780#M33961</link>
      <description>The attached will cure your TKNOVF WRITE problem.</description>
      <pubDate>Wed, 22 Mar 2006 07:52:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755780#M33961</guid>
      <dc:creator>Jim_McKinney</dc:creator>
      <dc:date>2006-03-22T07:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755781#M33962</link>
      <description>Thanks,&lt;BR /&gt;&lt;BR /&gt;I was not aware of DCL write/symbol, and missunderstood the previous post. I did a few tests meanwhile, simply changing the example in test.com from write to write/symbol and it worked. Even though write/symbol has a limit still, I probably won't reach it in practice, I hope. &lt;BR /&gt;&lt;BR /&gt;I will still need to work out the 79 character per line limit, as I will have to re-mail the message for further processing by a program that simply truncates everything that has more than 132 characters per line.&lt;BR /&gt;&lt;BR /&gt;At least I can start thinking of doing it in DCL now, rather than DECTPU. I'm not very experienced in writing DECTPU procedures.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Markus</description>
      <pubDate>Wed, 22 Mar 2006 08:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755781#M33962</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-22T08:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755782#M33963</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;Acutally the solution I'm going to choose is not really any of the above, but it did a great deal to help me going the right direction. I would certainly not have considered it without all of your valuable input.&lt;BR /&gt;&lt;BR /&gt;As it turns out DCL can do the thing. The trick is to extract a substring from the line record that would not exceed the max. length of 255 characters when writing - which I want to do anyway.&lt;BR /&gt;&lt;BR /&gt;Below is my modifed test.com. It's not very beautiful yet, and cuts in the middle of words, but it's a good start.&lt;BR /&gt;&lt;BR /&gt;$!TEST.COM&lt;BR /&gt;$ prn         := write sys$output&lt;BR /&gt;$ maxlen      := 64&lt;BR /&gt;$! &lt;BR /&gt;$!&lt;BR /&gt;$ PREPARE:&lt;BR /&gt;$   open/read/error=ERROR infile test.txt&lt;BR /&gt;$   open/write/error=ERROR outfile out.txt&lt;BR /&gt;$   PREPARE10:&lt;BR /&gt;$      read/end = PREPARE30 infile line&lt;BR /&gt;$      curlen = f$lenght(line)&lt;BR /&gt;$      cursor  = 0&lt;BR /&gt;$   PREPARE11: &lt;BR /&gt;$      if curlen .lt. maxlen&lt;BR /&gt;$      then&lt;BR /&gt;$         write outfile line&lt;BR /&gt;$         goto PREPARE10&lt;BR /&gt;$      else &lt;BR /&gt;$         line_temp = f$extract(cursor,maxlen,line)&lt;BR /&gt;$         write outfile line_temp&lt;BR /&gt;$         cursor = cursor + maxlen&lt;BR /&gt;$         if cursor .ge. curlen&lt;BR /&gt;$         then&lt;BR /&gt;$           line_temp = f$extract(cursor,maxlen,line)&lt;BR /&gt;$           goto PREPARE10&lt;BR /&gt;$         else&lt;BR /&gt;$           goto PREPARE11&lt;BR /&gt;$         endif&lt;BR /&gt;$      endif&lt;BR /&gt;$   PREPARE30:&lt;BR /&gt;$     close infile&lt;BR /&gt;$     close outfile&lt;BR /&gt;$     goto END&lt;BR /&gt;$ END:&lt;BR /&gt;$   exit&lt;BR /&gt;$!END&lt;BR /&gt;&lt;BR /&gt;output looks like:&lt;BR /&gt;&lt;BR /&gt;* Society/events&lt;BR /&gt;Events coming on Tuesday&lt;BR /&gt;     &lt;BR /&gt;     Minsk, 20 March. A protest is expected to continue in centr&lt;BR /&gt;al Minsk against the official results of Sunday's presidential e&lt;BR /&gt;lection challenged by two opposition candidates. &lt;BR /&gt;     European Union foreign ministers meet in Brussels to discus&lt;BR /&gt;s the situation in Belarus. &lt;BR /&gt;     Belarusian and Hungarian transport officials meet in Budape&lt;BR /&gt;st. &lt;BR /&gt;     More than 300 exhibitors are to take part in an internation&lt;BR /&gt;al construction fair that opens at the exhibition center on Yank&lt;BR /&gt;a Kupala Street in Minsk. &lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 11:47:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755782#M33963</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-22T11:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755783#M33964</link>
      <description>Good to see you are on a good road to a solution.&lt;BR /&gt;&lt;BR /&gt;It is really a text editting job, and as such TPU should be a good solution, but personally i never opted to learn that language, so I couldn't help you with that.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Acutally the solution I'm going to choose &amp;gt; is not really any of the above&lt;BR /&gt;:&lt;BR /&gt;&amp;gt; Below is my modifed test.com. It's not very beautiful yet, and cuts in the middle of words, but it's a good start.&lt;BR /&gt;&lt;BR /&gt;Hmmm, the dcl script I posted earlier does NOT cut in the middle of words and ha slightly more readable labels.&lt;BR /&gt;&lt;BR /&gt;Sample output from that earlier post with line length adjusted to 64.&lt;BR /&gt;&lt;BR /&gt;$wrap test.txt&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;     Minsk, 20 March. A protest is expected to continue in&lt;BR /&gt;central Minsk against the official results of Sunday's&lt;BR /&gt;presidential election challenged by two opposition candidates.&lt;BR /&gt;     European Union foreign ministers meet in Brussels to&lt;BR /&gt;discuss the situation in Belarus.&lt;BR /&gt;     Belarusian and Hungarian transport officials meet in&lt;BR /&gt;Budapest.&lt;BR /&gt;     More than 300 exhibitors are to take part in an&lt;BR /&gt;international construction fair that opens at the exhibition&lt;BR /&gt;center on Yanka Kupala Street in Minsk.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 14:17:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755783#M33964</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-22T14:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755784#M33965</link>
      <description>Hello Hein,&lt;BR /&gt;&lt;BR /&gt;True.&lt;BR /&gt;&lt;BR /&gt;I somehow overlooked your "wrap.com". I was too much focused on perl and tpu, sorry.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Markus</description>
      <pubDate>Thu, 23 Mar 2006 04:18:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755784#M33965</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-23T04:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: dectpu truncating lines longer than 79 characters</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755785#M33966</link>
      <description>Well, looks like a problem:&lt;BR /&gt;&lt;BR /&gt;$    if f$lenght(line) .lt. line_warp&lt;BR /&gt;%DCL-W-BUFOVF, command buffer overflow - shorten expression or command line&lt;BR /&gt;&lt;BR /&gt;The line in questions has 1520 8-bit (cyrillic) Characters.&lt;BR /&gt;&lt;BR /&gt;Apparently f$length has a limit. So will it have to be Perl than?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Markus</description>
      <pubDate>Thu, 30 Mar 2006 12:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dectpu-truncating-lines-longer-than-79-characters/m-p/3755785#M33966</guid>
      <dc:creator>Markus Waldorf_1</dc:creator>
      <dc:date>2006-03-30T12:28:33Z</dc:date>
    </item>
  </channel>
</rss>

