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



Now that I know what the error actually is, a slight modification of your original statement nails the error line:

select length(temp) - length(replace(temp,'"','')) as Delimeters,
temp from qtemp/temp
where length(temp)-length(replace(temp,'"','')) <> 0

Thanks so much for sample. I had originally thought that there was an extra pipe buried in that mess. If I had tried the suggestion (I got it too late to try last Friday), to not use string delimiters, the problem would have been somewhat more obvious.

John McKee


-----Original message-----
From: Luis Rodriguez luisro58@xxxxxxxxx
Date: Mon, 19 Oct 2009 13:53:49 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: CPYFRMIMPF error 98

John,

Glad to be of help. I have just thought that *maybe* instead of the =
or > symbol you should use <> (not equal to).

Regards,

Luis Rodriguez
IBM Certified Systems Expert â eServer i5 iSeries



On Mon, Oct 19, 2009 at 12:08 PM, jmmckee <jmmckee@xxxxxxxxxxxxxx> wrote:
Thanks Luis.

I just now tried this variation:

Âselect length(temp) - length(replace(temp,'|','')) as NumberOfPipes,
Âtemp from qtemp/temp Âwhere length(temp)-length(replace(temp,'|',''
Â)) Â= 5

And, the above showed all the records. ÂChanging to this:
select length(temp) - length(replace(temp,'|','')) as NumberOfPipes,
Âtemp from qtemp/temp Âwhere length(temp)-length(replace(temp,'|',''
)) Â> 5

Returned nothing.

At least that tells me that there are no odd pipes embedded in the data. ÂWay easier than looking through several thousand lines of text.

John McKee


-----Original message-----
From: Luis Rodriguez luisro58@xxxxxxxxx
Date: Fri, 16 Oct 2009 14:08:24 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: CPYFRMIMPF error 98

John,

A little convoluted, but I think this would work for you (assuming your info
is in a field called SRCDTA):

sel*ect  length(srcdta) - length(replace(srcdta, '|', '')) ÂAS
NumberOfPipes, *
* Â Â Â Â Â Âsrcdta
Âfrom  myFile
Âwhere length(srcdta) - length(replace(srcdta, '|', '')) Â>
ExpectedNumberOfPipes;*


HTH,
Luis Rodriguez
IBM Certified Systems Expert â eServer i5 iSeries


On Thu, Oct 15, 2009 at 9:45 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

John,

AFAIK, there is no SQL function that allows you to count the number of
occurrences of a particular character inside a string. Maybe an UDF or
a small RPG program.

You are right, that is the type of problem that reappear at the most
inconvenient times...

Regards,


Luis Rodriguez
IBM Certified Systems Expert â eServer i5 iSeries



ÂOn Thu, Oct 15, 2009 at 8:23 PM, jmmckee <jmmckee@xxxxxxxxxxxxxx> wrote:
Thanks for the elaboration on the format. ÂI'll look at the bad file
tomorrow, ÂHowever, I copied the file as-is to a PF and set up a field on
the text portion. ÂChecked for pipe in the text area and found none. ÂAhead
of the text portion, there are five other fields. ÂThey are easy to scan,
since the content does not change length. ÂStill pipe delimited. ÂContent
like date and time. ÂI'm not sure I understand why the fields even need the
pipe, since the only variable length field is the last one. ÂMakes me wonder
what would happen if I used tr to change the pipes to tabs. ÂThat is
essentially what Excel did.

Wild idea: Since I know the number of fields, is there a SQL statement
that could be run over the PF to select the recordsthat don't have the right
number of pipes?

But, since nothing was identified as being in error, I am quite confident
this will happen again. Âat a most awkward time.

John


-----Original message-----
From: "sjl" sjl_abc@xxxxxxxxxxx
Date: Thu, 15 Oct 2009 19:23:19 -0500
To: midrange-l@xxxxxxxxxxxx
Subject: Re: CPYFRMIMPF error 98

John -

For one thing, Microsoft doesn't subscribe to the standard definition of
a
delimited file.

For example, when Client Access is used to download data as a
comma-delimited file, it places double quotes around the alpha field
values
with a comma separator between the fields.

For example:

If the IBM I file definition is:

Cusno  signed 8/0
Name  ÂAlpha 40

then the comma-delimited file created by client access would look like:

12345678,"John McKee"
87654321,"Steve Landess"

On the other hand, Microsoft only puts a comma separator between the
fields.
If you export the same data from an Excel spreadsheet to a .CSV file,
you'll
get:

12345678,John McKee
87654321,Steve Landess


