![[Toc]](../../toc.gif)
![[Index]](/idx.gif)
Creating a token image
The OS/2 REXX interpreter stores a tokenized copy of each executed REXX
program in the EAs of the program. Before executing a REXX program, the
interpreter first checks if the tokenized copy in the EAs is still valid
and, if so, executes the tokenized copy and ignores the source code. In
this case no new tokenizing is necessary.
Because the length of the EAs is limited to 64 KB, it is useful to avoid
token images greater than 64 KB for often-used REXX programs.
To get the length of the token image of your REXX program use the
following OS/2 commands:
REM --- delete all existing EAs
eautil REXXProgram nul /s
REM --- create the token image
REXXProgram //t
REM --- write the length of the EAs
REM (=token image) to STDOUT
dir REXXProgram /n
The length of the token image is the second size shown by the dir command.
If this value is 0, either the token image of your REXX program is greater
than 64 KB or the program has not token image (practically the only time
the latter would be true would be if the REXX program has never been run
before). In this case you should split your REXX program into two or more
smaller programs.
If you're using Object-Oriented REXX ignore the above. Instead, use the
program REXXC from Object REXX to create a token image of your REXX
programs. REXXC saves the token image in a file and not in the EAs.
Therefore there is no 64 K limit using this method. (see also "Compiling"
REXX programs)
Note: The CMD replacement 4OS2/32 (v2.0 ... v2.5b) shows an invalid size
for the EAs of a file if they are using more than 32,767 bytes.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs