× 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.



Clumps of hair on floor. I found references in the archive that allows
multiple RCVF cycles of the same physical file in the same CLLE program by
retrieving the number of records in the file and only attempting that number
of reads so that CPF0864 is not triggered. However, in my attempt to
develop an app to use this technique, POSDBF is failing with CPF5230 "No
file open with OPNID(DIR)." The thing is that I'm stepping through this in
debug mode, and I'm seeing that the POSDBF is being executed when my record
read count = &NBRCURRCD from RTVMBRD. When I "Display Open Files" on the
job, the file is open and sitting at the last Relative Record Number. If I
ignore CPF5230 and continue, the next RCVF triggers the CPF0864 error.

I've pasted below the source to the testing app I've created to debug this.
The call to ReGen2 would normally change the data in the e2VaultDir file,
but I've swapped that out for the seven lines that follow for the purpose of
testing this. The DLTF, CRTPF, & CPYF mimic the behavior of what happens to
the e2VaultDir file in ReGen2. The following commands should be executed
before compiling and running the application:
CrtPF qtemp/e2VaultDir RcdLen(40)
CrtPF qtemp/e2VaultDi$ RcdLen(40)

TIA!
- Dan

Pgm
Dclf e2VaultDir OpnId( dir )
Dcl &NbrCurRcd *dec ( 10 0 )
Dcl &ReadCount *dec ( 10 0 )

Loop1:
/* Call ReGen2 <=== disable for test */
DBU qtemp/e2VaultDi$ /* test */
DltF qtemp/e2VaultDir /* test */
MonMsg CPF2105 /* File not found */ /* test */
CrtPF qtemp/e2VaultDir RcdLen(40) /* test */
cpyf qtemp/e2VaultDi$ qtemp/e2VaultDir /* test */ +
MBROPT(*add) FMTOPT(*NOCHK) /* test */

RtvMbrD qtemp/e2VaultDir NbrCurRcd( &NbrCurRcd )
OvrDbf e2VaultDir qtemp/e2VaultDir
ChgVar &ReadCount 0
ReadLoop:
Rcvf OpnID( dir )
ChgVar &ReadCount ( &ReadCount + 1 )
If ( &ReadCount >= &NbrCurRcd ) Then( Do )
PosDBF OpnID( dir ) Position( *Start )
Goto EndOfFile
Enddo
Goto ReadLoop
EndOfFile:
DltOvr e2VaultDir
Goto Loop1
EndPgm

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.