× 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 have a file with 3 - 10 position character fields. I am building the key string and using it in the OVRDBF statement. I have 3 variables which I *cat with the quote variable then *Bcat the three into the FileKey variable.

DCL &QUOTE *CHAR 1 VALUE('''')
Dcl &FileKey Type(*Char) Len(38)

OvrDbF PGMSEC Position(*Key 3 *N &FileKey)
RcvF RcdFmt(@PGMSEC)

From the Job Log:

4500 - OVRDBF FILE(PGMSEC) POSITION(*KEY 3 *N '''USER '' ''XXXLIB '' ''XXX001C ''')
4600 - RCVF DEV(*FILE) RCDFMT(@PGMSEC) WAIT(*YES) OPNID(*NONE)
/* File name is xxxLIB/PGMSEC. */
Position option for member PGMSEC not valid.
Function check. CPF4137 unmonitored by CKD001C at statement 0000004600,
instruction X'0000'.
CPF4137 received by procedure CKD001C. (C D I R)

Message text:
Display Formatted Message Text
System:
Message ID . . . . . . . . . : CPF4137
Message file . . . . . . . . : QCPFMSG
Library . . . . . . . . . : QSYS

Message . . . . : Position option for member &4 not valid.
Cause . . . . . : The position option for member &4 file &2 in library &3 is
not valid. The conditions that can cause this error include:
-- The relative record number or key specified with the OVRDBF command
does not exist in the file.
-- A key position was specified with the OVRDBF command for a file that is
either not keyed or is being opened for an arrival sequence.
-- A relative record number position for a keyed file was specified with
the OVRDBF command.
-- A relative record number position for a distributed file was specified
with the OVRDBF command.
-- An error occurred while the operation to set the position in the file
was being done.
Recovery . . . : Do one of the following and try your request again:
-- Use the OVRDBF command to specify a record that exists in member &4.
-- If the file is keyed, do not open the file for an arrival sequence.
-- If the file is not keyed, specify the position by relative record
number.
-- If you need to set the initial record position by relative record
number, open the file for arrival sequence.
-- If the file is a keyed distributed file, set the initial record
position by key rather than by relative record number. If you need to set
the initial record position by relative record number, then change the file
so it is not a distributed file.
-- Display the low-level messages and correct any errors.

I see the multiple quotes around the 3 components of the key, but I can't see how to make them go away.

My file is keyed on the three fields, User, Library, Program in that order. There is a record in the file for the above user/library/program combination.

I am having a senior Friday moment. Can someone please point me at the explanation ?

TIA,
Cyndi B.
Boise, ID




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.