|
You have to close til file in your VND04R either by user controlled - open
/ close or old style exit the program with *INLR
otherwise the file stays open from the first iteration.
On Wed, Feb 19, 2025 at 11:50 PM Javier Sanchez <
javiersanchezbarquero@xxxxxxxxx> wrote:
When testing and in general, as a safety precaution, I always put aDLTOVR
at the start with its corresponding MONMSG if the override does notexist.
This is because when you test, or repeat the try on another turn, you mayon
find the record already locked because it was not updated and thus not
unlocked. You may not fix this at that moment but probably could be able
to use the next library's instance of the file and get a successful lock
the next one.SReeves@xxxxxxxxxxxxxxxxxx
I guess this may be what you mean.
HTH
JS
El mié, 19 feb 2025 a las 16:35, Shane Reeves (<
file)escribió:
I'm not understanding something with OVRDBF.and
My desire is to loop through a number of libraries all with same file,
update them.
The below CL program sets the current library as it loops through a
OVRDBFlisting the libraries. *(I would think this isn't needed with the
firstbut added as an extra precaution).
The rpg program that the below CL calls (VND040R) will check the record
lock before updating the record.
What I have discovered is that if the file has a record lock in the
relatedlibrary, the log file is coming back showing the record is locked inevery
library. Which makes me think that the OVRDBF isn't redirecting to thelist
library.
What am I doing (or assuming) wrong about the OVRDBF?
/****************************************/
/* Loop Through All Global Libraries */
/****************************************/
DOUNTIL COND(&EOF)
RCVF RCDFMT(SPPLNTGV) OPNID(GLIB)
MONMSG MSGID(CPF0864) EXEC(LEAVE)
/************************/
/* Add Global Library */
/************************/
ADDLIBLE LIB(&GLIB_SPGLIB) POSITION(*FIRST)
MONMSG MSGID(CPF2103)
CHGCURLIB CURLIB(&GLIB_SPGLIB)
OVRDBF FILE(MYFILE) TOFILE(&GLIB_SPGLIB/MYFILE) +
RCDFMTLCK((VENDR *SHRRD)) WAITRCD(5) SHARE(*YES)
/* CALL - Update Vendor */
CALL PGM(VND040R) PARM(&PVEND &PTERM &PUSER +
&GLIB_SPGLIB)
DLTOVR FILE(MYFILE)
/************************/
/* Remove Global Library*/
/************************/
RMVLIBLE LIB(&GLIB_SPGLIB)
MONMSG MSGID(CPF2103)
ENDDO
Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
listquestions.--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
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.