[Info-vax] wrong file format

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Wed Dec 23 10:32:28 EST 2020


On Tuesday, December 22, 2020 at 6:42:23 PM UTC-5, Phillip Helbig (undress to reply) wrote:
> I have a damaged file which looks fine except that I see (in EDT) 
> explicit carriage returns at the end of each line AND extra blank lines 
> between each pair of lines. None of the standard SET FILE/ATTR 
> incantations seems to work. 
> 
> Long story and it's late. :-| Maybe someone has a suggestion.

sure... Give us good and clear information to work with.
Specifically
1) - DUMP/BLOCK=COUNT=1/WIDTH=80
2) - DUMP/RECORD=COUNT=3/WIDTH=80
3) - $ PIPE DIR/FULL X.X | search sys$pipe org,"record "

Most surprises are caused by the RFM=STM format being rather odd.
RTFM:
 - http://h30266.www3.hpe.com/odl/axpos/opsys/vmsos84/4523/4523pro_007.html
---> "FAB$C_STM
Indicates stream record format. Records are delimited by FF, VT, LF, or CR LF, and all leading zeros are ignored. This format applies to sequential files only and cannot be used with the block spanning option."

So if a file has <LF><CR> instead of <CR><LF> then the LF will terminated and both the LF CR becomes data!

$ delete *.tmp   ! Critical as some C based tools pick up file attributes from prior file versions.
$ perl -e "while ($i++ < 3){printf qq(%03d\n\r),$i}" > nr.tmp
$ set file/attr=rfm=stm *.tmp
$ edit/edt nr.tmp
001<LF>
<CR>002<LF>
<CR>003<LF>
<CR>

Record number 1                            0A313030 001............. 
Record number 2                         0A 3230300D .002............ 
Record number 3                         0A 3330300D .003............ 
Record number 4                                  0D ................ 

Cheers,
Hein.




More information about the Info-vax mailing list