× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for the prompt reply. I had just read about character classes when I
read your reply.

I did some more digging and found a cl example that I was able to modify and
achieve the desired (well, almost) results. Here is the code -

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.

I will continue to experiment!

Any thoughts?

Thanks,

Joe

Joe Wells
University of Alabama Health Services Foundation
500 22nd Street South, Suite 308
Birmingham, AL 35233
205-731-5610

CONFIDENTIALITY NOTICE
This e-mail is intended for the sole use of the individual(s) to whom it is
addressed, and may contain information that is privileged, confidential and
exempt from disclosure under applicable law. You are hereby notified that
any dissemination, duplication or distribution of this transmission by
someone other than the intended addressee or its designated agent is
strictly prohibited. If you receive this e-mail in error, please notify me
immediately by replying to this e-mail.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.