NAME

     txustart, ustart.tx  -  Execute  an  ARRIS	 text-based  user
     start-up file


SYNOPSIS

     :txustart;='filename'


LEVEL

     1s


DESCRIPTION

     The :txustart command reads the contents  of  the	indicated
     filename  and  executes the specified instructions	described
     below in the FILE FORMAT section.

     When ARRIS	is first started, it will check	for the	existence
     of	 the  text  file  ustart.tx  in	the user's home	directory
     ($GRUSR).	If found, this file will  be  automatically  exe-
     cuted.  If	the file does not exist, then the user's compiled
     :ustart sigmac (if	any) will be automatically executed.


FILE FORMAT

     User start-up command files may contain any of the	following
     instructions.  Each instruction must be on	a single line and
     follow the	indicated format.  Instructions	start with a key-
     word  preceded by the three characters "@#@" and followed by
     a semicolon (;).  Each subsequent argument	is separated by	a
     semicolon.	 Blank lines will be ignored.
     ____________________________________________________________

     #;comment

     Enter a comment into the text file.   All	comment	 text  is
     simply  ignored.	Note that comment lines	do not begin with
     "@#@".

	 comment:  A  single  line  of	comment	 text  which  may
		   include any characters.



	 Example:
		   #;This is a comment.	 Ignore	me!
     ____________________________________________________________

     @#@CMD;command[[;#type;value];...];endmark

     Specify a sigmac command to be executed.




	 command:  The sigmac command to be executed.  This  must
		   be preceded by either a ":" or "::".

		   [Note: Use the @#@CMDBUF statement to  execute
		   $utilities().]

	 #type:	   This	is an optional	argument  that	indicates
		   the	format of the following	value and must be
		   one of: #int	to indicate  an	 integer  number,
		   #real to indicate a real number, #str to indi-
		   cate	a character string, or #point to indicate
		   a point.

	 value:	   This	is an  optional	 argument  that	 will  be
		   passed to the command as it is being	executed.
		   Each	value must be preceded by a corresponding
		   #type     specifier.	    Include    as    many
		   "#type;value" pairs as  are	required  by  the
		   command.

	 endmark:  This	is a required  argument	 which	indicates
		   the	end  of	the command.  Specify 0	(zero) to
		   simply execute the command, or -1  to  execute
		   the	command	followed by the	repeating command
		   terminator "::".



	 Examples:
		   @#@CMD;:da;0
		   @#@CMD;:mn_line;#str;b;#point;A0;#point;A(2,4);-1
     ____________________________________________________________

     @#@CMDBUF;command

     Specify a sigmac command or ARRIS utility for deferred  exe-
     cution.

	 command:  The sigmac command or $utility() string to  be
		   executed.  Sigmac commands must be preceded by
		   either a ":"	or "::".

		   All commands	or utilities specified using this
		   keyword  are	 stored	until after the	remainder
		   of the ustart.tx is processed, at which  point
		   they	 will be executed, using $bufad(), in the
		   order in which  they	 occurred  in  the  file.
		   Note	that @#@GLOB also uses this same deferred
		   execution method,  so  the  ordering	 of  both
		   instructions	within the file	is important.


		   Unlike the @#@CMD instruction, no special for-
		   matting  of	the  command  string is	required.
		   Simply specify the  command	as  it	would  be
		   entered   at	  the	keyboard,  including  any
		   required colons (:) or semicolons (;).



	 Examples:
		   @#@CMDBUF;:da
		   @#@CMDBUF;::dpe
		   @#@CMDBUF;:mnline;b;A0;A(2,4)
		   @#@CMDBUF;$setlid('A	new layer description')
		   @#@CMDBUF;$setvar(#fsides, 12);:mn_pol;A0;A4
     ____________________________________________________________

     @#@END;

     This mandatory instruction	is used	to indicate  the  end  of
     the    executable	  section    of	  the	ustart.tx   file.
     ____________________________________________________________

     @#@FLAG;#app;#flag;#type;value

     Specify a system flag value to be set.

	 #app:	   Specify the application indicator flag.   This
		   is typically	set to 0 (zero)	for normal system
		   variables, or one of	#apdim,	#apffe,	#applist,
		   #appstat, #aprn, #aprndr, or	#apwall.

		   [Note:  Other #app flags  may  be  defined  by
		   other applications.]

	 #flag:	   Specify any valid system flag that is to  have
		   its value set.

	 #type:	   Specify the format of the following value.  It
		   must	 be  one  of: #int to indicate an integer
		   number, #real to indicate a real number,  #str
		   to  indicate	 a character string, or	#point to
		   indicate a point.

	 value:	   Specify the value that the indicated	#flag  is
		   to  be  assigned.  The assignment is	performed
		   through a call to $setflg().



	 Examples:
		   @#@FLAG;0;#fcol;#int;29
		   @#@FLAG;0;#ftxrtz;#real;22.5
		   @#@FLAG;#apwall;#wlwdtg;#real;0.75
     ____________________________________________________________

     @#@GLOB;global;value

     Initialize	a global variable (with	deferred execution).

	 global:   The global variable to be  initialized.   This
		   must	 follow	 the  standard	naming convention
		   that	integer	variable  names	 begin	with  the
		   letter  "i",	 string	variable names begin with
		   "s",	point  variable	 names	begin  with  "p",
		   delta variable names	begin with "d" and every-
		   thing else is considered to be real,	 although
		   by  convention,  real variable names	typically
		   begin with the letter "r".

	 value:	   Specify the value to	be assigned to the  vari-
		   able.   All	variable  assignments  using this
		   keyword are stored until after  the	remainder
		   of  the ustart.tx is	processed, at which point
		   they	will be	executed using $bufad(),  in  the
		   order  in  which  they  occurred  in	the file.
		   Note	 that  @#@CMDBUF  also	uses  this   same
		   deferred  execution method, so the ordering of
		   both	instructions within the	 file  is  impor-
		   tant.



	 Example:
		   @#@GLOB;smn_txsamp;ABC 123
		   @#@GLOB;smn_ctfile;mycatalog.ct
		   @#@GLOB;pmn_riloc;R(12.5,-18.2)
     ____________________________________________________________

     @#@MENU;menu

     Display a menu on the screen.

	 menu:	   The name of the menu	to be  displayed  on  the
		   screen.    Typically,  ARRIS	 menu  names  are
		   specified in	uppercase.



	 Example:
		   @#@MENU;QUERY
     ____________________________________________________________

     @#@MESS;delay;message

     Display a text message on the message line.

	 delay:	   The number of seconds to display  the  message
		   before  erasing it.	If a value of zero (0) is
		   specified, the message will not be erased.

	 message:  The text string to be displayed on the message
		   line.



	 Example:
		   @#@MESS;1;Executing commands	in ustart.tx file
     ____________________________________________________________

     @#@MNLIB;library

     Load an ARRIS menu	library.

	 library:  Load	the specified menu library (*.ml).  ARRIS
		   will	  search   in	the   standard	locations
		   ($GRPATH) for the specified file.   To  insure
		   that	 the  proper  file is loaded, specify the
		   full	pathname.



	 Example:
		   @#@MNLIB;mymenus.ml
     ____________________________________________________________

     @#@SMLIB;library

     Load an ARRIS sigmac library.

	 library:  Load	 the  specified	 sigmac	 library  (*.sm).
		   ARRIS  will	search	in the standard	locations
		   ($GRPATH) for the specified file.   To  insure
		   that	 the  proper  file is loaded, specify the
		   full	pathname.



	 Example:
		   @#@SMLIB;mysigmacs.sm
     ____________________________________________________________

     @#@VAR;#app;#var;#type;value

     Specify a system variable value to	be set.


	 #app:	   Specify the application indicator flag.   This
		   is typically	set to 0 (zero)	for normal system
		   variables, or one of	#apdim,	#apffe,	#applist,
		   #appstat, #aprn, #aprndr, or	#apwall.

		   [Note:  Other #app flags  may  be  defined  by
		   other applications.]

	 #var:	   Specify any valid system variable that  is  to
		   have	its value set.

	 #type:	   Specify the format of the following value.  It
		   must	 be  one  of: #int to indicate an integer
		   number, #real to indicate a real number,  #str
		   to  indicate	 a character string, or	#point to
		   indicate a point.

	 value:	   Specify the value that the indicated	 #var  is
		   to  be  assigned.  The assignment is	performed
		   through a call to $setvar().



	 Examples:
		   @#@VAR;0;#fcrdir;#int;1
		   @#@VAR;0;#udbunt;#int;#dbfeet
		   @#@VAR;#apwall;#xhbound;#int;2
     ____________________________________________________________


