View Full Version : Logical file access path
David Abramowitz
09-19-2002, 11:31 AM
Did you also place a new PF in QTEMP? Dave
Guest.Visitor
09-19-2002, 12:07 PM
Dave, Yes I did and used an OVRDBF when creating the duplicate object. The code I used is as follows: CHGVAR VAR(&CUSLIB) VALUE('CUS' *CAT &FLDR) RINT COLLATERAL EXCEPTION REPORT - BY OFFICER CHKOBJ OBJ(QTEMP/LNCEXP) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXP) + FROMLIB(&DATLIB) OBJTYPE(*FILE) + TOLIB(QTEMP) NEWOBJ(LNCEXP)) OVRDBF FILE(LNCEXP) TOFILE(QTEMP/LNCEXP) CHKOBJ OBJ(QTEMP/LNCEXPB1) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXPB1) + FROMLIB(&CUSLIB) OBJTYPE(*FILE) + TOLIB(QTEMP) NEWOBJ(LNCEXPB1)) CHKOBJ OBJ(QTEMP/LNCEXPL9) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXPL9) + FROMLIB(&DATLIB) OBJTYPE(*FILE) + TOLIB(QTEMP) NEWOBJ(LNCEXPL9)) OVRDBF FILE(LNCEXPL9) TOFILE(QTEMP/LNCEXPL9) OVRDBF FILE(LNCEXPB1) TOFILE(QTEMP/LNCEXPB1) If the QTEMP library is at the top of the library list it works fine on both logicals. If the QTEMP is near the bottom of the list, the LNCEXPL9 logical works fine but the LNCEXPB1 does not work. The only difference when I do a DSPFD is the "Implicit access path sharing" is *yes on the B1 file and *no on the L9 file. When I call the RPG program using the B1 logical I have no records. When I use the L9 file I have 57 pages in my report. Thank you
Guest.Visitor
09-19-2002, 01:12 PM
When CRTLF command is executed, how can I control "Implicit Access Path" to be "*No" ? I have a CL in which I CRTDUPOBJ my logical to QTEMP and when it is created in QTEMP the access path is shared with the original LF. I am not getting the correct file info in the new logical, it retains the information contained in the original PF. Any suggestions would be appreciated. Thank you.
ukpi1b
09-19-2002, 01:12 PM
If you have DDS for logical files: Create logical files in QTEMP using this DDS and PF in QTEMP via CRTLF command : CRTLF QTEMP/LNCEXPL9 SRCFILE(xxxLIB/xxxSRC )......... Make sure that new logical file has members and is based on PF in QTEMP.
Guest.Visitor
09-20-2002, 02:01 PM
Tali, Did you notice that the FromLib is different on the B1 file? You're referencing &CusLib where L9 (and the physical) is referencing &DatLib. Bill > Yes I did and used an OVRDBF when creating the duplicate object. The code I used is as follows: > > CHGVAR VAR(&CUSLIB) VALUE('CUS' *CAT &FLDR) > > RINT COLLATERAL EXCEPTION REPORT - BY OFFICER > CHKOBJ OBJ(QTEMP/LNCEXP) OBJTYPE(*FILE) > MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXP) + > FROMLIB(&DATLIB) OBJTYPE(*FILE) + > TOLIB(QTEMP) NEWOBJ(LNCEXP)) > OVRDBF FILE(LNCEXP) TOFILE(QTEMP/LNCEXP) > > CHKOBJ OBJ(QTEMP/LNCEXPB1) OBJTYPE(*FILE) > MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXPB1) + > FROMLIB(&CUSLIB) OBJTYPE(*FILE) + > TOLIB(QTEMP) NEWOBJ(LNCEXPB1)) > > CHKOBJ OBJ(QTEMP/LNCEXPL9) OBJTYPE(*FILE) > MONMSG MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(LNCEXPL9) + > FROMLIB(&DATLIB) OBJTYPE(*FILE) + > TOLIB(QTEMP) NEWOBJ(LNCEXPL9)) > OVRDBF FILE(LNCEXPL9) TOFILE(QTEMP/LNCEXPL9) > OVRDBF FILE(LNCEXPB1) TOFILE(QTEMP/LNCEXPB1) > > If the QTEMP library is at the top of the library list it works fine on both logicals. If the QTEMP is near the bottom of the list, the LNCEXPL9 logical works fine but the LNCEXPB1 does not work. > > The only difference when I do a DSPFD is the "Implicit access path sharing" is *yes on the B1 file and *no on the L9 file. > > When I call the RPG program using the B1 logical I have no records. When I use the L9 file I have 57 pages in my report. > > Thank you
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.