× 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.



This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hello List,

    I have a manual process that I am trying to automate

    I go to the web and download a text file. This ascii file is a ANSI X.12
EDI document(277 - Claims status)
Our problem is the the file comes across as a flat file of undetermined
length. In the file there are tildes(~) which separate each record.

I have developed/cloned the following manual process:

1. Copy the file to my IFS directory.

2. From a command prompt type in STRQSH and press enter

3.  Use Qshell's stream editor, sed, to convert the tilde characters to
line-feed characters:

    From a command line type in STRQSH and press enter


 1st type in:    sed 's/~/\

The first line has to end with a backslash (\).
You have to press the Enter key after the backslash to insert a hard
carriage return
in the replacement string.

2nd type in:     /g'   infile  > outfile

 Sed writes to the standard output file (stdout), which I redirected to IFS
file outfile.

Then I do a  CPYFRMIMPF to get it into the 400 native database:

CPYFRMIMPF FROMSTMF('/home/KKELLER/outfile')
           TOFILE(LIBRARY/FILE)
           RCDDLM(*LF)
           STRDLM(*NONE)
           RMVBLANK(*NONE)
           FLDDLM(*TAB)
           ERRRCDOPT(*REPLACE)
           RPLNULLVAL(*FLDDFT)

Question 1: I would like to run the STRQSH in a CL. Is there a way to use
the the hex value for a carriage return in a Qshell command?

Question 2: Can I use CL variables for STDIN and STOUT?

Thanks in advance,


Karl Keller
Information Systems
Girling Health Care, Inc.
(512) 458-3090 ext. 5040

Confidentiality Notice:  This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
--



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.