include

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
STANDARD INCLUDE FILES
COPYRIGHT
SEE ALSO

NAME

$include − RWP*Load Simulator directive for file inclusion

SYNOPSIS

$include:"filename"

$include:<filename>

DESCRIPTION

Includes the named file (the name cannot contain the characters ", < or >) very similar to what #include does in C or @ does in sqlplus. As an example, this can be used to replace a long list of file names provided as arguments to rwloadsim by a single file having multiple $include directives.

$include files can themselves contain other $include directives for multiple levels of inclusion. You can only use $include when you are not parsing a statement, declaration or thread execution and the file included must similarly contain a complete rwl program element. The double quote or < > characters are part of the $include directive. Unless -no-nameexpand option or the $nameexpand:off directive is used, environment names in either $NAME or ${NAME} syntax will be expanded before opening the include file. The same syntax with $ for environment expansion is also used on Microsoft Windows. You can also use $n where n is a single digit between 1 and 9 to expand the value of a positional argument to rwloadsim.

If the filename is embedded within the characters < and > instead of ", the name cannot start with . or / and the current directory will not be searched for the file; in stead the public directory will be searched first. In any case, unless the the first character of the file is / or ., the search path environment variable RWLOADSIM_PATH will be searched for the file. If the --publicsearch option is provided, and the file name is embedded within " characters, the public directory will be search before any directories in the RWLOADSIM_PATH environment.

EXAMPLES

Include two files from the current directory:

$include:"myfile1.rwl"
$include:"myfile2.rwl"

If you save the following in a file named with a .rwl suffix

$longoption:publicsearch
$include:<ovid2.rwl>


integer i;
for i := 1..10 loop
  printline ovidstring(i);
end loop;

you can execute it using rwloadsim without any other options than the filename. The $longoption:publicsearch directive enables the search for include files in the public directory, from where the next directive $include:<ovid2.rwl> will cause the file ovid2.rwl to be included. The function, ovidstring(), defined in there is then executed ten times displaying different lines of gibberish.

STANDARD INCLUDE FILES

The following lists all files that are available in the public directory for include in your rwl program.

ovid2.rwl

Provides functions that can be used to create random but nicely looking strings.

COPYRIGHT

Copyright © 2023 Oracle Corporation

Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl

SEE ALSO

rwl(1rwl), directive(1rwl), rwloadsim(1rwl), ovid2(2rwl)