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



Here's a prior response from Chuck...

http://archive.midrange.com/midrange-l/201107/msg00408.html

As expected...

Crispin.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Landess
Sent: Tuesday, May 07, 2013 6:05 PM
To: midrange-l@xxxxxxxxxxxx
Subject: CPYF bug - or working as designed?

All -

After working on this platform for 30 years, I can't believe that I have not

previously encountered this issue.

(tested on V5R4 and IBM i 7.1)

In an RUNSQLSTM script, do this:

CREATE TABLE QTEMP/XXXX
(
LMLL CHAR (10 ) NOT NULL WITH DEFAULT,
LLNAME CHAR (30 ) NOT NULL WITH DEFAULT
);

Insert into qtemp/XXXX
Values
('BR_T','Brazil test'),
('BR_T1','Brazil test'),
('BR_T2','Brazil test'),
('BR_T3','Brazil test'),
('BR_T4','Brazil test'),
('BR_X' ,'Brazil test');

Now issue the following CPYF command:

CPYF FROMFILE(QTEMP/XXXX)
TOFILE(QTEMP/XXXX1)
MBROPT(*ADD)
CRTFILE(*YES)
INCREL((*IF LMLL *EQ 'BR_T'))

Now use SQL to view the data in the created file:

select *From qtemp/xxxx1

LMLL LLNAME
BR_T Brazil test
BR_T1 Brazil test
BR_T2 Brazil test
BR_T3 Brazil test
BR_T4 Brazil test
******** End of data ********


Alternately, if I do this:
CPYF FROMFILE(QTEMP/XXXX)
TOFILE(QTEMP/XXXX1)
MBROPT(*ADD)
CRTFILE(*YES)
INCREL((*IF LMLL *EQ 'BR_T '))

/* with an extra space after the BR_T */

I get:

select *From qtemp/xxxx1

LMLL LLNAME
BR_T Brazil test

SO, Is this a feature or a bug?

(tested on V5R4 and IBM i 7.1)


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.