|
It gets confusing. CRTDUPOBJ works the way you want if: -the original PF & LF were in the same library -the file are duplicated into the same library -the duplicate PF is created before the duplicate LF. If any of the above is not true, then the duplicated LF looks at the original PF. HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
-----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore Sent: Wednesday, January 10, 2007 2:29 PM To: Midrange Systems Technical Discussion Subject: RE: Creating a physical AND Logical file Well Walden and Brian - you were right. My apologies to you both and also my thanks, this seems to be my method to use. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx midrange-l-bounces@xxxxxxxxxxxx wrote on 01/10/2007 02:20:03 PM:Walden - see my earlier reply to Brian. I thought that the CRTDUPOBJ of the logical would stillpoint to the filein the PRODUCTION library. Obviously - it seems I'm wrong. Thanks - I'll investigate this. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx midrange-l-bounces@xxxxxxxxxxxx wrote on 01/10/2007 02:09:24 PM:The 2 create dup obj will give you what you need_provided_ the logicalyou're copying from is in the same library as the physical you're copying from. If the source logical and physical are in different libraries then the crtdupobj will not repoint the logicalto the newphysical. However, an rmvlfm/addlfm will take care ofthat problem.Alan, why are you resorting to CRTxxx commands when the crtdupobj commands should meet the requirement w/out the need for source. -Walden -- Walden H Leverich III Tech Software (516) 627-3800 x3051 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) -----Original Message----- From: midrange-l-bounces+waldenl=techsoftinc.com@xxxxxxxxxxxx[mailto:midrange-l-bounces+waldenl=techsoftinc.com@xxxxxxxxxxxx] OnBehalf Of Brian Sent: Wednesday, January 10, 2007 1:41 PM To: Midrange Systems Technical Discussion Subject: Re: Creating a physical AND Logical file Alan, Let me make it a little more clearer... :) CRTDUPOBJ OBJ(MYPHYSICAL) FROMLIB(MYLIB) OBJTYPE(*FILE)TOLIB(QTEMP)DATA(*NO) CRTDUPOBJ OBJ(MYLOGICAL) FROMLIB(MYLIB) OBJTYPE(*FILE)TOLIB(QTEMP)This will give you a duplicate of your physical in qtempwithout anyrecords and a logical in qtemp that is using the physical inqtemp as its basedon physical file. If you are on a late enough release youcan also specify*LIBL for the FROMLIB parameter. Kind regards, BJ On 1/10/07, Alan Shore <AlanShore@xxxxxxxx> wrote:Sorry Brian - I need BOTH the physical file AND thelogical file to bepresent. The physical file data is loaded based upon thephysical files keys,andthen the report is generated based upon the logical files keys. Convoluted - huh! Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Brian <system.i.lists@g mail.com>ToSent by: "Midrange SystemsTechnicalmidrange-l-bounce Discussion" s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx>cc01/10/2007 01:21SubjectPM Re: Creating aphysical ANDLogicalfile Please respond to Midrange Systems Technical Discussion <midrange-l@midra nge.com> Alan, Then why not just use CRTDUPOBJ with DATA(*NO). If youuse CRTDUPOBJfor alogical file and a physical file with the same name asthe logicalfile'scurrent based on physical file exists in the targetlibrary, the newlogical will use the physical file in the targetlibrary as its newbasedon physical file. Kind regards, BJ On 1/10/07, Alan Shore <AlanShore@xxxxxxxx> wrote:The physical file is already keyed. The logical is adifferent key.These files already exist, and are being used tosupply monthlytotals.However the user wants to be able to create the samereports butspecifying from and thru dates of their own (which may be fromthe middle ofonemonth to the middle of this month etc etc) So to keep things on an even keel, I am creatingthese files (on thefly)in QTEMP, but the PRODUCTION files exist in thePRODUCTION library.Therefore - I CANNOT change the DDS. Hence my question Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Wayne McAlpine <wayne.mcalpine@s os.louisiana.gov To Sent by: midrange-l@xxxxxxxxxxxxmidrange-l-bounce ccs@xxxxxxxxxxxxSubjectRe: Creating aphysical ANDLogical01/10/2007 11:54 file AM Please respond to Midrange Systems Technical Discussion <midrange-l@midra nge.com> Your DDS can specify a qualified name for thephysical file. Ifyou'recreating the physical file using DDS specs, why notjust make thephysical file a keyed file? That way you wouldn'thave to create aseparate logical. That having been said, it seems to me that a compiledobject is notthebest way to retrieve data from your physical file.Consider usingtheOPNQRYF command in a CL program to accomplish thesame thing "on thefly." Alan Shore wrote:Mornin' everyone. Here is my predicament I need to create a physical file PHYSFILE in QTEMP using theCRTPF.Thisisno problem. I then need to create a Logical LOGFILE (also inQTEMP) againstthisPhysical PHYSFILE in QTEMP. Heres where the problem lies. The Logical that is created is against a physicalfile of the samenamePHYSFILE that is in an earlier library on the library list. How can I create the logical LOGFILE against the physicalPHYSFILEthatresides in QTEMP? Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx-- This is the Midrange Systems Technical Discussion (MIDRANGE-L)mailinglist To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L)mailinglist To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.-- This is the Midrange Systems Technical Discussion (MIDRANGE-L)mailinglist To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L)mailinglist To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.-- This is the Midrange Systems Technical Discussion(MIDRANGE-L) mailinglist To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion(MIDRANGE-L) mailinglistTo post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.-- This is the Midrange Systems Technical Discussion(MIDRANGE-L) mailing listTo post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.