That is what I thought. However, I believe that I will wait for Mr. Pence's
response before I call IBM.
-sjl
Paul wrote:
I think you should only get the 1 record.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Landess
Sent: Tuesday, May 07, 2013 5: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)
--
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.