|
Hi Everyone, This is on a V5R3M0 machine. I have a program that gets a CPF5132 on the following chain: /free chain (GetPrdNo(ExtPrdNo): Warehouse) WhsInventory; /end-free p GetPrdNo b d GetPrdNo pi 10a d ExtPrdNo 15a const d PrdNo s 10a /free chain (ExtPrdNo) PRDXREF; if %found; PrdNo = OurPrdNo; else; PrdNo = ExtPrdNo; endif; chain (PrdNo) ProductMaster; if not %found; clear PrdMstRec; endif; return PrdNo; /end-free p e The interesting thing is that the error specifies the stmt# of the chain to WhsInventory, but says the file with the problem is the ProductMaster, and the problem is that too many key fields are specified. ProductMaster has 1 key field, the product#. WhsInventory has 2 key fields, the product# and the warehouse. My first thought was that the CHAIN opcode doesn't allow expressions. The V5R3 manual is ambiguous -- it says the search arg is a "list of values", but one of the examples shown uses %xlate as a search arg. Debugging and using F10 steps completely through the procedure and doesn't give the error until it returns to the chain to WhsInventory. I'm going with the obvious solution, i.e. using a separate field for the result of the procedure, but I did think it was worth asking about whether procedures are allowed as search arguments with chain. If not, the compiler should state the problem, instead of getting an unusual runtime error. Peter Dow Dow Software Services, Inc. www.dowsoftware.com 909 793-9050 voice 909 793-4480 fax -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.9/217 - Release Date: 12/30/2005
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.