View Full Version : How can I open a QRYDFN in a program?
Guest.Visitor
01-01-1995, 02:00 AM
Hi, I have a great many queries that use file members that must be changed every fiscal year. I intend to write a program in RPG to find and edit the member names that require changing. We frequently do things of this nature on many other file types but I am having some difficulty detemining the file properties of query definitions. It is logical that this can be done as the query/400 program is able to edit these definition files. Any insight into this will be appreciated. It has also occured to us that a utility to do this may be included with query since it seems that many other shops may find themselves in the same situation. If anyone has heard of anything like this let me know. Thank you, John
B.Myrick
06-27-2000, 01:43 PM
John, Is SQL an alternative for your selection? If it is, I would code it in a CL or RPG program with your selections. In this fashion, you could re-write the application once and use dynamic selection based on dates, periods, etc. Hope this helps, Bret
D.Handy
06-27-2000, 02:04 PM
John, <font color=blue>If anyone has heard of anything like this let me know.</font> There is a freeware utility, <a > href="http://www.news400.com/sharewarefiles/rtvqryf.zip">RTVQRYF</a>, which will handle the read portion for you. But it does not work above security level 30 because the MI instructions used are blocked at level 40 and 50. I have not heard of a utility to automate the edit portion. I've sometimes considered doing one, but it never gets far enough up the priority list. I think you'll find you have a hard time doing this with regular RPG. It is not as simple as just updating a source physical file such as QxxxSRC. Doug
B.Myrick
06-27-2000, 02:06 PM
Douglas, Is this your utility or can it be found at http://www.search400.com or some other site? Thanks, Bret
D.Handy
06-27-2000, 02:19 PM
Bret, <font color=blue>Is this your utility </font> No. I believe it was written by Gary Guthrie, an editor for News/400. The link was to the shareware code section at News400 (aka http://www.as400network.com ). Doug
B.Myrick
06-27-2000, 02:41 PM
Douglas, Thanks again. I wrote a set of programs for the /36 which built #GSORT specs based on fields contained in several files I read from /copy I-specs. Have started doing so for a OPNQRYF builder, but if there is something there that will do it, why re-invent the wheel. Later, Bret
Guest.Visitor
06-27-2000, 02:42 PM
Bret, I developed a set of programs that is much like the referenced program. It too uses an MI program to get at the object's information. In the course of doing the investigation for a possible article submission to MC as a PrtQryDfn utility, I mapped out much of the QryDfn. Bill
B.Myrick
06-27-2000, 02:49 PM
Bill, Now you're teasing me. :p Where is this code? Has it been published yet? Policy forbids me from beta testing something, but if the code were available...... Later, Bret
Guest.Visitor
06-27-2000, 02:58 PM
It has not and will not be published. MC's policy is to not publish tech articles that will only run on Sec level 30 or lower. I have attached the zipped utility to this post. It's all pretty straightforward. Bill
B.Myrick
06-27-2000, 03:22 PM
Bill, Thanks. I'll unzip it and check it out. Bret "boy I hope nobody came in, in the middle of this topic" Myrick
D.Handy
06-27-2000, 04:00 PM
Bret, <font color=blue>Policy forbids me from beta testing something</font> So I take it your company does not allow the use of M$ products? :) Doug
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.