[Info-vax] *.xml files - carriage return's go into file in VMS - how to remove CR's?

sapienzaf sapienza at noesys.com
Fri Mar 27 14:24:50 EDT 2009


On Mar 27, 1:25 pm, Chuck Aaron <caa... at ceris.purdue.edu> wrote:
> The text file is created on VMS from an Adabas Natural program. It
> does contain the embedded CR/LF. This new file is compared against
> an MS word file that does not contain CR/LF and the difference between
> the files are analyzed and actions taken accordingly. Since we really
> only need to look at the text difference, the CR/LF in the one file
> is causing the difference to include these when we would not want them
> to be included in the results.
>

Okay, in that case the solution is as follows:

1) Create an FDL (in this example I'll call the file STREAM.FDL)
containing

SYSTEM
        SOURCE                  OpenVMS

RECORD
        BLOCK_SPAN              yes
        CARRIAGE_CONTROL        carriage_return
        FORMAT                  stream
        SIZE                    0

2) Issue the command

$ CONVERT embedded_crlf.xml stream.xml /FDL=STREAM.FDL

3) Do the $DIFF on the stream file and the text file without cr and
you should get what you want.

4) If you want, convert the stream file back to a text file and the
embedded CR/LF will disappear.  Create an FDL (here called TEXT.FDL)
containing

SYSTEM
        SOURCE                  OpenVMS

RECORD
        BLOCK_SPAN              yes
        CARRIAGE_CONTROL        carriage_return
        FORMAT                  variable

5) Issue the command

$ CONVERT stream.xml text.xml /FDL=TEXT.FDL

The "text.xml" file should contain everything in the original
embedded_crlf.xml files, without the CR/LF.



More information about the Info-vax mailing list