PDQ
Glenn A. Mitchell
g.mitchell@computer.org
Tue, 19 Oct 1999 12:47:19 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01BF1A30.144B6120
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I posted a question about PDQ recently. I found that PDQ is no longer
available from the vendor (and it didn't support PDL anyway.) My
application used it a lot to avoid the overhead of starting up QUIZ all the
time for many short reports. I have experimented with a technique to use
process handling to minimize this overhead for QUIZ (and QTP as well). That
technique is outlined below and shown in the three files attached.
Caveat: The following has been tested for PH8.19C4 QUICK/QUIZ on MPE/iX 5.5
PP 7 only! YMMV.
Credits: Several of the ideas embodied here came from a SupportLink article
found on COGNOS' website: "Suspension and Reactivation of PowerHouse
Sub-processes on MPE/iX" by Jonathan Heywood, Xeleton Systems B.V., The
Netherlands
There are three files attached:
SIPROC.CBL - a simple COBOL program which allows Powerhouse components
access to the GETPROCID and ACTIVATE intrinsics necessary for process
handling.
RUNQUIZ.TXT - a QUICK USE file which contains an internal procedure to be
called whenever you want to run/resume QUIZ
TESTQZ.TXT - a test QUICK program which runs QUIZ on one of two source
files: TEST and TEST1
Compile SIPROC and install it in an XL.
Compile the QUICK screen.
SETJCW QZPIN=0 <<set to zero to insure a clean
start>>
QUICK AUTO=TESTQUIZ;XL=XLFILE.group.account <<MUST include fully-qualified
XL name!!>>
The procedure for suspending QUIZ simply checks the QZPIN JCW to see if an
instance of QUIZ has already been started. If so, it activates that PIN and
QUIZ runs taking its input from QUIZUSE. If not, the procedure creates a
new instance of QUIZ which process QUIZUSE, gets the PIN of the QUIZ
process, and stores it in the QZPIN JCW. Use of a JCW is a little hokey,
but it allows me to share a single copy of QUIZ among a whole bunch of
screens in an application w/o passing data around.
I believe this same technique works equally well for QTP.
Glenn A. Mitchell Mailto:g.mitchell@computer.org
3GM Associates, Inc
Portland, ME 04102
207-772-9370
-----Original Message-----
From: John Backus [mailto:john@beechglen.com]
Sent: Tuesday, October 19, 1999 8:55 AM
To: Glenn A. Mitchell
Subject: Re: PDQ
Glenn,
It has been a long time since I have seen this done. How did you get this
to work? Would it be possible to present a sample screen with code and
whatever is needed and submit to the PowerHouse list? I am sure I am not
the only one who would benefit.
Thanks,
John Backus
Beechglen Development, Inc.
> I have figured out how to run both QUIZ and QTP suspended from my QUICK
> session and simply change the QUIZ/QTPUSE file equation as needed to run
the
> appropriate compiled program. That covers most of my performance concerns
> as most of these online reports aren't all that big anyway; mostly startup
> overhead.
------=_NextPart_000_0007_01BF1A30.144B6120
Content-Type: text/plain;
name="runquiz.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="runquiz.txt"
; Procedure to run QUIZ or reactivate it if it is already going
;
; Parameters:
; temp QZ-PIN-JCW integer size 4
; temp QZ-CMD-STRING char size 20
; temp QZ-PIN integer size 2
; temp QZ-NUM-SON integer size 2 initial 0 reset at startup
;
; Issue run command "FILE QUIZUSE=filename" before invoking
;
; For consistent results, :SETJCW QZPIN=0 before starting QUICK
;
procedure internal RUNQUIZ
begin
let QZ-PIN-JCW = jcw("QZPIN")
if QZ-PIN-JCW <= 0
then begin
run command "QUIZ SUSPEND"
do external NM "getpin" (QZ-NUM-SON, QZ-PIN)
let QZ-CMD-STRING = "SETJCW QZPIN=" + ASCII(QZ-PIN)
run command QZ-CMD-STRING
end
else begin
let QZ-PIN = QZ-PIN-JCW
do external NM "activate" (QZ-PIN)
end
end
------=_NextPart_000_0007_01BF1A30.144B6120
Content-Type: application/octet-stream;
name="siproc.cbl"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="siproc.cbl"
$CONTROL DYNAMIC 10 OCT99
IDENTIFICATION DIVISION. 10 OCT99
PROGRAM-ID. SIPROC. 10 OCT99
* THIS PROGRAM PROVIDES QUICK-CALLABLE VERSIONS OF THE 10 OCT99
* GETPROCID AND ACTIVATE INTRINSICS FOR PROCESS HANDLING 10 OCT99
* OBJECT CODE SHOULD BE ADDED TO AN XL: 10 OCT99
* ADDXL FROM=$OLDPASS;TO=XLFILE;SHOW;MERGE 10 OCT99
DATA DIVISION. 10 OCT99
LINKAGE SECTION. 10 OCT99
01 LS-PIN PIC S9(4) COMP. 10 OCT99
01 LS-NUM-SON PIC S9(4) COMP. 10 OCT99
PROCEDURE DIVISION. 10 OCT99
0000-MAINLINE SECTION. 10 OCT99
ENTRY "GETPIN" USING LS-NUM-SON 10 OCT99
LS-PIN. 10 OCT99
CALL INTRINSIC "GETPROCID" USING LS-NUM-SON 10 OCT99
GIVING LS-PIN 10 OCT99
GOBACK. 10 OCT99
* 10 OCT99
* 10 OCT99
ENTRY "ACTIVATE" USING LS-PIN. 10 OCT99
CALL INTRINSIC "ACTIVATE" USING LS-PIN 10 OCT99
\2\ 10 OCT99
GOBACK. 10 OCT99
------=_NextPart_000_0007_01BF1A30.144B6120
Content-Type: text/plain;
name="testqz.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="testqz.txt"
RECSIZE=80;LANGUAGE=1
screen testquiz menu
temp QZ-PIN-JCW integer size 4
temp QZ-CMD-STRING char size 20
temp QZ-PIN integer size 2
temp QZ-NUM-SON integer size 2 initial 0 reset at startup
use runquiz.medrec.library
procedure designer T1
begin
run command "file quizuse=test"
do internal RUNQUIZ
run command "reset quizuse" refresh screen
end
procedure designer T2
begin
run command "file quizuse=test1"
do internal RUNQUIZ
run command "reset quizuse" refresh screen
end
build
------=_NextPart_000_0007_01BF1A30.144B6120--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.