An XTAB session: (Red is what the use enters).

After signing on to the machine the user enters:

. /home/xtab/bin/xtabup

This creates the XTAB environment. This creates access to two scripts (xtabpp, and xtabgo).

xtabpp - Runs the XTAB preprocessor, and tests for errors.
xtabgo - Runs the XTAB preprocessor, and tests for errors, and executes the generated program.

Now use an editor to create an XTAB program: (In this case ule)

-->ule p001

>>>> Holg's ule (Unix Line Editor) V2.0 (04/02/99)

>>>>        111111 Lines Maximum!

>>>>>>>> help = ?; FULL HELP = http://www.holg.com/ule

>>>>>>>>NEW FILE
>>>>>>>>    FILE :p001

>>>>>>>> # Lines :     0

   0E>i *files
   1E>i  input /home/xtab/demo/xtabdemodata.txt
   2E>i
   3E>i *variables
   4E>i  race/Race/23
   5E>i  sex/Sex/24
   6E>i
   7E>i *tables
   8E>i  table Table 001:,Sex by Race,Breakdown
   9E>i  labels Male,Female
  10E>i  stub sex codes M,F
  11E>i  labels White,Black,Hispanic,Asian,Other
  12E>i  spread W,B,H,O,U
  13E>sq

>>> FILE <p001>   13 Lines Written

-->

Now test the program using xtabpp:

-->xtabpp p001

>> XTAB PreProcessor V0.9 (2000/01/09)

>> Documentation: http://www.holg.com/xtab

     1. *files
     2.  input /home/xtab/demo/xtabdemodata.txt
     3.
     4. *variables
     5.  race/Race/23
     6.  sex/Sex/24
     7.
     8. *tables
     9.  table Table 001:,Sex by Race,Breakdown
    10.  labels Male,Female
    11.  stub sex codes M,F
    12.  labels White,Black,Hispanic,Asian,Other
    13.  spread W,B,H,A,O

$ERROR: Undefined Variable: W,B,H,A,O

ERRORS: 1

-->

The program has errors, correct the errors and resubmit:

-->ule p001

>>>> Holg's ule (Unix Line Editor) V2.0 (04/02/99) 

>>>>        111111 Lines Maximum!

>>>>>>>> help = ?; FULL HELP = http://www.holg.com/ule

>>>>>>>>    FILE :p001
>>>>>>>> # Lines :    13

   0E>13
    13.> spread W,B,H,A,O
  13E>r^        race codes^
    13.> spread race codes W,B,H,A,O
  13E>sq

>>> FILE <p001>   13 Lines Written

Errors now corrected, now resubmit:

-->xtabpp p001

>> XTAB PreProcessor V0.9 (2000/01/09)

>> Documentation: http://www.holg.com/xtab

     1. *files
     2.  input /home/xtab/demo/xtabdemodata.txt
     3.
     4. *variables
     5.  race/Race/23
     6.  sex/Sex/24
     7.
     8. *tables
     9.  table Table 001:,Sex by Race,Breakdown
    10.  labels Male,Female
    11.  stub sex codes M,F
    12.  labels White,Black,Hispanic,Asian,Other
    13.  spread race codes W,B,H,A,O

./p001.pl syntax OK

-->
Now that the program is error free it can be executed with xtabgo:

-->xtabgo p001 >> XTAB PreProcessor V0.9 (2000/01/09) >> Documentation: http://www.holg.com/xtab 1. *files 2. input /home/xtab/demo/xtabdemodata.txt 3. 4. *variables 5. race/Race/23 6. sex/Sex/24 7. 8. *tables 9. table Table 001:,Sex by Race,Breakdown 10. labels Male,Female 11. stub sex codes M,F 12. labels White,Black,Hispanic,Asian,Other 13. spread race codes W,B,H,A,O XTAB - Perl CrossTabulation Program Table 001: Sex by Race Breakdown Sex Race TOTAL White Black Hispanic Asian Other TOTAL 1000 303 300 220 118 59 Male 604 198 171 126 79 30 Female 396 105 129 94 39 29 # READ: 1000 # SELECTED: 1000 Time ended: Fri Jan 12 09:43:10 PST 2001 Time began: Fri Jan 12 09:43:10 PST 2001 -->