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



On Thu, Apr 5, 2018 at 11:26 AM, KV Info
<kvinfo@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I thought I had made progress using:

CPYTOIMPF FROMFILE(&INFPS) TOSTMF(&OUTFPS) +
MBROPT(*REPLACE) STMFCODPAG(*PCASCII) +
RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*NONE)

But this only worked on a physical file with DDS definition.

Right. Well, technically I don't think you need DDS; it could be a
table you created with SQL. But the basic idea is there - CPYTOIMPF
was designed to take "live" database data, where each piece of data is
in its own field, and numeric data is still numeric, and generate a
CSV (or similar) stream file from that. This command adds field
delimiters and quoting and whatnot.

Whereas CPYTOSTMF was designed to take *text* from a *single* field
(the idea was you would either have a source physical file member or
"flat" file) and just dump that text into a stream file. This command
is mainly for adding end-of-line markers, and possibly doing a code
page conversion.

I am using a single record file of 2000 char, this did not work.

This is a portion of the file.

0,0,0,995,0,0,=(""),=("") ,=(""),=("")
170,0,0,=(""),=("") ,=(""),=("")
0,0,1082,0,0,=(""),=("") ,=(""),=("")
0,0,0,0,1170,0,0,=(""),=("") ,=(""),=("")
0,1082,0,0,=(""),=("") ,=(""),=("")
082,0,0,=(""),=("") ,=(""),=("")
1170,0,0,=(""),=("") ,=(""),=("")
995,0,0,=(""),=("") ,=(""),=("")
0,0,0,0,1170,0,0,=(""),=("") ,=(""),=("")
95,0,0,=(""),=("") ,=(""),=("")
1170,0,0,=(""),=("") ,=(""),=("")
0,0,0,=(""),=("") ,=(""),=("")
1170,0,0,=(""),=("") ,=(""),=("")
0,1170,0,0,=(""),=("") ,=(""),=("")
0,995,0,0,=(""),=("") ,=(""),=("")

That is kind of weird. I don't understand why some lines have more
fields than others. I take it the commas are all field delimiters? (As
opposed to decimal points or thousands separators.) And one of the
fields has a leading zero, which seems odd. And then there is the
issue of the extra trailing spaces in the third field from the right.

Waitaminute. Did you just paste a rectangular selection into your
mailing list post? I guess you have sensitive information on the left
you didn't want to share?

Whatever. Anyway, without a screenshot or more detailed information
about what you're seeing in Excel, including both the worksheet area
AND FORMULA BAR, it's very difficult to help you. (Don't bother trying
to attach a screenshot directly to the mailing list; if you want to
share an image, use some other site, like Imgur or Postimage or
whatever, and share the link to that.)

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.