PDA

View Full Version : Too much for CPYF to handle?



Guest.Visitor
01-01-1995, 02:00 AM
I am running this CL command against a table with 450 million rows. TOFILE(&LIBNAM/TMPW01_1) MBROPT(*REPLACE) + CRTFILE(*YES) PRINT(*EXCLD) INCREL((*IF + DATANAME *NE 'BTDT') + (*OR DATANAME *NE 'BTNR') + (*OR DATANAME *NE 'CKST') + (*OR DATANAME *NE 'CNUS') + (*OR DATANAME *NE 'CTOT') + (*OR DATANAME *NE 'DEPN') + (*OR DATANAME *NE 'DPST') + (*OR DATANAME *NE 'DTOT') + (*OR DATANAME *NE 'OPID') + (*OR DATANAME *NE 'PMGT') + (*OR DATANAME *NE 'SQNR') + (*OR DATANAME *NE 'STNR') + (*OR DATANAME *NE 'PMGT') + (*OR DATANAME *NE 'XDDA') + (*OR DATANAME *NE '7780')) A SQL pull of this data runs 9+ hours. A native read is 12 hours. The copy file is 3 hours. But...... I keep getting sporadic errors in the data, some of the rows showing up in the temp file actually have datanames matching the exclude list. Could it be that CPYF just can't handle this granular selection on so large a table?

Guest.Visitor
09-23-1999, 07:24 AM
Are you sure you don't want to use *AND instead of *OR. if you say copy *if field *ne 'a1' *or field *ne 'a2' in your file there are 2 records, 1 record field = a1 the other record field = a2, the copy will give you both records because a1 is not = a2 and a2 is not = a1

Guest.Visitor
09-23-1999, 07:30 AM
If I use *And the CPYF looks like this: if field /= test1 *and field /= test2 Wouldn't I be saying that the field could have multiple values inside each record? Where as the *Or says If the field is this, or if it happens to be that.....?? I have a headache.

Guest.Visitor
09-23-1999, 08:31 AM
Okay, take some imaginary records: 'BTNR' 'CKST' 'CNUS' 'CTOT' 'DEPN' copy if 'BTNR' is not equal to 'BTRN' *OR is not equal to 'CKST'. 'BTNR' is not equal to 'CKST' so copy it. You need to switch them to *ANDs if 'BTNR' is not equal to 'BTNR' *AND is not equal to 'CKST' 'BTNR' is not equal to 'CKST', but it already failed the 'BTNR' test, so won't be copied. If something failed all the compares, then it gets copied. You would use *ORs if you wanted to include those records, change to is equal to, and *OR. To exclude is Not equal to and *and Regards, Jim Langston