ASPL User Manual v 1.00
© 2025 SetSphere.com
We want to start a process by executing a program on a computer system; then we want to capture and retrieve the set of environment variables that are currently available to the running process on that system.
The script reapenv.aspl reaps the environment of the program supplied as an argument to it. In the following example we show how to use the script to reap the environment of WebSphere JVM processes started by runConfigActions.sh, and compare the environment variables using ASPL set operators.
1. #!/usr/bin/env aspl 2. #ENVARG= -wsname TRANSIENT -groupingclass SYSENVGROUP -nostrictld 3. 4. ;;*********************************************************************** 5. ;; reapenv.aspl 6. ;; 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 script unless an argument is passed 14. 15. ggreapenv(grp1,LABEL,program,$1,onlychanged,1,reaptimeout,2,nohup,1) 16. ;;ggreapenv(grp1,LABEL,program,$1,onlychanged,0,reaptimeout,2,nohup,1) 17. 18. __END__ 19. 20. $00 command harvest the environment variables of a program 21. 22. $00 must be followed the program name 23. 24. Examples: 25. 26. $00 "/opt/IBM/WebSphere/AppServer/bin/startServer.sh server1" 27. 28. $00 "ls -l" 29. $00 "whichma R+ aspl" 30.
This example is shown in the following terminal.