Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
Veryant Knowledge Base
Home > All Categories
> isCOBOL General > How does a program detect at runtime whether it is running standalone GUI, thin client or with Web Direct 2.0?
How does a program detect at runtime whether it is running standalone GUI, thin client or with Web Direct 2.0?
To determine where the user interface is running, whether standalone (Java Swing), thin client or in a web browser (Web Direct 2.0), add the following to your program:
01 GUI-FACTORY-NAME PIC X(44) VALUE SPACES. 88 IS-JAVA-SWING VALUE SPACES. 88 IS-WEB-DIRECT-2-0 VALUE
"com.iscobol.gui.client.zk.GuiFactoryImpl".
88 IS-CHARACTER VALUE
"com.iscobol.gui.client.charva.GuiFactoryImpl".
ACCEPT GUI-FACTORY-NAME
FROM ENVIRONMENT "guifactory.class".
and then you can test for the UI type using the condition variables. For example, to test for Web Direct 2.0:
IF IS-WEB-DIRECT-2-0 THEN
...
END-IF.
If IS-JAVA-SWING is true then use the following code to determine whether the Java Swing GUI is running locally or remotely via thin client:
ACCEPT TERMINAL-ABILITIES FROM TERMINAL-INFO
IF IS-REMOTE THEN
...
END-IF
Authored
by: Veryant Support
This question has been viewed 8952 times so far.
Click
Here to View all the questions in isCOBOL General
category.
File Attachments
There are no attachment file(s) related to this question.
User Comments
There are no user comments for this question. Be the first to post a comment. Click Here