MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2013

RE: CPYF bug - or working as designed?



fixed

I think you should only get the 1 record.

Paul

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






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact