× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think your *and is in the wrong place and should be like the below maybe:

INCREL((*IF ITNBR *EQ&P1ITNBR)*and (HOUSE *EQ&P1WHID)) FMTOPT(*MAP
*DROP)



On 7/12/2011 1:57 PM, Peter_Vidal@xxxxxxxx wrote:
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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.