( ** Go back to PARENTPAGE ../Appendix-Functions-to-Compare-Groups.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)

Running Functions to Compare Groups

We show how to compare groups in ASPL by running the script run-functions-to-compare-groups.aspl with ASPL sample workspace WS1FNCMP. Many functions have been defined to compare two groups, their subgroups, and their elements.

ASPL 1> def
display the defined functions

ASPL 2> a1 = ggdir(dir,/tmp/aa1,nmdir,*,nmfl,*,calchksum,1,calentropy,1)
glob the directory /tmp/aa1 and assign it to set variable a1 representing the first group

ASPL 3> a2 = ggdir(dir,/tmp/aa2,nmdir,*,nmfl,*,calchksum,1,calentropy,1)
glob the directory /tmp/aa2 and assign it to set variable a2 representing the second group

ASPL 4> printblock *** CALLING cmp2sets() to compare two groups ***%%%CR*** {gU {g\, %%1 %%2}{g\, %%2 %%1}{g&, %%1 %%2}} ***
cmp2sets() to compare two groups: {gU {g\, %%1 %%2}{g\, %%2 %%1}{g&, %%1 %%2}}

ASPL 5> FN cmp2sets(a1,a2)
FN cmp2sets(a1,a2)

ASPL 6> printblock *** CALLING cmp2mtmeq() to compare two groups where mtimes are the same ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}} ***
cmp2mtmeq() to compare two groups where mtimes are the same: {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}}

ASPL 7> FN cmp2mtmeq(a1,a2)
FN cmp2mtmeq(a1,a2)

ASPL 8> printblock *** CALLING cmp2mtm() to compare two groups where mtimes are different ***%%%CR*** {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}{g&,`mtm~ %%1 %%2}} ***
cmp2mtm() to compare two groups where mtimes are different: {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}{g&,`mtm~ %%1 %%2}}

ASPL 9> FN cmp2mtm(a1,a2)
FN cmp2mtm(a1,a2)

ASPL 10> printblock *** CALLING cmp2chkeq() to compare two groups where checksums are the same ***%%%CR*** {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}{g&,`c= %%1 %%2}} ***
cmp2chkeq() to compare two groups where checksums are the same: {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}{g&,`c= %%1 %%2}}

ASPL 11> FN cmp2chkeq(a1,a2)
FN cmp2chkeq(a1,a2)

ASPL 12> printblock *** CALLING cmp2chk() to compare two groups where checksums are different ***%%%CR*** {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}{g&,`c~ %%1 %%2}} ****
cmp2chk() to compare two groups where checksums are different: {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}{g&,`c~ %%1 %%2}}

ASPL 13> FN cmp2chk(a1,a2)
FN cmp2chk(a1,a2)

ASPL 14> printblock *** CALLING fcmp2sets() to compare the elements of two groups ***%%%CR*** {fU {f\, %%1 %%2}{f\, %%2 %%1}{f&, %%1 %%2}} ****
fcmp2sets() to compare the elements of two groups: {fU {f\, %%1 %%2}{f\, %%2 %%1}{f&, %%1 %%2}}

ASPL 15> FN fcmp2sets(a1,a2)
FN fcmp2sets(a1,a2)

ASPL 16> printblock *** CALLING fcmp2mtmeq() to compare the elements of two groups where mtimes are the same ***%%%CR*** {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}{f&,`mtm= %%1 %%2}} ***
fcmp2mtmeq() to compare the elements of two groups where mtimes are the same: {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}{f&,`mtm= %%1 %%2}}

ASPL 17> FN fcmp2mtmeq(a1,a2)
FN fcmp2mtmeq(a1,a2)

ASPL 18> printblock *** CALLING fcmp2mtm() to compare the elements of two groups where mtimes are different ***%%%CR*** {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}{f&,`mtm~ %%1 %%2}} ***
fcmp2mtm() to compare the elements of two groups where mtimes are different: {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}{f&,`mtm~ %%1 %%2}}

ASPL 19> FN fcmp2mtm(a1,a2)
FN fcmp2mtm(a1,a2)

