/*
  tabulate ... , generate()

  VERSION 1.0.0  21dec2002

*/

VERSION 8.0

INCLUDE _std_small
INCLUDE header

HELP hlp1, view("help tabulate")
RESET res1

DIALOG main, label("tabulate ..., generate() - Create indicator variables") /*
		*/ tabtitle("Main")
BEGIN
  /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+*/ 
  TEXT     tx_var          _lft      _top       _cwd1    .,		/*
  		*/label("Variable to tabulate:")
  VARNAME  vn_var          @         _ss        _vnwd    .,		/*
  		*/label("Variable to tabulate")
  TEXT     tx_gen          _lft2     _top       _cwd1    .,		/*
  		*/label("New variables' stub:")
  EDIT     ed_gen          @         _ss        _vnwd    .,		/*
  		*/label("New variables' stub") max(31)			/*
  		*/option(generate) default(new_)
  CHECKBOX ck_miss         _lft      _ls        _iwd     .,		/*
  		*/label("Treat missing values like all others")		/*
  		*/option(missing)
END

INCLUDE ifin

PROGRAM command
BEGIN
	put "quietly tabulate "
	varlist main.vn_var
	INCLUDE _ifin_pr
	beginoptions
		require main.ed_gen
		optionarg main.ed_gen
		option main.ck_miss
	endoptions
END

