|
To: midrange-l@xxxxxxxxxxxxThe FILE 3 is created (as a *OUTFILE) using the OPNID of the OPNQRYF from the same CL Program that issues the OPNQRYF command
From: CRPbottle@xxxxxxxxx
Subject: Re: Question Re OPNQRYF
Date: Sat, 24 Mar 2012 11:49:03 -0700
On 24-Mar-2012 01:44 , Raja Ayyer wrote:
<<SNIP>> a question re OPNQRYF: One of my CL program creates 2
temporary files in QTEMP:
one containing a before image of data (FILE_1) from a physical file
and the
other containing after image (FILE_2) from the same physical file.
So both FILE_1 and FILE_2 have the same Record Format?Yes, both files have the same record format. Basically, they result from a CPYF of a physical file, one that is done before updating data in the physical file and another after data has been updated in the physical file.The FILE 3 that is a resultant is like an audit file for purpose of verifiying the updates. The OPNQRYF maps all required fields from FILE 1 and then attempting to map the UPDATED field from FILE 2. Because the format is the same i.e all the fields are derived from the same Physical File (into FILE 1 and FILE 2), OPNQRYF is giving an error when mapping this field from FILE 1 as well as from FILE 2 as 2 different fields into FILE 3.
After creation of these temporary files in QTEMP,
Are these files created using DDS sources, or CRTDUPOBJ from existing
database *FILE objects? What is the status of the source or objects
[from which the files in QTEMP are derived] as far as restrictions on
/promotion/ with this scenario?
Regards,Rajathe program then does an OPNQRYF joining these two temporary files to
extract data into a third file (FILE_3).
So did the program create FILE_3 also? Same questions as above, for how.
Perhaps to clarify, that join described using SQL?
So CPYFRMQRYF TOFILE(FILE_3) from the join query ODP.? And either
OPNQRYF FORMAT(FILE_3) was used, or FORMAT(*FILE) causes the query to
use the RcdFmt of FILE_1, per FILE_1 being the first file in the join?
Is the record format of FILE_3 different than the FILE_1 and\or FILE_2,
and if so, how? >>The FILE 3 is created (as a *OUTFILE) using the OPNID of the OPNQRYF (CPYFRMQRYF) from the same CL Program that issues the OPNQRYF commandThe record format will be different in FILE 3 (with the added field from FILE 2 i.e the field ECESDATE containing updated data). However, FILE 3 is yet to get created
I have a requirement whereby the third file (as a result of the
OPNQRY) contains most of the information from FILE_1 and one field
(ECESDATE) from FILE_2.
What about the scenario and\or the join makes that a requirement?
Perhaps because the field ECESDATE is a\the join field? Or perhaps as
an effect /compare/ of before\after effects, the desire is to show a
copy of both the before and after values for column ECESDATE in the
final output [file]? >>FILE 1 contains ECESDATE with un-updated data and the same field in FILE 2 contains updated data. I would like to have ECESDATE from FILE 1 and FILE 2 in the resultant file FILE 3. In trying to create FILE 3 from FILE 1 & FILE 2, my OPNQRYF joins key fields from FILE 1 & FILE 2 and then MAPS required fields from FILE 1, just like how you have illustrated below (MAPFLD(A '1/A'...then ECESDATE1 '1/ECESDATE' and ECESDATE2 '2/ECESDATE') Tomorrow, I shall send the entire OPNQRYF script used in the program.
Date: Sun, 25 Mar 2012 07:26:34 -0500
From: vhamberg@xxxxxxxxxxx
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Question Re OPNQRYF
Raja
Colors do not appear in this list - I think I know what you replied, but
I am not sure.
Regards
Vern
On 3/25/2012 3:20 AM, Raja Ayyer wrote:
Hi Chuck,Thanks for your below message. Please read my answers in red to your questions below:--
> To: midrange-l@xxxxxxxxxxxx
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.