ASPL 20> printblock *** CALLING fcmp2chkeq() to compare the elements of two groups where checksums are the same ***%%%CR*** {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}{f&,`c= %%1 %%2}} ***
fcmp2chkeq() to compare the elements of two groups where checksums are the same: {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}{f&,`c= %%1 %%2}}

ASPL 21> FN fcmp2chkeq(a1,a2)
FN fcmp2chkeq(a1,a2)

ASPL 22> printblock *** CALLING fcmp2chk() to compare the elements of two groups where checksums are different ***%%%CR*** {fU {f\,`c= %%1 %%2}{f\,`c= %%2 %%1}{f&,`c~ %%1 %%2}} ***
fcmp2chk() to compare the elements of two groups where checksums are different: {fU {f\,`c= %%1 %%2}{f\,`c= %%2 %%1}{f&,`c~ %%1 %%2}}

ASPL 23> FN fcmp2chk(a1,a2)
FN fcmp2chk(a1,a2)

ASPL 24> printblock *** CALLING dcmp2sets() to compare the subgroups of two groups ***%%%CR*** {dU {d\, %%1 %%2}{d\, %%2 %%1}{d&, %%1 %%2}} ***
dcmp2sets() to compare the subgroups of two groups: {dU {d\, %%1 %%2}{d\, %%2 %%1}{d&, %%1 %%2}}

ASPL 25> FN dcmp2sets(a1,a2)
FN dcmp2sets(a1,a2)

ASPL 26> printblock *** CALLING dcmp2mtmeq() to compare the subgroups of two groups where mtimes are the same ***%%%CR*** {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}{d&,`mtm= %%1 %%2}} ***
dcmp2mtmeq() to compare the subgroups of two groups where mtimes are the same: {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}{d&,`mtm= %%1 %%2}}

ASPL 27> FN dcmp2mtmeq(a1,a2)
FN dcmp2mtmeq(a1,a2)

ASPL 28> printblock *** CALLING dcmp2mtm() to compare the subgroups of two groups where mtimes are different ***%%%CR*** {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}{d&,`mtm~ %%1 %%2}} ****
dcmp2mtm() to compare the subgroups of two groups where mtimes are different: {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}{d&,`mtm~ %%1 %%2}}

ASPL 29> FN dcmp2mtm(a1,a2)
FN dcmp2mtm(a1,a2)

ASPL 30> printblock *** CALLING uni2diff() to get the union of the differences between two groups ***%%%CR*** {gU {g\, %%1 %%2}{g\, %%2 %%1}} ***
uni2diff() to get the union of the differences between two groups: {gU {g\, %%1 %%2}{g\, %%2 %%1}}

ASPL 31> FN uni2diff(a1,a2)
FN uni2diff(a1,a2)

ASPL 32> printblock *** CALLING g2symdiff() to get the Symmtric Difference between two groups ***%%%CR*** {gD %%1 %%2} ***
g2symdiff() to get the Symmtric Difference between two groups: {gD %%1 %%2}

ASPL 33> FN g2symdiff(a1,a2)
FN g2symdiff(a1,a2)

ASPL 34> printblock *** CALLING f2symdiff() to get the elements Symmtric Difference between two groups ***%%%CR*** {fD %%1 %%2} ***
f2symdiff() to get the elements Symmtric Difference between two groups: {fD %%1 %%2}

ASPL 35> FN f2symdiff(a1,a2)
FN f2symdiff(a1,a2)

ASPL 36> printblock *** CALLING duni2diff() to get the subgroups union of the differences between two groups ***%%%CR*** {dU {d\ %%1 %%2}{d\ %%2 %%1}} ***
duni2diff() to get the subgroups union of the differences between two groups: {dU {d\ %%1 %%2}{d\ %%2 %%1}}

ASPL 37> FN duni2diff(a1,a2)
FN duni2diff(a1,a2)

ASPL 38> printblock *** CALLING d2symdiff() to get the subgroups Symmtric Difference between two groups ***%%%CR*** {dD %%1 %%2} ***
d2symdiff() to get the subgroups Symmtric Difference between two groups: {dD %%1 %%2} ***

