ASPL User Manual v 1.00
© 2025 SetSphere.com


12-16

   Environment Variables in a Shell: progenv.aspl

The script progenv.aspl gets the environment variables of a shell script or a program. progenv.aspl calls the grouping function ggprogenv(), that runs in the context of the element grouping class SYSENVGROUP, to gather the environment of thee program. To run the script, follow it by the program name.


 -LIS- Listing. 12.16.1   [LISTING progenv.aspl][ASPL Script progenv.aspl]
(raw text)
1.     #!/usr/bin/env aspl
2.     #ENVARG= -wsname TRANSIENT -groupingclass SYSENVGROUP -nostrictld 
3.     
4.     ;;***********************************************************************
5.     ;;
6.     ;;   progenv.aspl
7.     ;;   Copyright © 2021-2024 Bassem W. Jamaleddine
8.     ;;   Copyright © 2024 Total Computing & Network Design, Inc.
9.     ;;   All rights reserved.
10.    ;;   
11.    ;;***********************************************************************
12.    
13.    endScriptIfShellArgsLessThan 1  ;; end the script unless at least one 
      argument is passed 
14.    
15.    B = ggprogenv(grp1,L,program,$1,onlychanged,1)
16.    ;;B = ggprogenv(grp1,L,program,$1,onlychanged,0)
17.    
18.    print *** PROGRAM ENVIRONMENT VARIABLES ***
19.    dm 3
20.    v
21.    
22.    __END__
23.    
24.      $00 command to show the runtime environment variables of a program
25.    
26.         $00 must be followed the program name
27.    
28.      Example:
29.        $00  
      /opt/IBM-was8-mm07-CRAP/WebSphere/AppServer/profiles/AppSrv01/bin/runConfigActions.sh 
30.        $00  /opt/IBM/WebSphere/AppServer/bin/startServer.sh
31.    

ASPL© 2025 Bassem Jamaleddine




This example is shown in the following terminal.

viewme

 -TC- Display. 12.16.1   [Script progenv.aspl]
run for progenv-aspl-runConfigActions-links