|
Hi list:
We are in V5R4 and I do not know what I am doing wrong with the CPYF
command.
Background:
a) I have a work file called I700W1
b) I have a master file called ITEMBL
c) I have item number "21737" and warehouse id "N1"
d) I want to copy the record information for this items from the ITEMBL
file into the I700W1 work file.
e) In both files, the item number field (ITNBR) and the warehouse id
(HOUSE) have the same field names.
Based on the previous scenario, my CPYF command looks like this:
CPYF FROMFILE(*LIBL/ITEMBL) TOFILE(*LIBL/I700W1) MBROPT(*REPLACE)
INCREL((*IF ITNBR *EQ&P1ITNBR) (*AND HOUSE *EQ&P1WHID)) FMTOPT(*MAP
*DROP)
The result of this command is bringing multiple items, all starting with
"21737" that exist on the warehouse "N1":
21737
217371
217371T
217372
217372T
217373
217374
217375
Even if I change the CPYF command to do this:
CPYF FROMFILE(*LIBL/ITEMBL) TOFILE(*LIBL/I700W1) MBROPT(*REPLACE)
INCREL((*IF ITNBR *GE&P1ITNBR) (*AND ITNBR *LE&P1ITNBR)
(*AND HOUSE *GE&P1WHID) (*AND HOUSE *LE&P1WHID))FMTOPT(*MAP *DROP)
I do not have different results. Any ideas?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.