Chapter 4-7: Predefined Fields and Processes Cover Page GET CMD LINE PARMGET FILE FROM CLIENT

GET ENV VAR


This subroutine retrieves the contents of an environment variable. Two arguments are expected to be passed to the subroutine:

·    Desired environment variable (alpha field, maximum length 132)

·    Buffer for returned value (alpha field, maximum length 2048 or 2K)

·    Must be PASS'ed shared.

·    Returns contents of specified environment variable.

The subroutine can be invoked via SUBR or GOSUB.

The following example retrieves the contents of the PATH environment variable and stores it in a work field.

          SET      --- TEMP 132                   =      PATH
          SET      --- TEMP 2K                    =
          *
          PASS     --- TEMP 132                   FIELD            SHARE? N
          PASS     --- TEMP 2K                    FIELD            SHARE? Y
          SUBR     --- GET ENV VAR                      DETACHED     END? N  FAIL 0
          *
          SET      CSY WORK PATH ENV VAR          =  --- TEMP 2K

 

APPX Application Design Manual (01/13/03) Cover Page GET CMD LINE PARMGET FILE FROM CLIENT

© 2003 by APPX Software, Inc. All rights reserved