×
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.
The problem is with using a variable passing a varying length
string value for the "*KEY-key value" element on the POSITION
parameter. One way to resolve the issue is to build the full
command string in a variable and then pass that string to a command
processor such as QCMDEXC. Easier IMO, is to just declare the
variable for the key with one more byte than the actual key length
[e.g. 23 versus 22 in the given] and always ensure the last byte is
a non-blank value. A similar issue and resolution exists for the
CPYF on its various key and scan parameter search value elements.
For example, where the 23rd byte is set to 'X':
dcl &em_key *char 23 '01 VAI_TEST X'
/* ....+....1....+....2... */
...
ovrdbf VXAEMGP position(*key 3 *N &EM_KEY)
Regards, Chuck
On 14-Sep-2010 15:11, Jeff Young wrote:
I have the following command:
OVRDBF VXAEMGP POSITION(*KEY 3 *N &EM_KEY)
where the value of &EM_KEY is '01 VAI_TEST '
The file VXAMEGP has 3 key fields:
Char 2
Char 10
Char 10
The field &EM_KEY is defined as Char 22.
The file VXAEMGP has 2 records that match this key value.
When I issue a RCVF command, I get end of data with no
data read.
What am I doing wrong?
On 14-Sep-2010 15:33, Jeff Young wrote additionally:
> I am not getting end of data, but rather message CPF4137
"Position option for member VXAEMGP not valid." <<SNIP>>
The key value does exist in the file.
Any suggestions?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.