<?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: How to set file attributes? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019043#M84405</link>
    <description>&lt;!--!*#--&gt;&lt;BR /&gt;From the overkill department, but something I always wanted to code up, and I had some time on a plane ride to fill.&lt;BR /&gt;Possibly comes in handy on other occasions...&lt;BR /&gt;&lt;BR /&gt;Here are two perl scripts to evaluate (narrow) OpenVMS DUMP/BLOCK output.&lt;BR /&gt;&lt;BR /&gt;The first one reconstructs the data as if it was a variable length record file. The second as stream_lf file. In the output examples you'll see that the d3 file is a variable length record file version of the d1 file data.&lt;BR /&gt;&lt;BR /&gt;- easy enough to fix to wide&lt;BR /&gt;- easy enough to look for first reasonable record start.&lt;BR /&gt;- easy enough to pick differnt terminator&lt;BR /&gt;no reason/incentive to do any of those :-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;----- variable_length_dump_to_text.pl -----&lt;BR /&gt;use strict;&lt;BR /&gt;#use warnings;&lt;BR /&gt;# Sample data&lt;BR /&gt;# 0000001A 0000FFFD 00080040 000E0001 ....@...Ã¿....... 000000&lt;BR /&gt;# 00000260 00000001 00000001 00000014 ............`... 000010&lt;BR /&gt;my ($n,$l,$length,$j,@x);&lt;BR /&gt;my $i = 0;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   s/\s//g; &lt;BR /&gt;   next unless /^[0-9A-Z]{32}/;&lt;BR /&gt;   for $j (1..16) {&lt;BR /&gt;   $x[$i++] = hex(substr($_,32-$j*2,2));&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;$j = 0;&lt;BR /&gt;while ($j &amp;lt; $i) {&lt;BR /&gt; $_ = "";&lt;BR /&gt; $length = $x[$j++] + 256*$x[$j++];&lt;BR /&gt;    $l = $length;&lt;BR /&gt;    while ($l--) {&lt;BR /&gt;     $_ .= chr($x[$j++]);&lt;BR /&gt;    }&lt;BR /&gt;    s/\W/./g;&lt;BR /&gt;    $j = 2*int(($j+1)/2);&lt;BR /&gt;    printf ("%4d:%4d %s\n", $n++, $length, $_);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------- stream_lf_dump_to_text.pl ----&lt;BR /&gt;use strict;&lt;BR /&gt;#use warnings;&lt;BR /&gt;# Sample data&lt;BR /&gt;# 00000011 CA81DDA4 00000000 00000000 ........?Y.Ã .... 000030&lt;BR /&gt;# 00000000 00008009 00004843 554F8004 ..OUCH.......... 000040&lt;BR /&gt;# 00000000 0000800A 00000000 0000800A ................ 000050&lt;BR /&gt;my ($j, $n, $length);&lt;BR /&gt;my $i = 0;&lt;BR /&gt;my $line = "";&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   s/\s//g; &lt;BR /&gt;   next unless /^[0-9A-Z]{32}/;&lt;BR /&gt;   for $j (1..16) {&lt;BR /&gt;      my $char = chr(hex(substr($_,32-$j*2,2)));&lt;BR /&gt;      if ($char eq "\n") {&lt;BR /&gt;   printf ("%4d:%4d %s\n", $n++, $length, $line);&lt;BR /&gt;          $line = "";&lt;BR /&gt;          $length = 0;&lt;BR /&gt;      } else {&lt;BR /&gt;          $char = "." if ($char =~ /\W/);&lt;BR /&gt;          $line .= $char;&lt;BR /&gt;          $length++;&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;printf (" end:%4d %s\n", $length, $line);&lt;BR /&gt;&lt;BR /&gt;--------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Temp&amp;gt;perl variable_length_dump_to_text.pl dump2.txt&lt;BR /&gt;   0:  88 ................................4Q...T...P...........................Q..................&lt;BR /&gt;   1:   7 .......&lt;BR /&gt;   2:   7 .......&lt;BR /&gt;   3:   7 .......&lt;BR /&gt;   4:   7 .......&lt;BR /&gt;   5:   7 .......&lt;BR /&gt;   6:   7 .......&lt;BR /&gt;   7:  15 .............A.&lt;BR /&gt;   8:  79 ............P....Debbie....RP....fanny...jayme...kitty...Maya......HP....Sheila&lt;BR /&gt;   9:   7 .......&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Temp&amp;gt;perl stream_lf_dump_to_text.pl dump.txt&lt;BR /&gt;   0:  80 ..................................................................OUCH..........&lt;BR /&gt;   1:   7 .......&lt;BR /&gt;   2:   7 .......&lt;BR /&gt;   3:   7 .......&lt;BR /&gt;   4:   7 .......&lt;BR /&gt;   5:   7 .......&lt;BR /&gt;   6:   7 .......&lt;BR /&gt;   7:   7 .......&lt;BR /&gt;   8:   7 .......&lt;BR /&gt;   9: 175 .........Name............TERMS...........MODELS....................0...............H.......R...............l.......v.....S&lt;BR /&gt;OURCE..DATA....NOTES.................................&lt;BR /&gt;  10:   7 .......&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Jun 2007 18:50:24 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2007-06-14T18:50:24Z</dc:date>
    <item>
      <title>How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019036#M84398</link>
      <description>I have two archive files dis119.d1 &amp;amp; dis119.d3. The first archived file  dearchives perfectly, but when i try to dearchive ( with my custom application) the second archived file, i get error saying the second one to be not a valid dearchived file. &lt;BR /&gt;&lt;BR /&gt;$ dir/full dis119.d1 gives&lt;BR /&gt;&lt;BR /&gt;Directory DKA0:[QAGROUP.INPUT.R50.DIS]&lt;BR /&gt;&lt;BR /&gt;dis119.d1;1                   File ID:  (22384,2,0)           &lt;BR /&gt;Size:           72/80         Owner:    [1,1]&lt;BR /&gt;Created:     2-JUN-1992 13:54:52.00&lt;BR /&gt;Revised:     2-JUN-1992 13:54:52.00 (0)&lt;BR /&gt;Expires:    &lt;NONE specified=""&gt;&lt;BR /&gt;Backup:     &lt;NO backup="" recorded=""&gt;&lt;BR /&gt;Effective:  &lt;NONE specified=""&gt;&lt;BR /&gt;Recording:  &lt;NONE specified=""&gt;&lt;BR /&gt;Accessed:   &lt;NONE specified=""&gt;&lt;BR /&gt;Attributes: &lt;NONE specified=""&gt;&lt;BR /&gt;Modified:   &lt;NONE specified=""&gt;&lt;BR /&gt;Linkcount:  1&lt;BR /&gt;File organization:  Sequential&lt;BR /&gt;Shelved state:      Online &lt;BR /&gt;Caching attribute:  Writethrough&lt;BR /&gt;File attributes:    Allocation: 80, Extend: 0, Global buffer count: 0&lt;BR /&gt;                    No version limit&lt;BR /&gt;Record format:      Stream_LF, maximum 0 bytes, longest 0 bytes&lt;BR /&gt;Record attributes:  Carriage return carriage control&lt;BR /&gt;RMS attributes:     None&lt;BR /&gt;Journaling enabled: None&lt;BR /&gt;File protection:    System:RWED, Owner:RWED, Group:RWED, World:&lt;BR /&gt;Access Cntrl List:  None&lt;BR /&gt;Client attributes:  None&lt;BR /&gt;&lt;BR /&gt;Total of 1 file, 72/80 blocks.&lt;BR /&gt;&lt;BR /&gt;$ dir/full dis119.d3 gives this&lt;BR /&gt;&lt;BR /&gt;Directory DKA0:[QAGROUP.INPUT.R50.DIS]&lt;BR /&gt;&lt;BR /&gt;dis119.d3;1                   File ID:  (22386,2,0)           &lt;BR /&gt;Size:          189/192        Owner:    [1,1]&lt;BR /&gt;Created:     2-JUN-1992 15:22:36.00&lt;BR /&gt;Revised:     2-JUN-1992 15:22:36.00 (0)&lt;BR /&gt;Expires:    &lt;NONE specified=""&gt;&lt;BR /&gt;Backup:     &lt;NO backup="" recorded=""&gt;&lt;BR /&gt;Effective:  &lt;NONE specified=""&gt;&lt;BR /&gt;Recording:  &lt;NONE specified=""&gt;&lt;BR /&gt;Accessed:   &lt;NONE specified=""&gt;&lt;BR /&gt;Attributes: &lt;NONE specified=""&gt;&lt;BR /&gt;Modified:   &lt;NONE specified=""&gt;&lt;BR /&gt;Linkcount:  1&lt;BR /&gt;File organization:  Sequential&lt;BR /&gt;Shelved state:      Online &lt;BR /&gt;Caching attribute:  Writethrough&lt;BR /&gt;File attributes:    Allocation: 192, Extend: 0, Global buffer count: 0&lt;BR /&gt;                    No version limit&lt;BR /&gt;Record format:      Variable length, maximum 0 bytes, longest 554 bytes&lt;BR /&gt;Record attributes:  Carriage return carriage control&lt;BR /&gt;RMS attributes:     None&lt;BR /&gt;Journaling enabled: None&lt;BR /&gt;File protection:    System:RWED, Owner:RWED, Group:RWED, World:&lt;BR /&gt;Access Cntrl List:  None&lt;BR /&gt;Client attributes:  None&lt;BR /&gt;&lt;BR /&gt;Total of 1 file, 189/192 blocks.&lt;BR /&gt;&lt;BR /&gt;The file attributes for these two files are different. all these files are transfered from a windows machine. &lt;BR /&gt;&lt;BR /&gt;How can make the file attributes of DIS119.D3 similar to DIS119.D1? &lt;BR /&gt;&lt;BR /&gt;$ set file/attribute=() dis119.d3 -- i dont know what are the parameters that should go inside the brackets?&lt;BR /&gt;&lt;BR /&gt;Appreciate if anyone could comment on this!! &lt;BR /&gt;&lt;BR /&gt;/Manesh &lt;BR /&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NO&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NO&gt;&lt;/NONE&gt;</description>
      <pubDate>Wed, 13 Jun 2007 06:21:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019036#M84398</guid>
      <dc:creator>Manesh Sasankan</dc:creator>
      <dc:date>2007-06-13T06:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019037#M84399</link>
      <description>If you think the contents are ok but the attributes are wrong.&lt;BR /&gt;SET FILE/ATTR=(RFM:STMLF) should do it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jun 2007 06:34:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019037#M84399</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2007-06-13T06:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019038#M84400</link>
      <description>But beware.. as Ian indicates this will only work if only the attributes were incorrect which is actually unlikely.&lt;BR /&gt;&lt;BR /&gt;To verify DUMP/BLOCK=COUNT=1 the d3 file.&lt;BR /&gt;&lt;BR /&gt;If the first 16-bit word is less than 554, or to put it differently if the second 8-bit byte is 0 or 1 then it is likely a real Variable length file, and it must be converted, not altered.&lt;BR /&gt;&lt;BR /&gt;Ditto dump the d1 file and you should NOT see bytes with 00 nor 01 yet several with 0A (linefeed)&lt;BR /&gt;&lt;BR /&gt;To convert on 8.3 use:&lt;BR /&gt;&lt;BR /&gt;$CONVERT/FDL="RECORD; FORMAT STREAM_LF" old.d3 new.d3&lt;BR /&gt;&lt;BR /&gt;On pre-8.3 use&lt;BR /&gt;&lt;BR /&gt;$CONVERT/FDL=SYS$INPUT: old.d3 new.d3&lt;BR /&gt;RECORD; FORMAT STREAM_LF&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;If you keep having problems then re-reply with the output for those two blocks dumped as text attacment.&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jun 2007 06:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019038#M84400</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-06-13T06:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019039#M84401</link>
      <description>Thanks hein. It was something new to me. thanks a lot. &lt;BR /&gt;&lt;BR /&gt;I'm using OpenVMS v8.2-1 ia64. i tried the command u mentioned. But i have some doubt on this.&lt;BR /&gt;&lt;BR /&gt;what is the OLD.d1 &amp;amp; NEW.d1 means? i'm confused between these two. do i have to convert from dis119.d1 to dis119.d3 &lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;from dis119.d3 to a new file dis119_1.d3?&lt;BR /&gt;&lt;BR /&gt;this is wat is did.&lt;BR /&gt;&lt;BR /&gt;$ convert /fdl=sys$input: dis119.d1 dis119.d3 RECORD; FORMAT STREAM_LF (this didn't worked. i had to remove RECORD; FORMAT STREAM_LF)&lt;BR /&gt;&lt;BR /&gt;This one worked..&lt;BR /&gt;&lt;BR /&gt;$ convert /fdl=sys$input: dis119.d1 dis119.d3&lt;BR /&gt;&lt;BR /&gt;Am i in the right direction??&lt;BR /&gt;&lt;BR /&gt;Manesh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jun 2007 02:18:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019039#M84401</guid>
      <dc:creator>Manesh Sasankan</dc:creator>
      <dc:date>2007-06-14T02:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019040#M84402</link>
      <description>Please find the dump information attachment in this thread.&lt;BR /&gt;&lt;BR /&gt;Manesh</description>
      <pubDate>Thu, 14 Jun 2007 02:19:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019040#M84402</guid>
      <dc:creator>Manesh Sasankan</dc:creator>
      <dc:date>2007-06-14T02:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019041#M84403</link>
      <description>Manesh,&lt;BR /&gt;&lt;BR /&gt;a) Hein is trying to get you to convert your current format of the file dis119.d3 to a new version of the file. He used "old" and "new" as shorthand.&lt;BR /&gt;&lt;BR /&gt;b) On your convert, the "/FDL=SYS$INPUT:" indicates that the FDL will be read from the input device (either your terminal or a command procedure).&lt;BR /&gt;&lt;BR /&gt;so you want&lt;BR /&gt;&lt;BR /&gt;$convert /fdl=sys$input: dis119.d3 dis119_1.d3 &lt;BR /&gt;&lt;BR /&gt;on ONE line, followed by&lt;BR /&gt;&lt;BR /&gt;RECORD; FORMAT STREAM_LF&lt;BR /&gt;&lt;BR /&gt;on the NEXT line of input&lt;BR /&gt;&lt;BR /&gt;This will convert your existing dis119.d3 to a new file dis119_1.d3 which should now be in the correct format.&lt;BR /&gt;&lt;BR /&gt;Be aware that your&lt;BR /&gt;&lt;BR /&gt;$ convert /fdl=sys$input: dis119.d1 dis119.d3&lt;BR /&gt;&lt;BR /&gt;will have replaced your original dis119.d3 file already! You need to get back to the original version before doing the convert to dis119_1.d3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jun 2007 04:47:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019041#M84403</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2007-06-14T04:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019042#M84404</link>
      <description>Duncan,&lt;BR /&gt;&lt;BR /&gt;Thanks! You are a patient and thorough man. :-).&lt;BR /&gt;&lt;BR /&gt;Manesh,&lt;BR /&gt;Carefully read Duncan's clarifications on my post. He is correct.&lt;BR /&gt;&lt;BR /&gt;The alternative, which is admittely more common is to create a file, for example 'stream_lf.fdl' to help the convert:&lt;BR /&gt;&lt;BR /&gt;$create stream_lf.fdl&lt;BR /&gt;record&lt;BR /&gt;  format stream_lf&lt;BR /&gt;$convert/fdl=stream_lf old new/stat&lt;BR /&gt;&lt;BR /&gt;I studied the data and you do need that convert. The d1 file is however, against my expectations, binary and not really a stream_lf file, just labelled as such. To there are low values, just haphazardly.&lt;BR /&gt;&lt;BR /&gt;The d3 file starts with 0x58 as a first record length. Next 0x7, 0x7, you can verify this with DUMP/REC=COUNT=5&lt;BR /&gt;&lt;BR /&gt;Those 7 bytes record come from interpreting the raw binary data:&lt;BR /&gt;&lt;BR /&gt;00000000 0000800A 00000000 0000800A&lt;BR /&gt;&lt;BR /&gt;See that 0A ? That is treated as a line-feed aka line terminator, creating effectiv ely a 7 byte record where the application probably really is using a raw 8 byte structure of sorts.&lt;BR /&gt;&lt;BR /&gt;Anyway, try the convert and be be happy!&lt;BR /&gt;&lt;BR /&gt;The D3 file may have been create by (erroneously!) editting a d1 file, or erroneously transferring in record mode. This type of files must be transferred (FTP) in BIN / RAW mode, not in ASCII/TEXT mode.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:47:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019042#M84404</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-06-14T06:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set file attributes?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019043#M84405</link>
      <description>&lt;!--!*#--&gt;&lt;BR /&gt;From the overkill department, but something I always wanted to code up, and I had some time on a plane ride to fill.&lt;BR /&gt;Possibly comes in handy on other occasions...&lt;BR /&gt;&lt;BR /&gt;Here are two perl scripts to evaluate (narrow) OpenVMS DUMP/BLOCK output.&lt;BR /&gt;&lt;BR /&gt;The first one reconstructs the data as if it was a variable length record file. The second as stream_lf file. In the output examples you'll see that the d3 file is a variable length record file version of the d1 file data.&lt;BR /&gt;&lt;BR /&gt;- easy enough to fix to wide&lt;BR /&gt;- easy enough to look for first reasonable record start.&lt;BR /&gt;- easy enough to pick differnt terminator&lt;BR /&gt;no reason/incentive to do any of those :-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;----- variable_length_dump_to_text.pl -----&lt;BR /&gt;use strict;&lt;BR /&gt;#use warnings;&lt;BR /&gt;# Sample data&lt;BR /&gt;# 0000001A 0000FFFD 00080040 000E0001 ....@...Ã¿....... 000000&lt;BR /&gt;# 00000260 00000001 00000001 00000014 ............`... 000010&lt;BR /&gt;my ($n,$l,$length,$j,@x);&lt;BR /&gt;my $i = 0;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   s/\s//g; &lt;BR /&gt;   next unless /^[0-9A-Z]{32}/;&lt;BR /&gt;   for $j (1..16) {&lt;BR /&gt;   $x[$i++] = hex(substr($_,32-$j*2,2));&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;$j = 0;&lt;BR /&gt;while ($j &amp;lt; $i) {&lt;BR /&gt; $_ = "";&lt;BR /&gt; $length = $x[$j++] + 256*$x[$j++];&lt;BR /&gt;    $l = $length;&lt;BR /&gt;    while ($l--) {&lt;BR /&gt;     $_ .= chr($x[$j++]);&lt;BR /&gt;    }&lt;BR /&gt;    s/\W/./g;&lt;BR /&gt;    $j = 2*int(($j+1)/2);&lt;BR /&gt;    printf ("%4d:%4d %s\n", $n++, $length, $_);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------- stream_lf_dump_to_text.pl ----&lt;BR /&gt;use strict;&lt;BR /&gt;#use warnings;&lt;BR /&gt;# Sample data&lt;BR /&gt;# 00000011 CA81DDA4 00000000 00000000 ........?Y.Ã .... 000030&lt;BR /&gt;# 00000000 00008009 00004843 554F8004 ..OUCH.......... 000040&lt;BR /&gt;# 00000000 0000800A 00000000 0000800A ................ 000050&lt;BR /&gt;my ($j, $n, $length);&lt;BR /&gt;my $i = 0;&lt;BR /&gt;my $line = "";&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   s/\s//g; &lt;BR /&gt;   next unless /^[0-9A-Z]{32}/;&lt;BR /&gt;   for $j (1..16) {&lt;BR /&gt;      my $char = chr(hex(substr($_,32-$j*2,2)));&lt;BR /&gt;      if ($char eq "\n") {&lt;BR /&gt;   printf ("%4d:%4d %s\n", $n++, $length, $line);&lt;BR /&gt;          $line = "";&lt;BR /&gt;          $length = 0;&lt;BR /&gt;      } else {&lt;BR /&gt;          $char = "." if ($char =~ /\W/);&lt;BR /&gt;          $line .= $char;&lt;BR /&gt;          $length++;&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;printf (" end:%4d %s\n", $length, $line);&lt;BR /&gt;&lt;BR /&gt;--------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Temp&amp;gt;perl variable_length_dump_to_text.pl dump2.txt&lt;BR /&gt;   0:  88 ................................4Q...T...P...........................Q..................&lt;BR /&gt;   1:   7 .......&lt;BR /&gt;   2:   7 .......&lt;BR /&gt;   3:   7 .......&lt;BR /&gt;   4:   7 .......&lt;BR /&gt;   5:   7 .......&lt;BR /&gt;   6:   7 .......&lt;BR /&gt;   7:  15 .............A.&lt;BR /&gt;   8:  79 ............P....Debbie....RP....fanny...jayme...kitty...Maya......HP....Sheila&lt;BR /&gt;   9:   7 .......&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Temp&amp;gt;perl stream_lf_dump_to_text.pl dump.txt&lt;BR /&gt;   0:  80 ..................................................................OUCH..........&lt;BR /&gt;   1:   7 .......&lt;BR /&gt;   2:   7 .......&lt;BR /&gt;   3:   7 .......&lt;BR /&gt;   4:   7 .......&lt;BR /&gt;   5:   7 .......&lt;BR /&gt;   6:   7 .......&lt;BR /&gt;   7:   7 .......&lt;BR /&gt;   8:   7 .......&lt;BR /&gt;   9: 175 .........Name............TERMS...........MODELS....................0...............H.......R...............l.......v.....S&lt;BR /&gt;OURCE..DATA....NOTES.................................&lt;BR /&gt;  10:   7 .......&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jun 2007 18:50:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-set-file-attributes/m-p/4019043#M84405</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-06-14T18:50:24Z</dc:date>
    </item>
  </channel>
</rss>