ASPL 39> FN d2symdiff(a1,a2)
FN d2symdiff(a1,a2)

ASPL 40> printblock *** CALLING uni2diffmtmeq() to get the union of the differences between two groups where mtimes are the same ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}} ***
uni2diffmtmeq() to get the union of the differences between two groups where mtimes are the same: {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}}

ASPL 41> FN uni2diffmtmeq(a1,a2)
FN uni2diffmtmeq(a1,a2)

ASPL 42> printblock *** CALLING uni2diffmtm() to get the union of the differences between two groups where mtimes are different ***%%%CR*** {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}} ***
uni2diffmtm() to get the union of the differences between two groups where mtimes are different: {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}}

ASPL 43> FN uni2diffmtm(a1,a2)
FN uni2diffmtm(a1,a2)

ASPL 44> printblock *** CALLING uni2diffchkeq() to get the union of the differences between two groups where checksums are the same ***%%%CR*** {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}}
uni2diffchkeq() to get the union of the differences between two groups where checksums are the same: {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}}

ASPL 45> FN uni2diffchkeq(a1,a2)
FN uni2diffchkeq(a1,a2)

ASPL 46> printblock *** CALLING uni2diffchk() to get the union of the differences between two groups where checksums are different ***%%%CR*** {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}} ***
uni2diffchk() to get the union of the differences between two groups where checksums are different: {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}}

ASPL 47> FN uni2diffchk(a1,a2)
FN uni2diffchk(a1,a2)

ASPL 48> printblock *** CALLING funi2diff() to get the elements union of the differences between two groups ***%%%CR*** {fU {f\, %%1 %%2}{f\, %%2 %%1}} ****
funi2diff() to get the elements union of the differences between two groups: {fU {f\, %%1 %%2}{f\, %%2 %%1}}

ASPL 49> FN funi2diff(a1,a2)
FN funi2diff(a1,a2)

ASPL 50> printblock *** CALLING funi2diffmtmeq() to get the elements union of the differences between two groups where mtimes are the same ***%%%CR*** {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}} ***
funi2diffmtmeq() to get the elements union of the differences between two groups where mtimes are the same: {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}}

ASPL 51> FN funi2diffmtmeq(a1,a2)
FN funi2diffmtmeq(a1,a2)

ASPL 52> printblock *** CALLING funi2diffmtm() to get the elements union of the differences between two groups where mtimes are different ***%%%CR*** {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}} ***
funi2diffmtm() to get the elements union of the differences between two groups where mtimes are different: {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}}

ASPL 53> FN funi2diffmtm(a1,a2)
FN funi2diffmtm(a1,a2)

ASPL 54> printblock *** CALLING funi2diffchkeq() to get the elements union of the differences between two groups where checksums are the same ***%%%CR*** {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}} ***
funi2diffchkeq() to get the elements union of the differences between two groups where checksums are the same: {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}}

ASPL 55> FN funi2diffchkeq(a1,a2)
FN funi2diffchkeq(a1,a2)

ASPL 56> printblock *** CALLING funi2diffchk() to get the elements union of the differences between two groups where checksums are different ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}} ***
funi2diffchk() to get the elements union of the differences between two groups where checksums are different: {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}}

ASPL 57> FN funi2diffchk(a1,a2)
FN funi2diffchk(a1,a2)

ASPL 58> printblock *** CALLING duni2diffmtmeq() to get the subgroups union of the differences between two groups where mtimes are the same ***%%%CR*** {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}} ***
duni2diffmtmeq() to get the subgroups union of the differences between two groups where mtimes are the same: {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}}

ASPL 59> FN duni2diffmtmeq(a1,a2)
FN duni2diffmtmeq(a1,a2)

ASPL 60> printblock *** CALLING duni2diffmtm() to get the subgroups union of the differences between two groups where mtimes are different ***%%%CR*** {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}} ***
duni2diffmtm() to get the subgroups union of the differences between two groups where mtimes are different: {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}}

ASPL 61> FN duni2diffmtm(a1,a2)
FN duni2diffmtm(a1,a2)