# Putenv

Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)

Tags: program profiling

# Description

Export a variable to become an external environment variable so that child processes executed through subsequent PERFORM, EXECUTE or PROGRAM statements can see it.

putenv expression
1

where expression is the name and value of the external

An example of use may be as:

portno = 1001
PUTENV "JBCPORTNO=":portno
1
2

where the variable portno is created as 1001 and then made into an external environment variable. This is used in this example by jBASE to decide the port number of any subsequent programs that are loaded.

Environment variables are only exported to child processes. Once jkeyauto terminates, all the environment variables are lost.

Back to jKeyAuto