Running PH from Cobol
Tim Ericson
tericson@denkor.com
Wed, 16 Feb 2000 15:52:40 -0800
Hi,
Mikael Olesen wrote:
> We are running PH 8.19C3 on HP3000 and I would like to know
> if anybody have tried running a Qdesign screen from a Cobol
> online program and also passing parameters between the screens?
Qdesign screens from COBOL are okay, but it's much more effecient
if a Qdesign screen can run the COBOL program (because COBOL can
be suspended from within Quick, and then re-activated, picking
up just where it left off, without having to re-open any files)
If you'd like a sample of that (developed from old "Cognos Tech
News" articles), let me know and I'll forward a sample.
As far as passing parameters, here's a way using MPE/iX system
variables, which would be easy to reverse for passing data from
COBOL to Qdesign screens:
In COBOL:
......
02 VARIABLE-NAME PIC X(16).
02 STATUS-RETURNED PIC S9(09) COMP.
02 STRING-VALUE PIC 9(09) COMP.
02 INPUT-INTEGER PIC S9(09) COMP.
02 PLACE-HOLD PIC X(02).
......
MOVE "SCH_THRU_DATE" TO VARIABLE-NAME.
MOVE 1 TO STRING-VALUE.
CALL INTRINSIC "HPCIGETVAR"
USING VARIABLE-NAME, STATUS-RETURNED,
STRING-VALUE, INPUT-INTEGER.
IF STATUS-RETURNED <> ZERO
DISPLAY "HPCIGETVAR 'SCH_THRU_DATE' failed in SCHREGEN."
GO TO 50-EXIT.
MOVE "SCH_PLACE" TO VARIABLE-NAME.
MOVE 2 TO STRING-VALUE.
CALL INTRINSIC "HPCIGETVAR"
USING VARIABLE-NAME, STATUS-RETURNED,
STRING-VALUE, PLACE-HOLD.
IF STATUS-RETURNED <> ZERO
DISPLAY "HPCIGETVAR 'SCH_PLACE' failed in SCHREGEN."
GO TO 50-EXIT.
......
In Qdesign:
......
TEMPORARY PASS-DATE-THRU CHARACTER * 8 RESET AT STARTUP
TEMPORARY PASS-PLACE CHARACTER * 2 RESET AT STARTUP
......
IF NOT SETSYSTEMVAL &
( "SCH_THRU_DATE", PASS-DATE-THRU )
THEN INFORMATION = "SETSYSTEMVAL failed in REGEN-SCHEDULE." NOW
ELSE NULL
IF NOT SETSYSTEMVAL &
( "SCH_PLACE", PASS-PLACE )
THEN INFORMATION = "SETSYSTEMVAL failed in REGEN-SCHEDULE." NOW
ELSE NULL
......
I hope this helps!
+-------------------------------------------------------------------+
My mind is my own, as are my ideas and opinions.
My heart, body, and soul, however, all belong to others. Tim.
+-------------------------------------------------------------------+
Tim Ericson tericson DenKor Dental Management Corp.
Sr. Systems Analyst at denkor 503-526-4440 (my direct number)
(& Systems Manager) dot com http://www.denkor.com
Programming HP3000s since 1983! Quality dental care since 1970!
+-------------------------------------------------------------------+
UDCs and Command Files: http://www.denkor.com/hp3000/command_files
+-------------------------------------------------------------------+
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.