Context keyword service – PB Docs 2022

Context keyword service

Use the context keyword service to access environment information
for the current context. In the default environment, this service
returns host workstation environment variables.

Accessing environment
variables

When running in the PowerBuilder execution environment (the
default context), you use this service to return environment
variables.

To access environment variables:

  1. Declare an instance or global variable of type ContextKeyword.
    Also declare an unbounded array of type String to contain returned
    values:

  2. Create the context information service by calling the
    GetContextService function:

  3. Call the GetContextKeywords function to access the environment
    variable you want. This example calls the GetContextKeywords
    function to determine the current application Path:

  4. Extract values from the returned array as necessary. When
    accessing environment variables, the array should always have a
    single element:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x