/*
  total.dlg

*!  VERSION 1.2.2  12apr2011

  keyword:  eclass

*/

VERSION 12.0

INCLUDE _std_large
DEFINE _dlght 300
INCLUDE header


SCRIPT PREINIT
BEGIN
	program parseMessage
	script se_createAsSvyAnalytic
	program svy_check_title
END

PROGRAM parseMessage
BEGIN
	if __MESSAGE.contains("__MI__") {
		call script se_setMI_on
	}
END


SCRIPT POSTINIT
BEGIN
	script se_setTitleSeCluster
	script sub_set_over_on
	program se_setFinalInitState
END

SCRIPT svy_is_on
BEGIN
	//
END
SCRIPT svy_is_off
BEGIN
	//
END
PROGRAM svy_check_title
BEGIN
	if __MESSAGE.contains("-svy-") {
		call settitle "svy: total - Estimate totals for survey data"
	}
END

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

DIALOG main, tabtitle("Model")						///
	title("total - Estimate totals") // has svy title
BEGIN
  TEXT     tx_vars   _lft      _top      _cwd1     .,			///
		label("Variables:")
  VARLIST  vl_vars   _lft      _ss       _iwd      .,			///
		label("Variables:")
END

INCLUDE sub_by_ifin_over_subpop
INCLUDE weights_fpi
INCLUDE se
INCLUDE srsrpt

PROGRAM command
BEGIN
	put /program se_prefix_output " "
	put "total "
	varlist main.vl_vars
	put " " /program ifin_output
	put " " /program weights_output
	beginoptions
		put /program over_output
		put " " /program se_output
		put " " /program srsrpt_output
	endoptions
END
