+ Reply to Thread
Results 1 to 3 of 3

Thread: CPYF with *INCREL

  1. #1

    Default CPYF with *INCREL

    The value in &field needs to be surrounded by quotes. You'll have to *cat it up or build an interim variable. See code below. First example returned value "X" and 'XA' Second example returned only 'X'
    Code

  2. #2
    Guest.Visitor Guest

    Default CPYF with *INCREL

    Trying to do a CPYF in a CLP (see code below) using a display field (FIELD1). The field has a value of "M12345". The file I am using for my CPYF contains 2 groups of records. 1 group contains the field with the above value, the 2nd group contains the field with the following: "M12345B". I want to copy records in which FIELD1 has the initial value M12345. When the CPYF executes it gives me M12345 and M12345B records. In debugger I see that &FIELD1 looks like 'M12345 ' and that in hex the trailing spaces are in fact blanks //404040//. Does anyone know how to get around this problem and why I am experiencing it? If I were asking for 'M12345' rather than 'M12345 ' I could understand the discrepancy. H E L P . . .
    Code

  3. #3

    Default CPYF with *INCREL

    Ed, If you're still having this problem and haven't found a more gracious solution, see code below. It definitely gets the job done. Mike
    Code

+ Reply to Thread

Similar Threads

  1. CPYF question.
    By R.Khoury in forum General
    Replies: 6
    Last Post: 05-18-2006, 06:55 AM
  2. CPYF using *INCREL
    By Guest.Visitor in forum IBM i (OS/400, i5/OS)
    Replies: 3
    Last Post: 01-22-2004, 10:39 AM
  3. CPYF issue
    By David Abramowitz in forum CL
    Replies: 2
    Last Post: 05-16-2002, 12:20 PM
  4. Better way than CPYF?
    By nycsusan@hotmail.com in forum Programming
    Replies: 4
    Last Post: 08-23-2001, 01:01 PM
  5. Using CPYF for PF member in OCL
    By Guest.Visitor in forum Hardware
    Replies: 1
    Last Post: 04-21-1998, 01:43 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