PASSPORT Knowledge Base
Macros

Date Published: December 10, 2008
Date Updated: March 23, 2009

Title

Using a System Environment Variable in a PASSPORT Macro

Product

PASSPORT PC to Host, PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

Is there a way for me to grab a system environment variable and use it in a PASSPORT macro?

Solution

Yes, there is an environment variable in Passport called "PASSPORT". Here is a test macro:
 

Sub ZMain()

strEnv=Environ("PASSPORT")

MsgBox "The variable is: " & strEnv

End Sub
 

To test, you can go to Control Panel -> System -> Advanced -> Environment Variables and create a new variable with the name PASSPORT and any value.

More Information

Keywords

system, environment, variable, macro