ASPL Programming ver 1.00
© 2024 Bassem W. Jamaleddine


11-4

   Comparing Java TX JAR Files

[Comparing Java TX JAR Files]

WORKSPACE TXJAR DESCRIPTION:

This is workspace is used to show how to use ASPL set operators to compare Java Transaction TX JAR files. In the tutorial the 'aspl >' refers to the ASPL prompt, and the '#' refers to the shell prompt.

aspl -wsname WS1 -groupingclass POSIX
    (start ASPL by loading WS1 workspace)

①  aspl> v
    (to view the set variables)

②  aspl> tx1 = ggjar(jarfile,/tmp/TX/27238-tx.jar,calchksum,1,calentropy,1)
    (assign contents of JAR file 27238-tx.jar to tx1)

③  aspl> tx2 = ggjar(jarfile,/tmp/TX/38141-tx.jar,calchksum,1,calentropy,1)
    (assign contents of JAR file 38141-tx.jar to tx2)

④  aspl> tx3 = ggjar(jarfile,/tmp/TX/38478-tx.jar,calchksum,1,calentropy,1)
    (assign contents of JAR file 38478-tx.jar to tx3)

⑤  aspl> tx4 = ggjar(jarfile,/tmp/TX/45240-tx.jar,calchksum,1,calentropy,1)
    (assign contents of JAR file 45240-tx.jar to tx4)

⑥  aspl> tx1xa = ggjar(jarfile,/tmp/TX/27238-tx.jar,calchksum,1,calentropy,1,nmfl,*XA*)
    (assign contents of JAR file 27238-tx.jar filtering XA names to tx1xa)

⑦  aspl> tx2xa = ggjar(jarfile,/tmp/TX/38141-tx.jar,calchksum,1,calentropy,1,nmfl,*XA*)
    (assign contents of JAR file 38141-tx.jar filtering XA names to tx2xa)

⑧  aspl> tx3xa = ggjar(jarfile,/tmp/TX/38478-tx.jar,calchksum,1,calentropy,1,nmfl,*XA*)
    (assign contents of JAR file 38478-tx.jar filtering XA names to tx2xa)

⑨  aspl> tx4xa = ggjar(jarfile,/tmp/TX/45240-tx.jar,calchksum,1,calentropy,1,nmfl,*XA*)
    (assign contents of JAR file 45240-tx.jar filtering XA names to tx2xa)

⑩  aspl> tx1tr = ggjar(jarfile,/tmp/TX/27238-tx.jar,calchksum,1,calentropy,1,nmdir,*ransact*)
    (assign contents of JAR file 27238-tx.jar filtering TRANSACTION names to tx1tr)

⑪  aspl> tx2tr = ggjar(jarfile,/tmp/TX/38141-tx.jar,calchksum,1,calentropy,1,nmdir,*ransact*)
    (assign contents of JAR file 38141-tx.jar filtering TRANSACTION names to tx2tr)

⑫  aspl> tx3tr = ggjar(jarfile,/tmp/TX/38478-tx.jar,calchksum,1,calentropy,1,nmdir,*ransact*)
    (assign contents of JAR file 38478-tx.jar filtering TRANSACTION names to tx1tr)

⑬  aspl> tx4tr = ggjar(jarfile,/tmp/TX/45240-tx.jar,calchksum,1,calentropy,1,nmdir,*ransact*)
    (assign contents of JAR file 45240-tx.jar filtering TRANSACTION names to tx4tr)

⑭  aspl> DEF FN cmp2sets := {gU {g\, %%1 %%2}{g\, %%2 %%1}{g&, %%1 %%2}}
    (define function cmp2sets() to compare two set variables)

⑮  aspl>  FN cmp2sets(tx1,tx2)
    (execute function cmp2sets() to compare tx1 and tx2)

⑯  aspl> f&`c~ tx1 tx2 tx3 tx4
    (show the intersections of elements with different checksums)

⑰  aspl> f&`c= tx1 tx2 tx3 tx4
    (show the intersections of elements with same checksums)

⑱  aspl> f&`c= tx1 tx2
    (show the intersections of elements with same checksums)

⑲  aspl> f&`c= tx1 tx3
    (show the intersections of elements with same checksums)

⑳  aspl> f&`c= tx3 tx4
    (show the intersections of elements with same checksums)

⑴  aspl> f&`c~ tx3 tx4
    (show the intersections of elements with different checksums)

This example is shown in the following terminal.