|
OPNQRYF is great. And those of you who still use it and figure it out
deserve respect. But, as much as I respect those who knap their own
arrowheads out of flint I'll buy my arrowheads at the pro shop. And I'll
use SQL instead of OPNQRYF.
Rob Berendt
==================
A smart person learns from their mistakes,
but a wise person learns from OTHER peoples mistakes.
Chuck Lewis
<clewis@iquest.ne To: RPG400-L@midrange.com
t> cc:
Sent by: Subject: Re: Programing
Question/Authority...
owner-rpg400-l@mi
drange.com
07/26/2001 07:47
AM
Please respond to
RPG400-L
Great example and info Reeve, thanks.
OPNQRY can really do a lot - I started using it back in the S/38 days and
had the
"joy" of figuring out how to string stuff together for the QRYSLT with all
the
"s, etc :-) but once that was done WALLAH, some really powerful inquiry and
search programs !
Chuck
Reeve Fritchman wrote:
> Here's my solution:
> 1. Every program is executed by a command.
> 2. Use OPNQRYF to select records, etc. for batch reports. You can build
> LF's to force certain access paths to be maintained; there are OPNQRYF
> parameters that may help reduce your run time by controlling which access
> path you use.
> a. I maintain an LF by date/freight bill over a large order master file
with
> multiple years' data.
> b. Many reports run with a date range (by week, week-to-date, etc.)
> c. My OPNQRYF selects from this file and orders the data.
> d. Since I'm usually selecting a relatively small number of records from
the
> file, and since date range is a prime selection criterion, the OPNQRYF
> usually goes pretty fast.
> e. IMHO, OPNQRYF for batch jobs (supported by a few LF's) addresses both
> performance and security issues.
> f. On commands where work files are cleared, I use USER(*JOBD) and have
> QPMGR (the owner of all objects) on the JOBD.
> 3. Here's an example of how I prompt for some command parameters (dates,
> number of copies), block access to others (printer CPI, output queue),
and
> submit a job.
>
> CHGVAR VAR(&RQSDTA) VALUE('?DSM230' *BCAT '*N' *BCAT +
> &CT2DLL *BCAT '?-CPI(' *CAT &CT1P1D *CAT +
> ')')
> CALL PGM(QCMDCHK) PARM(&RQSDTA 2000)
> SBMJOB JOB(DSM230) JOBD(FR) OUTQ(&CT1P1O) RQSDTA(&RQSDTA)
>
> I've used this approach (commands, OPNQRYF, selective prompting) for a
long
> time at 100 installations of my system; it's proven to be extremely
reliable
> and flexible. It's not the only approach, of course, but it provides a
very
> reliable method of editing and passing dates into batch programs without
a
> lot of goofy programming.
>
> -----Original Message-----
> From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
> Behalf Of Chuck Lewis
> Sent: Wednesday, July 25, 2001 5:16 PM
> To: RPG400-L
> Subject: Programing Question/Authority...
>
> Hi Folks,
>
> Don't do this enough and can't for the LIFE of me figure it out...
>
> We are using 3rd party software and we can define "Fast Paths" that let
> user run programs we write outside of the 3rd party suite.
>
> I have written simple little RPG program that they call that prompts the
> user for a date and then submits a CL to run the report. Initially I was
> getting an error because the user is not authorized to the Submit
> command. I fixed this with a Job Description. This second CL creates a
> LF in QTEMP and then runs an RPG program to produce a listing. Well now
> they can't create the LF because the submitted job is running under the
> User Profile which does not have authority to do that.
>
> Is there an easy solution to this ? I've been buried in it now (along
> with juggling a BUNCH of other stuff) and have some ideas but wanted to
> avoid reinvent the wheel !
>
> Thanks,
>
> Chuck
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.