ASPL User Manual v 1.00
© 2025 SetSphere.com
The script reapenvcompare.aspl reaps the environment variables of two programs on the UNIX system. Here we show how to reap WebSphere startNode.sh and stopNode.sh to compare their environment variables.
1. #!/usr/bin/env aspl 2. #ENVARG= -groupingclass SYSENVGROUP -wsname TRANSIENT -singlepass 3. 4. ;;*********************************************************************** 5. ;; reapenvcompare.aspl 6. ;; Reap two programs processes and gather their environment variables 7. ;; then compare these variables. 8. ;; Copyright © 2025 Bassem W. Jamaleddine 9. ;; 10. ;;*********************************************************************** 11. 12. endScriptIfShellArgsLessThan 2 ;; make sure at least two arguments passed 13. 14. ks varname varvalue chksum ppdd ffl 15. displayoff 16. printblock *** REAPING ENV OF $1 *** 17. e1 = ggreapenv(grp1,L,program,$1,onlychanged,1,reaptimeout,3,nohup,1) 18. printblock *** REAPING ENV OF $2 *** 19. e2 = ggreapenv(grp1,L,program,$2,onlychanged,1,reaptimeout,3,nohup,1) 20. displayon 21. 22. printblock *** COMPARING PROGRAMS ENVIRONMENT VARIABLES *** 23. ,f& e1 e2 24. printblock *** IN 1st NOT IN 2nd ENVIRONMENT VARIABLES *** 25. ,f\ e1 e2 26. printblock *** IN 2nd NOT IN 1st ENVIRONMENT VARIABLES *** 27. ,f\ e2 e1 28. 29. printblock *** MATCHING PROGRAM ENVIRONMENT VARIABLES *** 30. ,f&`ks= e1 e2 31. printblock *** DIFFERED PROGRAMS ENVIRONMENT VARIABLES *** 32. ,f&`ks~ e1 e2 33. printblock *** SIMILARITY COMPARISON *** 34. sim e1 e2 35. dm 3 36. v 37. 38. endscript 39. 40. __END__ 41. 42. $00 command harvests the environment variables of two programs 43. 44. $00 must be followed the fully specified pathes of two programs 45. 46. Examples: 47. 48. $00 /opt/IBM/WebSphere/AppServer/bin/stopNode.sh /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/runConfigActions.sh 49.
The run of the script reapenvcompare.aspl of reaping the startNode.sh and stopNode.sh is shown in the following terminal.