|
William N. Harrell, Jr. wrote: > > We are trying to find a way to route user's queries to a > special JOBQ. Batch queries get submitted with the Job > Name of the user's JOBD. > Here's a tip from the NEWS/400 web site! Best regards, Carsten Flensburg Query/400 User Profile Options With V3R1 PTF SF32079, IBM added support for data area QQUPRFOPTS to Query/400, letting you customize the runtime environment settings for a user profile. At higher release levels, support for the data area is included in Query/400. Figure 2 shows the new settings and options. In the figure, "SBMJOB" refers to WRKQRY (Work with Queries) panel option 8, Run in batch. To enable the new function, you must create data area QQUPRFOPTS in a library contained in your library list. This way, you can control the different settings through library list setup. To create the data area, execute the following command: CRTDTAARA DTAARA(yourlib/QQUPRFOPTS) + TYPE(*CHAR) + LEN(80) + VALUE(settings) + AUT(*USE) + TEXT('Query/400 User Profile Options') To ease maintenance, an operational approach would be to let the appropriate settings point to a named job description specified in positions 16 through 36 of the data area and then, for each data area, to create an individual job description defining the referred attributes. Changing a job description is easier and less error-prone than changing a data area. "Appropriate settings" refers to the attributes that have a possible parameter value of *JOBD, except JOB which should have the value *QRY to let users more easily identify their queries on the Work with Submitted Jobs panel: Attribute: Recommended value: Options available: RTGDTA . . . : ' ' *JOBD, QCMDB OUTQ . . . . : 'J' *JOBD, *CURRENT, *USRPRF, *DEV PRTDEV . . . : 'J' *JOBD, *CURRENT, *USRPRF, *SYSVAL INQMSGRPY . : 'J' *JOBD, *RQD, *DFT, *SYSRPYL JOB . . . . : '*QRY' *QRY, *JOBD, name JOBD . . . . : 'yourjobd jobdlib' name, *USRPRF JOBQ . . . . : '*JOBD' *JOBD, name Create job description yourjobd with the RTGDTA, OUTQ, PRTDEV, INQMSGRPY, and JOBQ attributes you want. Then, if you ever need to change one or more of these attributes, you can use the CHGJOBD (Change Job Description) command with its built-in parameter validity checker instead of having to deal with the CHGDTAARA (Change Data Area) command and its string offset and length requirements. Figure 2: Figure 2 - Query/400 user profile options Setting Position Options Cursor placement 1 'N' = Cursor placement is when running in the same as when not debug mode in debug mode. ' ' = Place cursor on message line when screen is first displayed and message exists (same as now) RTGDTA parameter 2 'B' = QCMDB (QBATCH) for SBMJOB ' ' = *JOBD OUTQ parameter 3 'J' = *JOBD (default) for SBMJOB 'C' = *CURRENT 'U' = *USRPRF 'D' = *DEV PRTDEV parameter 4 'J' = *JOBD (default) for SBMJOB 'C' = *CURRENT 'U' = *USRPRF 'S'= *SYSVAL INQMSGRPY parameter 5 'J' = *JOBD (default) for SBMJOB 'R' = *RQD 'D' = *DFT 'S' = *SYSRPYL JOB parameter 6-15 *JOBD = Job desciption name is for SBMJOB used. *QRY = Query definition name is used. name = 10-character name associated a with query batch job. JOBD parameter 16-35 *USRPRF = Job description from for SBMJOB user profile is used name = 10 + 10 character names of job description + library. JOBQ parameter 36-55 *JOBD = Job description job for SBMJOB queue is used. name = 10 + 10 character names of job queue + library. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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-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.