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

Richard Maher maher_rj at hotspamnotmail.com
Fri Mar 27 19:11:59 EDT 2009


Hi Chuck,

I'm guessing that you're doing the DIFF on the Windows side with something?
Frank's suggestion below will probably do the trick but if that fails you
may wish to try the FDL version in section 8.5.3 of: -

http://manson.vistech.net/t3$examples/tier3_031.pdf

Cheers Richard Maher

"sapienzaf" <sapienza at noesys.com> wrote in message
news:09ec5c5d-2ad7-4933-90c4-2747b20691e3 at r18g2000vbi.googlegroups.com...
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