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.