PROMPTS

     Filename>
	 Enter the name	of the	text-based  (*.tx)  user  command
	 file to be executed.


NOTES

     o	Upon start-up,	ARRIS  will  execute  either  the  user's
	ustart.tx  file	 or,  if  that	file  does not exist, the
	user's :ustart compiled	sigmac.	 To force  the	execution
	of  both,  include  the	 following line	at the end of the
	ustart.tx file:

	 @#@CMDBUF;:ustart

     o	Sometimes in the ustart.tx file	it is  desirable  to  set
	certain	 parameters  for  one of the plug-in modules.  In
	some cases there appears to be a sequencing problem  when
	including  these  commands  in the ustart.tx file itself.
	Although the plug-in module is loaded before the  parame-
	ters  are  set,	 the  parameters  may  be  reset to their
	default	values before the ARRIS	 initialization	 sequence
	completes.

	For example, let's say we wish to  set	the  Architecture
	module's  wall	closure	parameter to type 'oo'.	 We first
	need to	load the plug-in module	with the command:

	   :mn_appask;='y'

	and then set the wall closure with:

	   :y_wprm;='closure';='oo'

	In the :ustart file, the following commands look correct,
	but fail to work:

	   @#@CMD:mn_appask;#str;y;0
	   @#@CMDBUF;:y_wprm;#str;closure;#str;oo;0

	After much investigation, one solution to the problem  is
	as  follows.   First,  create  a  new user.tx file in the
	$GRUSR directory that contains the following commands:

	   :mn_appask;='y'
	   :y_wprm;='closure';='oo'

	and then add the following line	to the :ustart file:

	   @#@CMDBUF;$flin('user.tx')


FILES

     $ARRIS/src/bdd/ff_commands/gr_txustart.ff
	  The sigmac source file for the :txustart command.

     $GRUSR/ustart.tx
	  The default text-based user start-up command file.


RELATED COMMANDS

     :strt
	 The ARRIS start-up sigmac which  automatically	 executes
	 either	the :txustart or the :ustart sigmac.

     :ustart
	 The user start-up sigmac.  This  is  a	 compiled  sigmac
	 that	 will	 be   automatically   executed	 if   the
	 $GRUSR/ustart.tx file does not	exist.


CREDITS

     Although this documentation was compiled  by  analyzing  the
     sigmac source code, I would like to acknowledge the previous
     information made available	by a number of people posting  to
     the  ARRIS	mailing	list.  In particular, Steve Clark submit-
     ted his own comprehensive notes on	this subject  which  were
     used to cross-check and augment this information.


AUTHOR

     C.	Jeffery	Small (jeff@cjsa.com)


COPYRIGHT

     Copyright c 1999-2006 by CJSA LLC
















































Man(1) output converted with man2html