( ** Go back to PARENTPAGE ../Script-reapenvcompare-aspl.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)

How to reap and compare the environment variables of two programs

An ASPL script to reap the environment variables by two programs. The script reapenvcompare.aspl is followed by two programs. In this example we call reapenvcompare.aspl to reap the WebSphere scripts startNode.sh and stopNode.sh

ASPL 1> ks varname varvalue chksum ppdd ffl
set ks-vector to varname varvalue chksum ppdd ffl

ASPL 2> displayoff
turn off display

ASPL 3> printblock *** REAPING ENV OF /opt/IBM/WebSphere/AppServer/bin/startNode.sh ***

ASPL 4> e1 = ggreapenv(grp1,L,program,/opt/IBM/WebSphere/AppServer/bin/startNode.sh,onlychanged,1,reaptimeout,3,nohup,1)
reap the env of program startNode.sh and assign it to set variable e1

ASPL 5> printblock *** REAPING ENV OF /opt/IBM/WebSphere/AppServer/bin/stopNode.sh ***

ASPL 6> e2 = ggreapenv(grp1,L,program,/opt/IBM/WebSphere/AppServer/bin/stopNode.sh,onlychanged,1,reaptimeout,3,nohup,1)
reap the env of program stoptNode.sh and assign it to set variable e2

ASPL 7> displayon
turn on display

ASPL 8> printblock *** COMPARING PROGRAMS ENVIRONMENT VARIABLES ***

ASPL 9> ,f& e1 e2
display the common environment variables between both programs startNode.sh and stopNode.sh

ASPL 10> printblock *** IN 1st NOT IN 2nd ENVIRONMENT VARIABLES ***

ASPL 11> ,f\ e1 e2
display the environment variables set in startNode.sh that are not set in stopNode.sh

ASPL 12> printblock *** IN 2nd NOT IN 1st ENVIRONMENT VARIABLES ***

ASPL 13> ,f\ e2 e1
display the environment variables set in stopNode.sh that are not set in startNode.sh

ASPL 14> printblock *** MATCHING PROGRAM ENVIRONMENT VARIABLES ***

ASPL 15> ,f&`ks= e1 e2
display the common environment variables between both programs startNode.sh and stopNode.sh that have the same values

ASPL 16> printblock *** DIFFERED PROGRAMS ENVIRONMENT VARIABLES ***

ASPL 17> ,f&`ks~ e1 e2
display the common environment variables between both programs startNode.sh and stopNode.sh that have different values

ASPL 18> printblock *** SIMILARITY COMPARISON ***

ASPL 19> sim e1 e2
display the similarity of environment variables in both programs

ASPL 20> dm 3
set the display mode to 3

ASPL 21> v
print the symbol table