|
PGM
DCL VAR(&X0D) TYPE(*CHAR) LEN(1) VALUE(X'0D')
DCL VAR(&X25) TYPE(*CHAR) LEN(1) VALUE(X'25')
DCL VAR(&SEDCMD) TYPE(*CHAR) LEN(100)
CHGVAR VAR(&SEDCMD) VALUE('sed +
"s%[\][.]br[\]%\'||&x0D||'\'||&X25||'%g" +
/joe/temp/in.hl7 > /joe/temp/out.hl7')
QSH CMD(&SEDCMD)
ENDPGM
This replaces \.br\ with a crlf.
However, when I use this against a live file I have a problem. The
live
file contains stand alone cr (x'0d') as line delimiters. For some
reason,
the existing x'0d' characters get removed.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.