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



From Jerry Draper
Sent: Friday, November 15, 2013 3:40 PM
Subject: how to recreate queries

I have a ton of queries created in WRKQRY that work against our ERP system.

We are planning to upgrade the ERP system and the new version has many
db changes.
We need to (re)create the queries so they pick up any db changes.

How can this be accomplished en masse?

I am trying to remember how I did this in the olden times. It was not a big deal. . . .
What you do is open each query in change mode after the Database changes have been made,
and the QRY maintenance screen suck in the latest formats of the files. Resave the query and you are done.

And I think I did this using PDM . . . like WRKOBJPDM MYLIB *ALL Objtype( *QRYDFN ) and used 12 to WRKQRY.


Now that I look at the screens, I guess I used the WRKQRY command . . . and F4 to show everything in a library.

Option . . . . . . 2
Query . . . . . . . __________ . . . . and press F4
. . Library . . . . . MYLIB

Then for each Query that is listed, you put a 2 in front. This brings you into change mode.
Press enter and re-save the Query with Save Definition . . . Y
You do not need to go into the " Specify file selections ".
Just bringing the query up in maintenance mode, without changing anything, the based-on files are retrieved , and you only need to save the query to have a fresh object (Yes, *QRYAPP are "Text-Based Objects". )

This assumes that the File Selections in the query are against the PRODUCTION FILES, and not pointing to a copy made in a programmer's library or a Test Data Library or some other saved format. For that reason, it sometimes is good to check the option that is " Specify file selections " to flag where the production Files are not used, but instead some weird copy of the file that is now old and obsolete.

If you have CL that overrides to Test Files vs. Production Files, programmers may have gotten sloppy with the file assignments, and then it is good to open the File Selections and change your Queries so they forever point to the Production Files.

- John Voris



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.