I would speculate that if the file being produced by your outside agency
does not have double quotes around the alpha fields, CPYFRMIMPF will
likely
have a problem if there happens to be a pipe character embedded /within/
one
of the alpha data fields, since without the double quotes around the
field
value it will think it represents the end of a field value.

- sjl




"jmmckee" <jmmckee@xxxxxxxxxxxxxx> wrote in message
news:mailman.6833.1255643131.1811.midrange-l@xxxxxxxxxxxxxxx
According to Âan IBM link retrieved by Google, it is triggered for such
things as finding a delimiter where it shouldn't be, or not finding one
where it was expected.

Documented error code? ÂWhat a concept!

John McKee

-----Original message-----
From: Jerry Adams Jerry@xxxxxxxxxxxxxxx
Date: Thu, 15 Oct 2009 15:31:35 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: RE: CPYFRMIMPF error 98

What is "reason code 98"?

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: Âjerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of jmmckee
Sent: Thursday, October 15, 2009 3:06 PM
To: Midrange Systems Technical Discussion
Subject: Re: CPYFRMIMPF error 98



My job is set for 4 0 *SECLVL

Even with that, there doesn't seem to be anything particularly
informative
in the job log segment, below.

ÂCPYFRMIMPF FROMSTMF('/QDLS/TRL/INBOUND/100909.CMT')
TOFILE(SSYSRCM/SPBTRCP
Â4) MBROPT(*REPLACE) RCDDLM(*CRLF) FLDDLM('|') ERRRCDFILE(QTEMP/ERRORS
TWO)
 ERRRCDOPT(*REPLACE)
ÂOwnership of object QCPIMTEMPS in QTEMP type *USRSPC changed.
ÂOwnership of object QACPTEMP01 in QTEMP type *USRSPC changed.
ÂOwnership of object QACPTEMP01 in QTEMP type *USRSPC changed.
ÂMember TWO file ERRORS in QTEMP cleared.
ÂOwnership of object QCFT509818 in QTEMP type *USRSPC changed.
ÂOwnership of object Q2F628 in QTEMP type *FILE changed.
ÂMember SPBTRCP4 file SPBTRCP4 in SSYSRCM cleared.
ÂThe copy did not complete for reason code 98.
ÂCopy command ended because of error.


I can't see any reason why QDLS would be an issue, since this has
worked
for almost two months. ÂHowever, I copied the file, using QSH to the
IFS.
Same result:
CPYFRMIMPF FROMSTMF('/McKee/100909.CMT') TOFILE(SSYSRCM/SPBTRCP4)
MBROPT(*
REPLACE) RCDDLM(*CRLF) FLDDLM('|') ERRRCDFILE(QTEMP/ERRORS TWO)
ERRRCDOPT(
*REPLACE)
Ownership of object QCPIMTEMPS in QTEMP type *USRSPC changed.
Ownership of object QACPTEMP01 in QTEMP type *USRSPC changed.
Ownership of object QACPTEMP01 in QTEMP type *USRSPC changed.
Member TWO file ERRORS in QTEMP cleared.
Ownership of object QCFT509818 in QTEMP type *USRSPC changed.
Ownership of object Q2F698 in QTEMP type *FILE changed.
Member SPBTRCP4 file SPBTRCP4 in SSYSRCM cleared.
The copy did not complete for reason code 98.
Copy command ended because of error.

John


-----Original message-----
From: Charles Wilt charles.wilt@xxxxxxxxx
Date: Thu, 15 Oct 2009 14:48:07 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: CPYFRMIMPF error 98

John,

You should see error messages in the job jog. ÂWhat are they?

Charles

On Thu, Oct 15, 2009 at 3:20 PM, jmmckee <jmmckee@xxxxxxxxxxxxxx>
wrote:
I have received a file from an outside agency that chokes
CPYFRMIMPF.
The fields are pipe delimited. ÂI have looked at the raw file and
don't see anything REALLY obvious - the file is several hundred
lines
long. ÂI can open this thing in Excel just fine, but there is no
option to save it with pipe delimiters. ÂThere is a free text
portion,
which, I suspect, prompted the need to use the pipe as a
delimiter.

The agency has converted this file multiple times, and the results
are
the same. ÂOther files are just fine. ÂWhen I attempted to use an
error file, I got nothing in the created member.

Is this why some of you loathe CPYFRMIMPF? ÂAny suggestions on how
to
isolate and fix the error(s) causing CPYFRMIMPF to choke? ÂNot
sure I
have the time to write the program to split this thing apart. ÂCan
SQL
be used in some way to identify or clean up the file?

John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.