Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
rexx(1)			    General Commands Manual		       rexx(1)

       rexx - general purpose programming language

       rexx [ -options ] [ -x ]	[ filename | - ] [ arguments ...]
       rexx [ -options ] -{sc} instructions [ arguments	...]
       rexx [ -options ] -i [ arguments	...]
       rexx -v

       Rexx  is	a procedural programming language that allows programs and al-
       gorithms	to be written in a clear and structured	way,  and  it  is  de-
       signed to be easy to use	as well	as flexible.  It keeps the use of spe-
       cial characters to a minimum to promote readability, and	does not  pre-
       vent  the  use  of  keywords as variables or program labels.  It	uses a
       single datatype,	namely the string of characters.  Rexx has been	 stan-
       dardised	by the American	National Standards Institute, although the ma-
       jority of interpreters are not yet fully	compliant.  Most  interpreters
       do  however  follow  the	 reference  work  `The Rexx Language' by M. F.
       Cowlishaw, second edition.

       The interpreter documented by this manual page  is  from	 the  REXX/imc
       package.	  The  syntax of the Rexx language is described	in other docu-
       ments from that package.	 This manual page contains a summary of	how to
       invoke the Rexx interpreter.

       In  the	first  form of invocation, rexx	is supplied with the name of a
       program to execute.  (Systems supporting	the `#!' notation  invoke  in-
       terpreters  this	 way.)	 If  the filename parameter is omitted or is a
       single hyphen then the program will be read from	 the  standard	input;
       otherwise  the  program	will  be read from the given file.  The	inter-
       preter will search for the program along	the path given by the environ-
       ment  variable REXXPATH or (if that is not set) PATH.  If filename does
       not contain a dot and the file `filename.rexx' can be found then	it  is
       read and	executed; otherwise filename is	treated	as the literal name of
       the file	to be executed.

       In the second form of invocation	the program is supplied	 as  a	single
       list  of	 instructions  following the -s	or -c flags (which are equiva-
       lent).  Note that this list will	usually	need to	be supplied in	quotes
       to stop the shell from tokenising it.  The instructions will be treated
       just as if they had been	read in	from a program file.

       The -i flag supplies a minimal program to the interpreter  which	 makes
       it  enter interactive trace mode, in which instructions may be typed in
       and will	be executed immediately.   This	 should	 be  ended  by	typing

       The  command `rexx -v' with no further arguments	causes the interpreter
       to print	its version information	and exit.

       Any text	remaining after	the flags and program name have	been processed
       is  collected  up and passed to the Rexx	program	as a parameter string.
       This parameter string should not	begin with a hyphen,  or  it  will  be
       mistaken	 for  a	 flag; the exception is	when the filename parameter is
       present:	this terminates	flag processing	and all	further	text is	 taken
       to be the program's argument string.

       The following are valid flags.

       -c string
	      Same as -s string.

       -i     Equals: -t?a -s 'do forever;nop;end'

       -s string
	      Specifies	a string of instructions to execute as a program.

       -tval  Executes	the  Rexx  instruction	`TRACE val' before running the

       -v     Causes the version string	to be printed.	If this	 is  the  only
	      option  then  the	 interpreter  exits, otherwise it continues as

       -x     Stops the	interpreter from appending `.rexx' to the  file	 name,
	      and makes	it ignore the first line of the	file (which can	there-
	      fore be a	line of	shell script used to invoke the	 interpreter).
	      This  flag  ends	argument  processing and the next parameter is
	      taken to be the literal name of the file to execute.

       Any keyword recognised by the Rexx OPTIONS instruction is also a	 valid
       flag  for the interpreter when preceded by a hyphen.  These are as fol-

	      Allow `PROCEDURE EXPOSE' at the beginning	of a program.

	      Disallow `PROCEDURE EXPOSE' at the beginning of a	program.

	      Do not make input	and output operations set the RC special vari-

	      Exit when	a SIGPIPE signal is received.

       -setrc Make input and output operations set the RC special variable.

	      Trap SIGPIPE signals instead of exiting.

	      Send  trace  output to the named file.  The name can be `stdout'
	      or `stderr' to send trace	output to the standard output or stan-
	      dard  error,  respectively.   This  option may be	abbreviated to

       See the REXX/imc	language reference for more information.

       REXXEXT	The default filename extension added to	the names of Rexx pro-
		grams (default `.rexx').

       REXXIMC	The directory in which the rxque(1) program can	be found (this
		only needs to be set if	for some reason	the interpreter	cannot
		find it, or if a different version is required).

       REXXLIB	The  (colon-separated)	path in	which to search	for Rexx func-
		tion libraries or shared objects requested  by	RxFuncAdd  and
		RexxRegisterFunctionDll.  The default value was	chosen at com-
		pile time to be: /usr/local/lib.

       REXXFUNC	The path in which to search for	external  functions  requested
		by Rexx	programs.  The default value is	the value of REXXPATH.

       REXXPATH	The  path in which to search for the program named on the com-
		mand line.  The	default	value is the value of  PATH  with  the
		current	directory appended.

       RXSTACK	Used  in  the interface	between	the Rexx stack and its clients
		(including the interpreter itself).  If	set  it	 contains  the
		name  of  the  communication  socket.	See  rxque(1)  and the
		REXX/imc technical reference for more details.

       rxque(1), rxstack(1), The REXX/imc documentation.

       Too slow	and too	much of	a hack.

       See the REXX/imc	language reference for specific	limitations.

       Ian Collier <>

       REXX/imc	is copyright, but free.	 Permission is granted	to  use,  copy
       and redistribute	its code, provided that	the same permission is granted
       to all recipients, and that due acknowledgement is given	to the author.

       This software is	provided on an as-is basis in the hope that it will be
       useful.	It comes with no warranty of any kind, either expressed	or im-
       plied, and the author will not be  held	responsible  for  any  damages
       arising out of the use of the software.

				 February 1999			       rexx(1)


Want to link to this manual page? Use this URL:

home | help