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



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 still 
point to the file
in 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 logical
you'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 logical 
to the new
physical. However, an rmvlfm/addlfm will take care of 
that 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] On
Behalf 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 qtemp 
without any
records
and a logical in qtemp that is using the physical in 
qtemp as its based
on
physical file. If you are on a late enough release you 
can 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 the 
logical file to
be
present.
The physical file data is loaded based upon the 
physical files keys,
and
then 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>
To
            Sent by:                  "Midrange Systems 
Technical
            midrange-l-bounce         Discussion"
            s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>

cc

            01/10/2007 01:21
Subject
            PM                        Re: Creating a 
physical AND
Logical
                                      file

            Please respond to
            Midrange Systems
                Technical
               Discussion
            <midrange-l@midra
                nge.com>






Alan,

Then why not just use CRTDUPOBJ with DATA(*NO). If you 
use CRTDUPOBJ
for a
logical file and a physical file with the same name as 
the logical
file's
current based on physical file exists in the target 
library, the new
logical will use the physical file in the target 
library as its new
based
on
physical file.

Kind regards,

BJ


On 1/10/07, Alan Shore <AlanShore@xxxxxxxx> wrote:


The physical file is already keyed. The logical is a 
different key.
These files already exist, and are being used to 
supply monthly
totals.
However the user wants to be able to create the same 
reports but
specifying
from and thru dates of their own (which may be from 
the middle of
one
month
to the middle of this month etc etc)
So to keep things on an even keel, I am creating 
these files (on
the
fly)
in QTEMP, but the PRODUCTION files exist in the 
PRODUCTION 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@xxxxxxxxxxxx

midrange-l-bounce                                          cc
            s@xxxxxxxxxxxx

Subject
                                      Re: Creating a 
physical AND
Logical
            01/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 the 
physical file.  If
you're
creating the physical file using DDS specs, why not 
just make the
physical file a keyed file?  That way you wouldn't 
have to create a
separate logical.

That having been said, it seems to me that a compiled 
object is not
the
best way to retrieve data from your physical file.  
Consider using
the
OPNQRYF command in a CL program to accomplish the 
same thing "on
the
fly."

Alan Shore wrote:
Mornin' everyone.
Here is my predicament
I need to create a physical file PHYSFILE in QTEMP using the
CRTPF.
This
is
no problem.
I then need to create a Logical LOGFILE (also in 
QTEMP) against
this
Physical PHYSFILE in QTEMP.
Heres where the problem lies.
The Logical that is created is against a physical 
file of the
same
name
PHYSFILE that is in an earlier library on the library list.
How can I create the logical LOGFILE against the physical
PHYSFILE
that
resides in QTEMP?



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
--
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.



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




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



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




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


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

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

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

Replies:

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.