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


  • Subject: Re: Query Definition.
  • From: Jromeh@xxxxxxx
  • Date: Fri, 25 Apr 1997 04:12:07 -0400 (EDT)

Glenn asked, in private mail...

>To:    jromeh@aol.com
>Care to share that command set?
>>
>>Recently created a command that converts one *QRYDFN to a *QMQRY / 
>>*QMFORM combination in one fell swoop, using QTEMP to hold the sources 
>>first. <FUN>

The code belongs to the client, but here are the steps in pseud...

Receives:
   QRYDFN(Lib/Query)
   QMQRY(Lib/QmQry)     <= defaults to *QRYLIB/*QRYNAM
   QMFORM(Lib/QmForm)   <= defaults to *QRYLIB/*QRYNAM
   REPLACE(*NO)         <= defaults to *NO
   SRCLIB(QTEMP)        <= defaults to QTEMP
   
   Sets global MONMSG on CPF0000 going to error handling code at bottom

Processing:
   Splits up 20s (ObjLib) into 10s (separate)
   Checks for defaults, fills in with proper values
   Checks for QRYDFN, bails if missing
   If REPLACE(*NO)
       Checks for QMQRY, bails if found
       Checks for QMFORM, bails if found
   End
   If SRCLIB = QTEMP
       Creates QTEMP/QQMQRYSRC, monitors for already exists (91 long, not 92)
       Creates QTEMP/QQMFORMSRC, monitors for already exists (162 long)
   Else
       Checks for SRCLIB/QQMQRYSRC, bails if missing
       Checks for SRCLIB/QQMFORMSRC, bails if missing
   End
   Does RTVQMQRY on QRYLIB/QRYDFN into SRCLIB/QQMQRYSRC with ALWQRYDFN(*YES)
   If REPLACE is *YES
       Deletes QMQRY, monitors for not present
   End
   Does CRTQMQRY to lib/qmqry
   Does RTVQMFORM on QRYLIB/QRYDFN into SRCLIB/QQMFORMSRC with
ALWQRYDFN(*YES)
   If REPLACE is *YES
       Deletes QMFORM, monitors for not present
   End
   Does CRTQMFORM to lib/qmform

Error Handling:
   Uses a standard error routine to repeat expected and unexpected messages

The QMs that result may not be exactly the way you'd write 'em, but they 
are a good base to start from. Throw in a couple of substitutions, tweak 
the headings a bit, clone a CL to run them and a prompt to submit it, 
you've got a production report (if the indices exist, otherwise you may 
be doing some waiting...)

Just leave the source out there, then if you want it for some reason you 
can copy it out to a source file in a real library, or you can specify 
one in the first place.

We have some power users that prototype reports with query, then we use 
this method to provide the report with selection criteria for others.

Let me know if you have questions,

HTH, 


Jerome Hughes               jromeh@aol.com
InterPro Consulting, Inc.   http://www.interproinc.com
Rosemont IL USA             these are my own opinions only

April is the cruelest month, breeding 
Lilacs out of the dead land, mixing 
Memory and desire, stirring 
Dull roots with spring rain. 

-- who wrote it? -- don't know, got it out of someone's .sig :)



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.