IBM

Query Time application

This example is a NetRexx version of one of the earliest Rexx programs; it displays the time in 'plain English'.

Here's the source, as a plain ASCII file.

To run the program, create or copy the 'qtime.nrx' file in your current directory, and then enter the commands


  java COM.ibm.netrexx.process.NetRexxC qtime

  java qtime

These would:

  1. Call the NetRexx translator to translate the program from NetRexx to Java
  2. Call the Java compiler (javac) to compile the program into a class file
  3. Call the Java interpreter (java) to interpret the class file, which should then display the time in words.

Note that the Java runtime (e.g., from the Java Development Kit) must be installed.

If you have the netrexxc command script available, you can compile and run the sample, using just:


  netrexxc -run qtime


[ IBM | Help | Legal | Privacy ]