One of the most important is the extensive library of built-in functions. The fact that there are a large number for character string manipulation has already been mentioned. But there are many others in the standard list. And most REXX implementations add many more of their own which a/e specialized for specific environments. Some of the standard functions are:

  • DATE ()- Returns the current date in a variety of formats
  • TIME( ) - Returns he current time in a variety of formats and permits elapsed timing
  • VALUE ( ) - Allows access to variables whose names are determined at run-time
  • SYMBOL ( ) - Indicates whether a given variable has been initialized or not
  • DATATYPE ( ) - Returns the character or numeric type of a variable

There are also a number of built-in functions for file I/O. Though REXX's I/O model is relatively simple, it does encompass files, which are organized as either a sequence of characters or a sequence of records. Subject to the capabilities of the underlying file system, the I/O functions permit random access to any location in a file. More specialized I/O functions are usually provided with each particular REXX Implementation.

REXX has a simple but convenient model of exceptional event handling. This allows programmers to make their code more robust by pro-viding handlers for a variety of exceptional circumstances, such as uninitialized variables, I/O errors, and user-generated interrupts. The handlers can either attempt to recover from the condition, or at least permit graceful termination of the program, with appropriate error message and cleanup of any resources that may have been in use. Lastly, REXX has simple debugging capabilities as part of the language definition. Through the TRACE instruction, it is possible to trace program execution at varying levels of detail. You can request a trace of each statement executed, the evaluated results of an expression, or even the intermediate results during expression evaluation. The trace can be nonstop, or interactive. During interactive tracing, you*can execute any REXX statement, so you can display and change variables, call subroutines, issue system commands, and so forth. It is also possible to re-execute most program statements during interactive tracing, so that debugging can often continue after errors without a need to rerun the program.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics