+ Reply to Thread
Results 1 to 4 of 4

Thread: Too much for CPYF to handle?

  1. #1
    Guest.Visitor Guest

    Default Too much for CPYF to handle?

    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?

  2. #2
    Guest.Visitor Guest

    Default Too much for CPYF to handle?

    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

  3. #3
    Guest.Visitor Guest

    Default Too much for CPYF to handle?

    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.

  4. #4
    Guest.Visitor Guest

    Default Too much for CPYF to handle?

    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

+ Reply to Thread

Similar Threads

  1. TechTip: Handle Multiple Members Within SQL
    By robberendt in forum SQL
    Replies: 4
    Last Post: 07-13-2004, 08:37 AM
  2. RCVDST doesn't handle TXT files
    By vin@planetchan.com in forum IBM i (OS/400, i5/OS)
    Replies: 0
    Last Post: 08-11-2002, 06:09 PM
  3. Writting a CL to handle shutdown during a power outage
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 10-10-2000, 02:18 PM
  4. RPG: how to handle EVAL overflow error?
    By Guest.Visitor in forum Application Software
    Replies: 24
    Last Post: 11-04-1999, 03:14 PM
  5. How to handle time zones on 1 AS/400?
    By David Abramowitz in forum Analysis
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts