IODE Reports

IODE reports are special files with an extension .rep that contain a set of instructions and macros. They are used to automate tasks, generate documents, and control the execution of various operations within IODE.

The execution of a report can be controlled interactively (ASK and PROMPT functions) or programmatically (GOTO). By using macros (define) and report arguments, the same report can be used in different situations.

The present section is split into the following sub-sections:

Reports Definition

A report is a text file containing a set of instructions, macros, and free text, whose interpretation and execution result, on the one hand, in the chaining of operations (loading a file, estimating, simulating, etc.) and, on the other hand, in the construction of a”finished” document. This document can be a paper document or an RTF, MIF, CSV, or even HTML file.

Reports Structure

A report is a text file with an extension .rep that can be edited with any text editor or within the graphical interface.

A report contains the following types of information:

  • free text: titles, comments, etc.

  • A2M commands (text formatting)

  • report execution commands

  • macros

  • LEC expressions

  • report functions

  • IODE commands

Full Screen Commands

The IODE commands can open box dialogs if the report is executed in the graphical interface.

Full screen commands consist of a keyword preceded by the character # and have the following syntax:

#command

For example: the command:

#WsLoadVar or #WsLoad

will popup an input box dialog allowing you to specify the name of the variable file to load.

Inline Commands

Inline commands consist of a keyword preceded by the character $ and have the following syntax:

$command [options] [parameters]

For example, the command:

$WsLoadVar fun.var

will load the content of the file named fun.var into the variables workspace.

The keyword of inline commands often includes two parts (this is the case for all inline commands that manipulate objects): the actual command (generally identical to the full screen command) and a suffix qualifying the manipulated object. For example, the full screen command #WsLoad corresponds to the inline commands $WsLoadVar, $WsLoadIdt, etc., respectively for the variable and identity objects. The valid suffixes are as follows (not all are valid for all functions):

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    prf,    dif,    mif,    rtf,    ps,
asc,    txt,    htm,    csv

Syntax Rules

The $ or # character indicating a command MUST start the line and be DIRECTLY followed by the command keyword (if it is a command to execute). A $ or # character located further in the line will be printed as is. Therefore, there can only be one command per report line.

The keyword can be written in lowercase, uppercase, or both. For example:

WsLoadVar == wsloadvar == WSLOADVAR

Commands whose result (error or name) should be ignored are indicated with a - sign between the $ (or #) and the keyword. For example, if the command:

$-WsLoadTbl

fails, its result will be ignored (no action will be executed regardless of the $OnError command).

Commands whose $ or # sign is repeated twice ($$ or ##) will be printed in the report without being executed.

Comments

Lines where the $ or # sign is followed by a space are comment lines, not printed and not executed.

Nesting

Reports can be nested (unlimited number of nestings), that is, a report can execute another report.

Example

The following report loads a table definition file and a series file, displays a message, builds the tables, prints them, and ends execution with a beep sound:

$wsloadvar bist92\\bistel
$wsloadtbl bist92\\tbistelf

$printdest bist92\\bistelf1.a2m
#show processing french tables  file 1/2
$printnbdec 1
$PrintTbl 89:8 HYPEIR
$PrintTbl 89/88:8 HYPEIIR

$printnbdec 0
$PrintTbl 89:8 RESL00

$printnbdec 1
$PrintTbl 89/88:8 RESL00R
$PrintTbl 89:8 RESL03
#beep

The produced report also contains any error messages.

Execution Commands

These commands can be preceded by either the $ or # character and control the execution flow of the report.

The available execution commands (keywords) are:

  • $abort : interrupts the report (current and upper levels)

  • $ask : prompts a question

  • $beep : produces a beep sound

  • $chdir : changes the current directory

  • $debug : indicates the file and line currently being executed

  • $define : defines a macro

  • $foreach : loops over a list of values

  • $goto : (un)conditional branch to a label

  • $incrtime : increments the variable t (default is 1) for the calculation of LEC formulas defined in the report

  • $indent : enables or disables indentation of accepted instructions

  • $label : marks a branch point

  • $maximize : maximizes the IODE window

  • $minimize : minimizes the IODE window

  • $mkdir : creates a new directory

  • $multiline: enables or disables writing a command over multiple lines

  • $msg : displays a message and waits for a key press

  • $next : ends a loop

  • $noparsing: enables or disables parsing of text between backquotes

  • $procdef : defines a procedure

  • $procend : ends the definition of a procedure

  • $procexec : executes a procedure

  • $onerror : action to take in case of error

  • $prompt : defines a macro by prompting the user

  • $quit : exits IODE

  • $quitode : exits IODE

  • $repeat : loops over the arguments

  • $repeatstring : defines the characters to be replaced in $repeat

  • $return : exits the current report

  • $rmdir : deletes an empty directory

  • $settime : sets the variable t for the calculation of LEC formulas defined in the report

  • $shift : shifts the report arguments one position to the left

  • $show : displays a message at the bottom of the screen

  • $sleep : pauses the process for a short period

  • $system : executes a system command

  • $vseps : redefines the separators used by the functions @vdrop(), @vtake(), and @vcount().

COMMAND $DEFINE

This command allows you to define macros that can be used later in the report and its sub-reports. A macro is a kind of global variable that remains defined throughout the execution of the current report.

Syntax:

$Define name text
name := name used to refer to the content (text) of the
        macro (the name must start with a letter and not
        exceed 10 characters)

The name is referenced in a report by enclosing it in % signs:

$Define a Hello World!
$Show %a%

Example:

$Define VAR A
$GoTo exist {$DataExistVar %VAR%}
$Show Variable %VAR% does not exist
$Return
....
$Label exist
$Show Variable %VAR% exists
$Return
...

If a report has arguments, these can be used as macros whose name is %n%, where n is the argument number. The special value %0% contains the number of arguments passed when calling the report. For instance, the exist.rep report below:

$Define VAR %1%
$GoTo exist {$DataExistVar %VAR%}
$Show Variable %VAR% does not exist
$Return
....
$Label exist
$Show Variable %VAR% exists
$Return
...

executed with A as an argument, checks if the variable A exists.

You can also store calculated values in macros:

$Define PNB {PNB}
$Define GPNB {r PNB * 100}
The value of PNB is %PNB% (difference of %GPNB% percent)

Uppercase/lowercase mode

If the percent sign is immediately followed by the character:

  • # : the content of the macro is converted to uppercase

  • ! : the content of the macro is converted to lowercase

  • - : non-alphanumeric characters are removed from the macro

The following commands:

$define TABLE_NAME TBL1
$define ARG0 Abc[-3]
First table: %!TABLE_NAME%
Second table: %#TABLE_NAME%
ARG1: %ARG0O%
ARG2: %-ARG0%

will produce at execution:

First table: tbl1
Second table: TBL1
ARG1: Abc[-3]
ARG2: Abc3

COMMAND $LABEL

This instruction indicates and names a branch point in a report. This branch point can later be reached by an instruction such as $goto or $ask.

Example:

$label again
$goto fin {%0%=0}
#show arg0 : %1%
$DataCalcVar %1% if(%1%=0, 1/0, %1%)
$shift
$goto again
$label fin

In this example, all 0 are replaced by NA for the list of variables (initially unknown) passed as parameters to the report. As a reminder, %0% is the number of arguments, %1% is the first argument, etc.

COMMAND $GOTO

This command performs a jump to a branch point (label) in the current report.

Syntax:

$GoTo label [{condition}]
label := branch point indicated by the Label command
condition := LEC expression or report command

Note: If the label does not exist, the execution of the report (and all higher-level reports) is interrupted.

Use case:

...
$Label loop
...
$GoTo loop
...

It is also possible to construct certain tests to direct the subsequent execution of the report.

If a condition is placed after the label name, it is executed first. The condition can be either an IODE command (for example $DataExistVar) or an LEC formula (for example, t != 1993Y1). The command or the LEC formula must be placed between curly braces {}. The Goto occurs if the IODE command can be validly executed or if the result of the LEC formula is nonzero. To differentiate an IODE command from an LEC formula, the command must always start with the $ character.

Example (command):

...
$GoTo exist {$DataExistVar A}
$Show Variable A does not exist
$Return
....
$Label exist
$Show Variable A exists
$Return
...

or (LEC formula):

...
$GoTo end {X + Y > 1000}
...
$Return
....
$Label end
$Show X + Y exceeds the limit of 1000
$Return
...

It is also possible to invert the result of an IODE command, just as with an LEC formula. To do this, simply place an exclamation mark ! after the $.

Example:

...
$GoTo notexist {$!DataExistVar A}
$Show Variable A does exist
$Return
....
$Label notexist
$Show Variable A does not exist
$Return
...

In the same way, LEC formulas can easily be adapted to return the desired value (! operator).

COMMAND $ONERROR

This command specifies the action to take when an error is encountered in an IODE command, if the error should not be ignored (indicated by a - after the $ or #). The possible actions are: RETURN, ABORT, QUIT, DISPLAY (default), PRINT, NOPRINT, and IGNORE (default):

  • The IGNORE action is the default: ignores the error and continues executing the report.

  • The RETURN action interrupts the current report, returning to the upper level if applicable.

  • The ABORT action interrupts the current report and all higher-level reports.

  • The QUIT action terminates the IODE program. It is especially useful in combination with the -rep option of the iodecmd program.

  • The DISPLAY action is active by default; it prints an error message in the report corresponding to the error encountered during the execution of the last IODE command. It also displays all corresponding error messages on the screen.

  • The PRINT action only prints the error messages.

  • The NOPRINT action suppresses the printing of the message.

Notes:

  • The actions RETURN, ABORT, QUIT, and IGNORE are mutually exclusive. The action executed is the one corresponding to the last ONERROR command encountered.

  • The actions DISPLAY, PRINT, and NOPRINT are also mutually exclusive but can be combined with one of the four instructions above.

  • Only one action can appear per command line.

Syntax:

$OnError action
action := RETURN, ABORT, QUIT, IGNORE, DISPLAY, PRINT or NOPRINT

Example:

$OnError noprint
$OnError ignore
...
$OnError noprint
$OnError abort
...

COMMAND $RETURN

This instruction indicates that the execution of the current report is finished. If it is a sub-report, the calling report continues.

Syntax:

$Return

Example:

Report createvar.rep
---------------------
# Create series %1%
$GoTo exist {$DataExistVar %1%}
$DataCalcVar %1% 0.9
$Show Variable %1% created
$Return
$Label exist
$Show Variable %1% exists

Call
-----
$ExecRep createvar A

COMMAND $ABORT

This instruction indicates that the execution of the report must be interrupted. If the current report is a sub-report, all higher-level reports will also be interrupted.

Syntax:

$Abort

Example:

...
$GoTo continue {$DataExistVar A}
$Show Variable A does not exist
$Abort
....
$Label continue
...

COMMAND $QUITODE

See $QUIT.

COMMAND $QUIT

This instruction indicates that the execution of the report must be interrupted and that the graphical interface must be closed.

Syntax:

$Quit

Example:

$WsLoadVar refsim
$ModelSimulate 1997Y1 1998Y1
$WsSaveVar myws
$Quit

This function is particularly useful when a report is launched from a command file (DOS or Unix). By allowing IODE to exit, it returns control to the command file, which can then proceed with another program (printing, another simulation, etc.).

COMMAND $SHOW

This command produces a beep sound and displays a message in a new box dialog of the graphical interface during the execution of the report.

Syntax:

$Show message
message := any text

COMMAND $MSG

This command displays the text of the argument and waits for a key press before continuing. This allows you to temporarily pause the report to display a message to the user, unlike the $show function which displays in a box dialog but does not pause.

Syntax:

$Msg message
message := any text

COMMAND $BEEP

This command produces a beep sound during the execution of the report.

Syntax:

$Beep

COMMAND $ASK

This command displays a question to which the answer can be Yes or No.

  • If the answer is No, the report continues on the next line.

  • If the answer is Yes, the execution of the report resumes from the indicated label.

  • If the label does not exist, the execution of the report (and all higher-level reports) is interrupted. The question and the label are separated by a comma , or a semicolon ;.

Syntax:

$Ask label,question

where label    := branch point indicated by the Label command
      question := any text

Example:

...
$Label loop
...
$Ask loop,return to loop?
...

COMMAND $PROMPT

This command allows you to define macros that can be used later in the report and its sub-reports. A macro is a kind of global variable that remains defined throughout the execution of the current report.

The Prompt function asks a question to the report user and stores their answer in a variable that can be used later in the report.

Syntax:

#Prompt VarName Question
Question := question to be asked
VarName := name used to refer to the content (text) of the
           macro (the name must start with a letter and not
           exceed 10 characters)

The name is referenced in a report by enclosing between two % signs.

Example:

#Prompt Begin Start period?
$SetTime %Begin%

COMMAND $SETTIME

This command sets the period t for which the LEC formulas used in the reports must be calculated. It MUST be executed before calculating an LEC formula in a report, otherwise the execution period is unknown and the formula will not be executed.

Syntax:

$SetTime period
period := the period value to assign to t

The following report lines:

$SetTime 1991Y1
The value of PNB for the year {t@T} is {PNB} billion.

produce the output:

The value of PNB for the year 1991Y1 is 4000.32 billion.

COMMANDE $INCRTIME

This command increases the period t by as many units as indicated. If no argument is given, the increment is set to 1.

Syntax:

$IncrTime [step]
step := number of periods to add

The following report lines:

$SetTime 1990Y1
$Label print
The value of PNB for the year {t@T} is {PNB} billion.
$IncrTime 5
$goto print {t < 2000Y1}
$Return

produce the result:

The value of PNB for the year 1990Y1 is 4132.32 billion.
The value of PNB for the year 1995Y1 is 4240.32 billion.

COMMAND $SYSTEM

This report command is used to execute a system command. Once the command is executed, the report continues on the next line. The system command (followed by any parameters) is passed as an argument. Multiple commands can be chained together; they must be separated by a semicolon ;. Before executing the system command, the terminal is reset to standard mode and the screen is cleared. After executing the command, the screen is restored to its initial state.

Warning

WARNING

  • No verification is performed regarding the validity or appropriateness of the system command. A command like del *.* or format c: is accepted.

  • Memory space is limited for executing the system command because IODE remains loaded in memory (DOS version).

  • It may be useful to end the list of system commands to execute with the PAUSE command (in DOS) in order to temporarily keep the terminal in standard mode (to view the results of the system command).

Syntax:

$System command1 [;command2;...]
command := valid operating system command [+ arguments]

Example:

$System qode -d qms result.a2m

COMMAND $SHIFT

This function shifts the report arguments one position to the left. As a result, the first argument is lost. This feature allows you to perform operations on an unknown number of elements. Since %0% represents the number of report arguments, after $shift, this value is decremented. In this way, a simple calculated $goto as in the example below allows you to exit the loop as soon as %0% is zero.

Example:

$label again
$goto end {%0%=0}
#show arg0 : %1%
$DataCalcVar %1% if(%1%=0, 1/0, %1%)
$shift
$goto again
$label end

COMMAND $MINIMIZE

Warning

OBSOLETE

This command minimizes the IODE window (for example, to display Excel charts generated by the current simulation).

Syntax:

$Minimize

COMMAND $MAXIMIZE

Warning

OBSOLETE

This command restores the IODE window.

Syntax:

$Maximize

COMMAND $SLEEP

Pauses the process for n milliseconds. This allows a client to retain control in case of requests that are too fast.

Syntax:

$Sleep n

where n = number of milliseconds to pause.

COMMAND $DEBUG

This command displays in the output window the name of the current report and the current line. It thus makes it easy to identify a problematic line in case of an error, for example.

Syntax:

$debug {Yes|No}

COMMAND $REPEAT

This function allows you to execute a command on a list of arguments without having to create a report for this purpose. The position of the argument in the command to be repeated is represented by the string defined by $repeatstring. By default, the underscore character _ is the replacement character.

Syntax:

$repeat command arg1 arg2 arg3

where command is executed for each argument by replacing _ with arg1, then arg2, etc.

Examples:

  1. Sorting multiple lists:

    $RepeatString ++
    $Repeat "$DataListSort ++ ++" A B C
    

is equivalent to the three commands:

$DataListSort A A
$DataListSort B B
$DataListSort C C

2. Duplicate Vars: With the @fn() functions, you can copy all the variables from a workspace in a single operation:

$Repeat "$DataDuplicateVar _ _1" @vexpand(*)

COMMAND $REPEATSTRING

This function allows you to specify the characters to be replaced in the first argument of $repeat. By default, this string consists of only the underscore character _.

Syntaxe:

$RepeatString string

Exemple:

$RepeatString --
$Repeat "$DataListSort -- --" A B C

COMMAND $CHDIR

This report command changes the current directory. Files are always loaded relative to the current directory. At the end of the report, the previous directory is NOT restored.

Syntax:

$chdir dirname
dirname := directory name (relative or absolute)

Example:

$chdir ..
$chdir c:\usr\iode

COMMAND $MKDIR

This report command creates a new directory.

Syntax:

$mkdir dirname
dirname := directory name (relative or absolute)

Example:

$mkdir ..\test
$mkdir c:\usr\iode\test

COMMAND $MULTILINE

By default, a report line can be continued on the next line if it ends with a space followed by a backslash \. In this case, the newline character \n is inserted between the lines.

This allows you, for example, to construct equations in a report that span several lines, making them easier to read.

To prevent this extension (for compatibility with previous versions), simply place the $multiline 0 command before the relevant lines. Without an argument, multi-lines are accepted.

Syntax:

$multiline [{Nn0}]

For example, you can now write:

$multiline 1
$DataUpdateEqs A A := c1 + \
c2 * t

The definition of the equation A will then be on two lines.

Conversely, without multiline, an error is generated. For example:

$multiline 0
$DataUpdateEqs A A := c1 + \
c2 * t

tries to create an equation ending with + \, which produces the following result:

essais.rep[23] - $multiline 0
essais.rep[24] - $DataUpdateEqs A A := c1 + \
(string)[7]:syntax error
Error : dataupdateeqs A A := c1 + \

COMMAND $RMDIR

This report command deletes a directory.

Syntax:

$rmdir dirname
dirname := directory name (relative or absolute)

Example:

$rmdir ..\test
$rmdir c:\usr\iode\test

COMMAND $VSEPS

This command redefines the separators used by the functions @vdrop(), @vtake() and @vcount(), as well as in $foreach and $next.

Syntax:

$vseps {seps}

Example:

$vseps ;|

See also @vtake.

COMMAND $FOREACH

This command simplifies writing loops or nested loops. The $foreach command allows you to specify an index and the list of values that this index should successively take. The $next command returns to the start of the $foreach loop and moves to the next value of the index.

Syntax:

$foreach {index} {values}
...
$next {index}

where:

  • {index} is a macro name of up to 10 characters (for example i, idx, COUNTRY, …)

  • {values} is a list of values separated by commas, spaces, or semicolons. The separators can be changed with the $vseps command.

Example 1: nested loops:

$foreach I BE BXL VL WAL
$foreach J H F
$show [%I%;%J%]
$next J
$next I

Example 2: using lists:

$DataUpdateLst MYLIST X,Y,Z
$Define n 0
$foreach I @lvalue(MYLIST)
$Define n {%n% + 1}
$show Element %n% : [%I%]
$next I

COMMAND $NEXT

See $foreach.

COMMAND $PROCDEF

This command indicates the start of the definition of an IODE procedure. It is related to the commands $procdef, $procend, and $procexec. The instructions in this group allow you to build procedures, that is, lists of commands that can be reused and parameterized.

Example:

$procdef procname [fparm1 ...]
...
$procend

where:

  • procname is the name of the procedure (case sensitive).

  • fparm1 is the first formal parameter of the procedure

A procedure is called simply with the command:

$procexec procname aparm1 ...

where:

  • procname is the name of the procedure (case sensitive).

  • aparm1 is the first actual parameter of the procedure

Parameters

Formal parameters are treated in the procedure as defines (local to the procedure): they must be referenced as %fparm%. Their values are set as follows:

  • If there are fewer or an equal number of actual parameters than formal parameters, the values of the actual parameters are assigned in order to the first formal parameters. Any extra formal parameters are considered empty.

  • If there are more actual parameters than formal parameters, the formal parameters (except the last one) receive the values of the first actual parameters, in the order they are passed. The last formal parameter receives the value of all remaining actual parameters.

Example with more actual parameters than formal parameters:

$indent
$procdef print list
    $foreach i %list%
        $show print : %i%
    $next i
$procend
$procexec print A B C

Result:

print : A
print : B
print : C

You can see that the formal parameter list receives all the values passed to the procedure. The loop therefore iterates 3 times.

Example with fewer actual parameters than formal parameters:

$indent
$procdef print title list
    $show %title%
    $foreach i %list%
        $show print : %i%
    $next i
$procend
$procexec print "My Title"

Result:

My Title

This time, the first parameter title contains “My Title”, which is printed before the loop. However, the loop does not execute because the list parameter is empty.

Scope of a procedure definition

  • Procedures must be defined before they can be called.

  • Once defined, a procedure remains callable within the same IODE session, even if the report that defined it has finished. You can execute a report whose sole purpose is to load procedures into memory. These procedures will remain available throughout the session.

A procedure can be replaced at any time by another with the same name.

Scope of formal parameters

Formal parameters are treated as defines whose scope is limited to the current procedure. Therefore, if a define exists before the procedure call with the same name as one of the parameters, this define cannot be used within the procedure. After the procedure, it regains its previous value.

Example:

$define title Mortality quotients
$show Before the proc: %title%

$procdef print title list
    $show Inside the proc: %title%
    $foreach i %list%
        $show print: %i%
    $next i
$procend

$procexec print "My Title"
$show After the proc: %title%

Result:

Before the proc: Mortality quotients
Inside the proc: My Title
After the proc: Mortality quotients

COMMAND $PROCEND

This command indicates the end of a procedure definition.

See $procdef for more details.

COMMAND $PROCEXEC

This command allows the execution of a procedure.

See $procdef for more details.

COMMAND $INDENT

By default, commands ($command or #command) must be flush with the left margin. If not, they are considered as plain text. To allow indentation of commands in reports, you must enable it with the $indent command. Without arguments, it indicates that from this point on, commands do not need to be adjacent to the margin. With the argument N, n, or 0 ($indent [{Nn0}]), commands must be adjacent to the margin. To avoid compatibility issues with reports created in older versions of IODE, the default is to NOT accept indentation.

For example, you can write:

$indent

$procdef print list
$------------------
    $foreach i %list%
        $show print : %i%
    $next i
$procend

$procdef print2 list
$-------------------
    $foreach i %list%
        $show print2 : %i%
        $procexec print 1 2 3
    $next i
$procend

$procexec print2 A B C

The result produced is as follows:

print2 : A
print : 1
print : 2
print : 3
print2 : B
print : 1
print : 2
print : 3

Python equivalent functions

To get the Python equivalent of the above commands, refers to the Equivalence Between IODE Report Execution Commands And Python Functions table.

Functions

These functions allow you to perform a whole series of operations, including:

  • string or list of strings processing,

  • text replacement,

  • object counting,

  • text file processing,

  • etc.

These functions are executed within a report line and the result of the function is printed in the report output. They can be chained (e.g. @upper(@ttitle(T1)) returns the title of the table named T1 in uppercase).

The general syntax of these functions is:

@function_name(arg1, arg2, ...)

String management

List of strings management

  • @vtake(n, list): take the first n elements of the list (or last n elements if n is negative)

  • @vdrop(n, list): drop the first n elements of the list (or last n elements if n is negative)

  • @vcount(list): return the number of elements in the list

File management

Directory management

Dates and times

Object lists

Object content

Equation content

Simulations

The following functions allow you to obtain the value of certain simulation parameters:

  • @SimEps(): returns the value of the convergence criterion used for the last simulation

  • @SimRelax(): returns the value of the relaxation parameter used for the last simulation

  • @SimMaxit(): returns the value of the maximum number of iterations used for the last simulation

The simulation results by period can be retrieved using the following functions:

  • @SimNiter(period): number of iterations required to solve the model for year period

  • @SimNorm(period): convergence threshold reached when solving the model for year period

FUNCTION @UPPER

This function converts the text passed as an argument to uppercase.

Syntax:

@upper(text)

Example:

@upper("free text")

Result:

FREE TEXT

FUNCTION @LOWER

This function converts the text passed as an argument to lowercase.

Syntax:

@lower(text)

Example:

@lower("Free Text")

Result:

free text

FUNCTION @REPLACE

This function replaces one string with another. The replacement is case-sensitive.

Syntax:

@replace(text,replace_from,replace_by)

Example:

@replace("free text",text,hugs)

Result:

free hugs

FUNCTION @FMT

Formats an integer val according to a given format fmt. The result is a string transformed to the same length as fmt. The recognized characters in the format are: X, x, 9, and 0. They mean that only at the positions of these characters will the characters resulting from formatting val be placed, in their order of appearance. Special case: the character 0 will be replaced by a 0 if the corresponding character in the formatting of val is a whitespace.

Syntax:

@fmt(val,fmt)
where val = integer value
      fmt = format

Example:

@fmt(123,0009)     ---> 0123
@fmt(123,A0000A)   ---> A00123A

Warning

Whitespaces before and after the format are included in the result.

FUNCTION @TAKE

Extracts the first n characters of a string. If n is negative, extracts the last n characters.

Syntax:

@take(n,text)

Example:

@take(3,IODE)
@take(-3,IODE)

Result:

IOD
ODE

FUNCTION @DROP

Removes the first n characters from a string. If n is negative, removes the last n characters.

Syntax:

@drop(n,text)

Example:

@drop(2,IODE)
@drop(-2,IODE)

Result:

DE
IO

FUNCTION @COUNT

Returns the number of elements in a string (these elements are separated by commas , in the string).

Syntax:

@count(list)

Example:

@count(A,B,C,E)
@count(ABC,,,B)

Result:

4
2

FUNCTION @INDEX

Returns the nth element of an IODE list.

Syntax:

@index(n,list)

Example:

@index(2,A,B,C,E)
@index(1,ABC,,,B)

Result:

B
ABC

FUNCTION @SQZ

Removes whitespaces from a string.

Syntax:

@sqz(string)

Example:

@sqz(' ABC D  ')   ---> 'ABCD'

FUNCTION @STRIP

Removes trailing whitespaces from a string.

Syntax:

@strip(string)

Example:

@strip(' ABC D  ')   ---> ' ABC D'

FUNCTION @ANSI

This function converts a string encoded in ASCII to characters encoded in ANSI. It is useful, for example, when generating output files that must be strictly encoded in ANSI (such as HTML files).

Syntax:

@ansi(text)

Example:

<TC>@ansi(Février)</TC>

Result:

<TC>Février</TC>

FUNCTION @EQUAL

Checks if two values are identical.

Syntax:

equal(a,b)
where a and b = any text

Example:

@equal(123,123)    ---> 1 (True)
@equal(123, 123)   ---> 0 (False because of the whitespace)
@equal(%i%,10)     ---> 1 or 0 (True or False depending on the value of i)

Warning

Whitespaces are counted as characters.

FUNCTION @VOID(ARGS)

Empties the text of its arguments, regardless of what the arguments are. For example, calling @chdir() returns the name of the new current directory. With @void(), this text does not appear in the output.

Example:

Here is the result of chdir()  : @chdir(..)
Here is the result with void() : @void(@chdir(..))

Result:

Here is the result of chdir()  : \usr\iode
Here is the result with void() :

FUNCTION @VTAKE(N,VALUES)

Keeps only the first n strings from values. If n is negative, keeps the last n. The separators between the strings in values are defined by the command $vseps. By default, these are ,; and the whitespace. The result is an IODE list whose separator is the first one defined by $vseps.

Warning

The comma , is always a separator, even if it is not included in $vseps.

Syntax:

@vtake(n,values)

Example:

$show @vtake(1,A,B,C)   -> A
$show @vtake(-1,A,B,C)  -> C
$show @vdrop(-1,A,B,C)  -> A,B
$show @vdrop(2,A,B,C)   -> C
$vseps |
$show @vtake(1,A B|C)   -> A B
$show @vtake(1,"A,B"|C) -> A,B
$show @vdrop(-1,A,B,C)  -> A|B

Example:

$vseps ;
$define LIST A;B;C;D
$label next
$define ELEMENT @vtake(1, %LIST%)
   ... Some operation on element %ELEMENT% ...
$define LIST @vdrop(1,%LIST%)
$goto next @vcount(%LIST%)

FUNCTION @VDROP(N,VALUES)

See @vtake.

FUNCTION @VCOUNT(N,VALUES)

This function returns the number of elements in a list of strings.

Syntax:

@vcount({list of strings})

Example:

$vseps |
$show @vcount(A B|C)   -> 2
$show @vcount(A;B;C)   -> 1

See also @vtake.

FUNCTION @FDELETE

This function deletes a file. It does not return any result.

Syntax:

@fdelete(filename)

Example:

@fdelete(test.htm)

Result:

none -> The file test.htm is deleted.

FUNCTION @FAPPEND

This function appends strings to the content of an ASCII file. It does not return any result.

Syntax:

@fappend(filename,text|NL,text,...)
where NL indicates a line break

Example:

Report test.rep
----------------
@fappend(test.htm,"Data file",NL)
@fappend(test.htm,"Parameters:",%*%)

Call
-----
test A B C

Result:

File test.htm
----------------
Data file
Parameters:A B C

FUNCTION @GETDIR ()

Returns the current directory.

Example:

Current directory: @getdir()

Result:

Current directory: c:\usr\iode

FUNCTION @CHDIR(DIRNAME)

Changes the current directory to dirname and returns the new current directory.

Example:

Current directory: @getdir()
New directory: @chdir(..)

Result:

Current directory: c:\usr\iode
New directory: c:\usr

FUNCTION @MKDIR(DIRNAME)

Creates a new directory named dirname. Returns no value.

Example:

Current directory:         @getdir()
Creating subdir:           @mkdir(subdir)
New current directory:     @getdir()

Result:

Current directory:         c:\usr\iode
Creating subdir
New current directory:     c:\usr\iode\subdir

FUNCTION @RMDIR(DIRNAME)

Deletes the directory dirname. Returns no value.

Warning

  • The directory must be empty before it can be deleted.

  • Use with caution…

FUNCTION @DATE

This function returns the current date.

Syntax:

@date([format])
where format indicates the date format
By default, the format is dd-mm-yyyy

Example:

Today's date is @date()
Other format: @date("dd/mm/yy")

Result:

Today's date is 31-05-1999
Other format: 31/05/99

FUNCTION @TIME

This function returns the current time.

Syntax:

@time([format])
where format indicates the time format
By default, the format is hh:mm:ss

Example:

The time is @time()
Other format: @time("hh hours mm minutes")

Result:

The time is 23:12:55
Other format: 23 hours 12 minutes

FUNCTION @MONTH

This function returns the name of a month in a given language.

Syntax:

@month(month[,language])
where language is F, N or E (E by default)

Example:

The name of month number 3 is: @month(3)
In French and uppercase: @upper(@month(3,F))
In Dutch and lowercase: @lower(@month(3,N))

Result:

The name of month number 3 is: March
In French and uppercase: MARS
In Dutch and lowercase: maart

FUNCTION @CHRONORESET()

A timer has been added to allow calculation of processing durations. @ChronoReset() resets the timer to 0. See example in the function @SimEps.

FUNCTION @CHRONOGET()

Returns the elapsed time (in milliseconds) since the last call to @ChronoReset. See example in the function @SimEps.

FUNCTION @CEXPAND

This function returns the list of IODE comments whose name matches one of the strings passed as an argument.

Syntax:

@cexpand(pattern1,pattern2,...)

Example:

@cexpand(A*,B*,AE)

Result:

A1;A2;BA;BCXS;AE

The line:

$Repeat "$DataDuplicateVar _ _1" @vexpand(*)

executes the $DataDuplicateVar command on all variables in the workspace (the new variables are named after the original variable with 1 as a suffix).

See also @eexpand, @iexpand, @lexpand, @sexpand, @texpand and @vexpand

FUNCTION @EEXPAND

This function returns the list of equations whose name matches one of the strings passed as an argument.

Syntax:

@eexpand(pattern1,pattern2,...)

Example:

@eexpand(X*)

Result:

All equations whose name starts with X

See also @cexpand, @iexpand, @lexpand, @sexpand, @texpand and @vexpand

FUNCTION @IEXPAND

This function returns the list of IODE identities whose name matches one of the strings passed as an argument.

Syntax:

@iexpand(pattern1,pattern2,...)

Example:

@iexpand(*_1)

Result:

All identities whose name ends with _1

See also @cexpand, @eexpand, @lexpand, @sexpand, @texpand and @vexpand

FUNCTION @LEXPAND

This function returns the list of IODE lists whose name matches one of the strings passed as an argument.

Syntax:

@lexpand(pattern1,pattern2,...)

Example:

$DataUpdateLst list1 @lexpand(_*)

creates an IODE list list1 containing all lists starting with _.

See also @cexpand, @eexpand, @iexpand, @sexpand, @texpand and @vexpand

FUNCTION @SEXPAND

This function returns the list of IODE scalars whose name matches one of the strings passed as an argument.

Syntax:

@sexpand(pattern1,pattern2,...)

Example:

@sexpand(*)

returns the list of all IODE scalars in the workspace.

See also @cexpand, @eexpand, @iexpand, @lexpand, @texpand and @vexpand

FUNCTION @TEXPAND

This function returns the list of IODE tables whose name matches one of the strings passed as an argument.

Syntax:

@texpand(pattern1,pattern2,...)

Example:

$PrintTbl 1990:5 @texpand(*)

prints all IODE tables in the workspace for the sample 1990 to 1994.

See also @cexpand, @eexpand, @iexpand, @lexpand, @sexpand and @vexpand

FUNCTION @VEXPAND

This function returns the list of IODE variables whose name matches one of the strings passed as an argument.

Syntax:

@vexpand(pattern1,pattern2,...)

Example:

$DataUpdateTbl NEWTBL TITLE;@vexpand(BE*)

creates a table NEWTBL containing all series starting with BE.

See also @cexpand, @eexpand, @iexpand, @lexpand, @sexpand and @texpand

FUNCTION @VLISTE

This function returns the list of IODE variables used in the equations whose names are passed as arguments.

Syntax:

@vliste(eq1,eq2,...)

Example:

$DataUpdateLst VARLST @vliste(@eexpand(*))

creates the list VARLST containing all series used in the equations of the workspace.

See also @sliste.

FUNCTION @SLISTE

This function returns the list of IODE scalars used in the equations whose names are passed as arguments.

Syntax:

@sliste(eq1,eq2,...)

Example:

$DataUpdateLst ScalarLST @sliste(@eexpand(*))

creates the list ScalarLST containing all IODE scalars used in the equations of the workspace.

See also @vliste.

FUNCTION @TTITLE

This function returns the titles of the tables passed as arguments.

Syntax:

@ttitle(tbl1,tbl2,...)

Example:

@ttitle(tbl)

Result:

Table title

FUNCTION @SRELAX

This function returns the relaxation parameter values of the IODE scalars passed as arguments.

Syntax:

@srelax(scl1,scl2,...)

Example:

@srelax(scl)

Result:

0.9

FUNCTION @SSTDERR

This function returns the standard deviation values of the IODE scalars passed as arguments.

Syntax:

@sstderr(scl1,scl2,...)

Example:

@sstderr(scl1)

Result:

0.001

FUNCTION @CVALUE

This function returns the text of the comments whose names are passed as arguments.

Syntax:

@cvalue(cmtname,cmtname,...)

Example:

@cvalue(CMT1,A)

Result:

Comment 1;Comment for A

FUNCTION @VVALUE

This function returns the formatted values of the variables whose names are passed as arguments.

Syntax:

@vvalue(varname,varname,...)

Example:

@vvalue(A,B)

Result:

na na 1.2342 -1.22323 1000 1001 1002 1003

FUNCTION @Sample

This function returns the current sample.

Syntax:

@sample(B|E|)
     B : first period
     E : last period
     empty : first and last periods

Example:

@sample()
@sample(B)
@sample(E)

Result:

1960Y1 1990Y1
1960Y1
1990Y1

FUNCTION @EVALUE

This function returns the LEC formula defining an equation.

Syntax:

@evalue(eqname,eqname,...)

Example:

@evalue(EQ1)

Result:

log(EQ1) := c1 + c2 * V3 + c3 * X

FUNCTION @EQSample(EQNAME)

Returns the estimation sample of the equation eqname.

FUNCTION @EQSampleFROM(EQNAME)

Returns the FROM part of the estimation sample.

In the following example, the first estimation year of the equation ENDO1 is extracted in order to re-estimate the equation on a sample extended to the right (for example, after obtaining new observations).

Example:

$EqsEstimate @eqsamplefrom(ENDO1) 2012Y1 ENDO1

FUNCTION @EQSampleTO(EQNAME)

Returns the TO part of the estimation sample.

See example in @EqSampleFrom.

FUNCTION @EQLHS(EQNAME)

Returns the left-hand side of an equation.

FUNCTION @EQRHS(EQNAME)

Returns the right-hand side of an equation.

FUNCTION @SQLOPEN

Warning

OBSOLETE

Opens an ODBC session with a database. The name of the database (DSN name) you provide is the name with which the database is defined in your ODBC environment (Start > Settings > Control Panel > ODBC 32). For some databases, a username and password are required. On success, you get “1” as a result, otherwise “0”.

Syntax:

@SqlOpen(DSN-name[,Username,Password])

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened
....

@SqlClose()

FUNCTION @SQLQUERY

Warning

OBSOLETE

This command executes an SQL query on your database. If the command succeeds, a cursor is created on the “Dynaset” which you can iterate through with SqlNext, until the end of the available data. Place the SQL command between quotes so there is no confusion if you use special characters such as , or ) in your SQL command. Also, group the entire command on one line. On success, you get the number of columns of the “Dynaset” as a result, otherwise “0”.

Warning

You must use @SqlNext() after @SqlQuery() if you want to use the fields of a record.

Syntax:

@SqlQuery("SQL-command")

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened
$Show  @SqlQuery("SELECT DISTINCT TRIM FROM RSZ_bruto;")
....

@SqlClose()

FUNCTION @SQLNEXT

Warning

OBSOLETE

This command iterates through the “Dynaset” created by the last SQL command. As long as there are records available in the “Dynaset” you get “1” as a result, otherwise “0”. On success, you get “1” as a result, otherwise “0”.

Warning

You must use @SqlNext() after @SqlQuery() if you want to use the fields of a record.

Syntax:

@SqlNext()

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened
$Show  @SqlQuery("SELECT DISTINCT TRIM FROM RSZ_bruto;")
@SqlNext()
$Define BFLD @SqlField(0)

$label again_date
$Show Skipping @SqlField(0)
$goto again_date, @SqlNext()
$Define EFLD @SqlField(0)

$Define BEGIN @replace(%BFLD%,/,Q)
$Define END   @replace(%EFLD%,/,Q)

$WsSample %BEGIN% %END%
....

@SqlClose()

FUNCTION @SQLFIELD

Warning

OBSOLETE

With this command you get the content of the nth field of the current record. On success, you get the content of the field, otherwise “0”.

Warning

You must use @SqlNext() before SqlField() or SqlRecord() works.

Syntax:

@SqlField(field-number)

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened
$Show  @SqlQuery("SELECT DISTINCT TRIM FROM RSZ_bruto;")
@SqlNext()
$Define BFLD @SqlField(0)

$label again_date
$Show Skipping @SqlField(0)
$goto again_date, @SqlNext()
$Define EFLD @SqlField(0)

$Define BEGIN @replace(%BFLD%,/,Q)
$Define END   @replace(%EFLD%,/,Q)

$WsSample %BEGIN% %END%
....

@SqlClose()

FUNCTION @SQLRECORD

Warning

OBSOLETE

With this command you get the content of the current record. You get all fields if you do not pass any arguments to the function, or all fields from a certain column with one argument, or all fields between two columns if you provide two arguments. On success, you get the content of the fields, otherwise “0”.

Warning

You must use @SqlNext() before SqlField() or SqlRecord() works.

Syntax:

@SqlRecord() : all fields
@SqlRecord(field1-number) : all fields from field1
@SqlRecord(field1-number,field2-number) : all fields between field1 and field2

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened

$Define PIVOT RETOMA_DBF
$Define PREP  RT

$Msg  NBCOLS @SqlQuery("TRANSFORM Sum(RSZ_bruto.%PIVOT%) AS AGGR SELECT
RSZ_bruto.CODRED, NaceTbl.NACE FROM NaceTbl INNER JOIN RSZ_bruto ON
NaceTbl.FICTIF=RSZ_bruto.FICTIF GROUP BY RSZ_bruto.CODRED, NaceTbl.NACE PIVOT
RSZ_bruto.TRIM;")

$Show  @SqlNext()
$label again
$DataUpdateVar %PREP%@SqlField(0)@SqlField(1) %BEGIN% @SqlRecord(2, 8)
$goto again, @SqlNext()

...
@SqlClose()

FUNCTION @SQLCLOSE

Warning

OBSOLETE

Closes the current ODBC session. On success, you get “1” as a result, otherwise “0”.

Syntax:

@SqlClose()

Example:

$goto continue, @SqlOpen(RSZ)
$Show  ODBC-Database not opened
$Return

$label continue
$Show  ODBC-Database opened
....

@SqlClose()

FUNCTION @SIMEPS

Returns the value of the convergence criterion used for the last simulation.

The example below compares performance according to the number of sorts in the simulation algorithm.

Example:

$ Parameters
$ ----------
$define modeldir C:\iode\nemesis
$define model base_neujobs_rd
$define nbtri 5
$define simfrom 2011Y1
$define simto 2012Y1
$define simper %simfrom% %simto%
$ModelSimulateParms 0.00001 0.6 500 Both 0 No 1

$ Output file
$ -----------
$PrintDest compare.html HTML

$ Load fresh files
$ ----------------
$WsLoadVar %modeldir%\%model%
$WsLoadScl %modeldir%\%model%
$WsLoadEqs %modeldir%\%model%

$ ==== $ModelCalcSCC ===
.par1 tit_1
Comparison of performance according to the number of sorts

$ ==== Loop on Tri tests ===
$define i 0
$label nexttri

$ SCC Calculation
$ --------------
$show $ModelCalcSCC %i%
@ChronoReset()
$ModelCalcSCC %i% pre inter post
$define cpu1  @ChronoGet()

$ Simulate
$ --------
$ Reload vars for a clean start and modify exo
$show Reload Vars ...
$WsLoadVar %modeldir%\%model%
$DataUpdateVar RPOIL 2011Y1 1.20

$show $ModelSimulateSCC  %simper% pre inter post
@ChronoReset()
$ModelSimulateSCC %simper% pre inter post
$define cpu2 @ChronoGet()

$ Reporting
$ ---------
.par1 enum_1
Sorts : %i%
.par1 enum_2
SCC Calculation : %cpu1% msec
.par1 enum_2
Simulation (eps = @simeps(); maxit=@simmaxit()) : %cpu2% msec

$define j {%simfrom%}   209  $define totit 0

$label nextsimper
.par1 enum_3
{%j%@T} : conv = @simnorm({%j%@T}), niter = @simniter({%j%@T})
$define simit @simniter({%j%@T})
$define totit {%totit% + %simit%}
$define j {%j% + 1}
$goto nextsimper {%j% <= %simto%}
.par1 enum_3
Total iterations : %totit%
$define i {%i% + 1}
$goto nexttri {%i% <= %nbtri%}

FUNCTION @SIMRELAX()

Returns the value of the relaxation parameter used for the last simulation.

See example in the function @SimEps.

FUNCTION @SIMMAXIT()

Returns the value of the maximum number of iterations used for the last simulation.

See example in the function @SimEps.

FUNCTION @SIMNITER(Period)

Returns the number of iterations required to solve the model for year period.

See example in the function @SimEps.

FUNCTION @SIMNORM (Period)

Returns the convergence threshold reached when solving the model for year period.

See example in the function @SimEps.

Python equivalent functions

To get the Python equivalent of the above functions, refers to the Equivalence Between IODE Report And Python Functions table.

IODE Commands

IODE commands allow the user to execute all IODE functionalities that are present in the graphical interface.

IODE commands can be either full screen commands or command lines (without a screen interface). Full screen commands consist of a keyword preceded by the character #. They are only available when the report is executed in the graphical interface. They have the following syntax:

#command

For example, the command #WsLoadVar will popup an input box dialog allowing you to specify the name of the variable file to load.

Inline commands consist of a keyword preceded by the character $. They have the following syntax:

$command options parameters

For example, the command:

$WsLoadVar fun.var

will load the content of the file named fun.var into the variables workspace.

The keywords are mnemonics of the functions executed. For example, the keyword WsCopyScl performs a copy (Copy) of a workspace (Ws) of scalars (Scl). DataDuplicateIdt` duplicates (Duplicate) data (Data) from the identities workspace (Idt).

File operations

The commands operating on files allow you to copy, edit, delete, rename, print, etc., any file of a type recognized by IODE. The commands are as follows:

COMMAND FILELIST

Warning

This function is deprecated as of version 5 of IODE.

COMMAND FILEPRINT

This command allows the user to print a file. The file must be a text file. The function prints the file as-is to the defined printer (see Print Destination). The file is simply appended to the selected printer file. The file name (or a mask) is passed as a parameter to the command.

Syntax:

$FilePrint filename

Example:

$FileDeleteA2m  imp
$PrintDest      imp.a2m
$FilePrint      bist92\read.me
$FileEdit       imp.a2m
$show           End of report...

COMMAND FILEEDIT

Warning

This function is deprecated as of version 5 of IODE.

COMMAND FILEDELETE XXX

XXX takes one of the following values:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt,

The function deletes a file on disk with one of the following extensions:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt

You pass as a parameter the list of files with the chosen extension to delete.

Syntax:

$FileDeleteCmt file [list of files]

Example:

$FileDeleteA2m  imp
$PrintDest      imp.a2m

$PrintObjDefEqs
$FileEdit       imp.a2m
$show End of report...

COMMAND FILERENAME XXX

XXX takes one of the following values:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt,

The function renames a file on disk with one of the following extensions:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt

You pass as parameters the source file name (old name) and the destination file name (new name).

Syntax:

$FileRenameCmt source_file dest_file

Example:

$FileRenameCmt  maribel old

COMMAND FILECOPYXXX

XXX takes one of the following values:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt,

The function copies a file with one of the following extensions:

cmt,    eqs,    idt,    lst,    scl,    tbl,    var,
ac,     ae,     ai,     al,     as,     at,     av,
rep,    a2m,    agl,    prf,    dif,    mif,    rtf,
ps,     asc,    txt

You pass as parameters the source file name (old name) and the destination file name (new name).

Syntax:

$FileCopyCmt source_file dest_file

Example:

$FileCopyCmt  matibel old

COMMAND SYSCOPYFILE

This function allows the user to copy any file on disk. Unlike the FileCopyXxx function, the extension can be anything.

Warning

The file to be copied must be closed in order to be copied. If not possible, the function returns an error code.

Syntax:

$SysCopyFile filein fileout

Example:

$PrintDest indprix.a2m a2m
...
$PrintDest test a2m         (to close the file indprix.a2m)
$SysCopyFile indprix.a2m indprix.htm

COMMAND SYSMOVEFILE

This function allows the user to rename any file on disk. Unlike the FileRenameXxx function, the extension can be anything.

Warning

The file to be renamed must be closed. The destination file cannot exist. If not possible, the function returns an error code.

Syntax:

$SysMoveFile filein fileout

Example:

$PrintDest indprix.a2m a2m
...
$PrintDest test a2m         (to close the file indprix.a2m)
$SysMoveFile indprix.a2m indprix.htm

COMMAND SYSDELETE FILE

This function allows the user to delete any file on disk. Unlike the FileDeleteXxx function, the extension can be anything.

Warning

If the file does not exist, the function does NOT return an error code.

Syntax:

$SysDeleteFile file1 file2 ...

Example:

$PrintDest indprix.a2m a2m
...
$PrintDest test a2m         (to close the file indprix.a2m)
$SysDeleteFile indprix.htm
$SysMoveFile indprix.a2m indprix.htm

COMMAND SYSAPPEND FILE

This function allows the user to append one file to another. If not possible, the function returns an error code.

Syntax:

$SysAppendFile filein fileout

Example:

$PrintDest tmp.a2m a2m
...
$PrintDest test a2m               (to close the file tmp.a2m)
$SysAppendFile tmp.a2m result.a2m
$PrintDest tmp.a2m a2m
...
$PrintDest test a2m               (to close the file tmp.a2m)
$SysAppendFile tmp.a2m result.a2m (accumulates the tmp.a2m files in result.a2m)

COMMAND FILEIMPORT VAR

This function concerns the import of IODE variables in different formats such as DIF, ASCII, rotated ASCII, DIF Belgostat, TXT Belgostat, PRN Aremos and GEM (Belgostat).

Syntax:

$FileImportVar format rule infile outfile from to  [trace]
where format = {A, R, D, N, G, P, T}
   rule = rulefile to use to translate names
   infile = file to import
   outfile = IODE-file with imported series
   from = begin of sample
   to   = end of sample
   trace = debug file (optional)

Example:

$FileImportVar TXT bstrule.txt bf-06obs.txt bh\p6y.var 1980Y1 2000Y1 p6y.log
$FileImportVar GEM rule.gem infile.gem iode\test.var 1980Y1 1990Y1

COMMAND FILEIMPORT CMT

This function concerns the import of IODE comments in different formats such as DIF, ASCII, rotated ASCII, DIF Belgostat, TXT Belgostat and PRN Aremos.

Syntax:

$FileImportCmt format rule infile outfile language [trace]
where format = {Ascii, Rotated_Ascii, DIF, NIS, GEM, PRN, TXT_Belgostat}
   rule = rulefile to use to translate names
   infile = file to import
   outfile = IODE-file with imported series
   language =  {E,F,D}
   trace = debug file (optional)

Example:

$FileImportCmt TXT bstrule.txt bf-06ser.txt bh\p6d.cmt D p6d.log

Workspace operations

These functions allow the user to join, copy, load, and save workspaces:

  • WsLoad : loads a workspace cmt / eqs / idt / lst / scl / tbl / var from a file

  • WsCopy : copies a workspace cmt / eqs / idt / lst / scl / tbl / var

  • WsMerge : merges a workspace cmt / eqs / idt / lst / scl / tbl / var into another

  • WsClear : deletes a workspace cmt / eqs / idt / lst / scl / tbl / var

  • WsClearAll : clears all workspace

  • WsDescr : describes a workspace cmt / eqs / idt / lst / scl / tbl / var

  • WsSave : saves a workspace cmt / eqs / idt / lst / scl / tbl / var to a file

  • WsSaveCmp : saves a workspace cmt / eqs / idt / lst / scl / tbl / var to a file in compressed form

  • WsSample : changes the sample of the variables workspace

  • WsExtrapolate : extends series by extrapolation

  • WsLtohStock : builds higher frequency series for stocks

  • WsLtohFlow : builds higher frequency series for flows

  • WsHtolSum : builds lower frequency series (sum)

  • WsHtolMean : builds lower frequency series (mean)

  • WsHtolLast : builds lower frequency series (last observation)

  • WsSeasonAdj : builds seasonally adjusted series

  • WsSeasAdj : selects the seasonal adjustment criterion

  • WsTrend : computes trend series (Hodrick-Prescott) using log transformation

  • WsTrendStd : computes trend series (Hodrick-Prescott) using the standard method

  • WsImport : imports an ASCII file

  • WsExport : exports to a file in ASCII format

  • WsImportEviews : imports E-Views equations and scalars

  • CsvSave : saves a workspace in csv format

  • CsvDigits : sets the number of decimals in CSV files

  • CsvSep : sets the cell separator in CSV files

  • CsvDec : sets the decimal separator in CSV files

  • CsvNaN : sets the text indicating an undefined value in CSV files

  • CsvAxes : sets the name of the variable axis in CSV files

COMMAND WSLOADXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

The LOAD operation of a workspace replaces the contents of the current workspace with the contents of a disk file: all currently defined objects are deleted and replaced by those defined in the file to be loaded.

The command parameter is the path to the file to load.

Syntax:

$WsLoadXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsLoadCmt maribel.cmt

If you load a new variables file, the sampling period of the workspace is replaced by that of the loaded file.

COMMAND WSCOPYXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function allows the user to add or replace objects from a workspace file saved on disk. The selected objects are copied into the current workspace and replace the current values. The process stops as soon as an object cannot be found. All other objects in the current workspace remain unchanged.

You pass as parameters the name of the workspace file on disk and the list of objects to copy.

Syntax:

$WsCopyXxx file;file;... {object | list of objects}
where Xxx = cmt / eqs / idt / lst / scl / tbl

Example:

$WsCopyCmt maribel.cmt CMT1 $CMT

If you copy variables (VAR) from another file, the sample is handled as follows:

  • if no sample is defined: the sample from the file to copy is used

  • if a variables workspace is currently in use, only the data from the new file that falls within the current sampling period is copied

  • you can also define the sampling period into which the data from the file will be copied

If series do not exist in the current workspace, they are created.

Syntax:

$WsCopyVar file;file;... [from to] {object | list of objects}

Example:

$WsCopyVar maribel.var 1990Y1 2000Y1 A

copies the variable A from the file maribel.var into the workspace for the period 1990 to 2000 only. If A does not exist, it is created and only the values for the specified period are copied.

Example:

$WsCopyVar maribel.var;hermes.var A B C

same as above, but for the entire sample of the file maribel.var.

COMMAND WSMERGEXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function performs the operation of merging several files with the current workspace: it adds to the active workspace the objects defined in a file.

The command parameter is the name of the file.

Syntax:

$WsMergeXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsMergeCmt mycmts.cmt

COMMAND WScalarEARXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function deletes all objects of the specified type. No parameter is required.

Syntax:

$WsClearXxx
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsClearEqs

COMMAND WScalarEARALL

Clear all workspaces.

COMMAND WSDESCRXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function creates or replaces the description of the file. This description will be saved later if you save the file.

You pass the file description as a parameter.

Syntax:

$WsDescrXxx text
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsDescrCmt  The MIRABEL comments file

COMMAND WSSAVEXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function performs the inverse operation of the LOAD command: it saves the current state of the workspace to disk, overwriting any existing files if necessary.

The command parameter is the name of the file to save.

Syntax:

$WsSaveXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsSaveCmt  current2.cmt

COMMAND WSSAVECMP

The different workspaces can be compressed when saving them. Depending on the type of object and their definition, compression can range from 30% to 75%. Since each object is compressed individually, the time required for saving can be significant for files containing many objects or on slow machines. IODE automatically recognizes and converts compressed files. Loading is hardly affected by the decompression procedure. There is only one exception: variable files whose series must be loaded using a function such as $WsCopyVar: in this case, reading is slowed down because the lengths of the compressed series become variable and the file must therefore be read sequentially. This function is identical to $WsSave except that it compresses the files when saving the data.

Syntax:

$WsSaveCmpXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

COMMAND WSSample

This function allows the user to modify the sample of the IODE variables workspace. If the new sample is shorter than the current sample, data beyond the new range is deleted. If the new sample is longer than the current sample, the value NA (Not Available) is assigned to the added periods.

Syntax:

$WsSample from to

Example:

$WsSample 1990Y1 2000Y1

COMMAND WSEXTRAPOLATE

This function allows the user to complete series using a chosen method based on previous periods. The possible methods are as follows:

  • 0: Y := Y[-1], if Y is null or NA

  • 1: Y := Y[-1], always

  • 2: Y := extrapolation, if Y is null or NA

  • 3: Y := extrapolation, always

  • 4: Y := unchanged, always

  • 5: Y := Y[-1], if Y is NA

  • 6: Y := extrapolation, if Y is NA

You must provide the period (included in the one defined in the current workspace) over which the calculation should be performed. In addition, the list of variables to adapt can also be specified. If this list is left empty, all series in the workspace are modified.

Syntax:

$WsExtrapolate [method] from to [list of variables]
where method: 0 ... 6
      from, to := IODE periods (yyyyPpp)

Example:

$WsExtrapolate 1993Y1 2000Y1 A B C
or
$WsExtrapolate 1993Y1 2000Y1

COMMAND WSLTOHSTOCK

Builds higher frequency series for stock-type data (Unemployment, Debt, …). To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously changes the frequency of these series. The new frequency is the one currently defined in the active workspace. The new series are added or replace (for existing names) those in the active workspace.

This procedure exists for the following cases:

  • annual to monthly

  • annual to quarterly

  • quarterly to monthly

Two methods are available, one for stocks, the other for flows ($WsLtoHFlow). For stocks, the interpolation method can be chosen:

  • linear: A[1980Q{1,2,3,4}] = A[1979Y1] + i * (A[1980Y1] - A[1979Y1])/4 for i = 1,2,3,4

  • cubic splines: cubic interpolation

  • step: A[1980Q{1,2,3,4}] = A[1980Y1]

Syntax:

$WsLtoHStock {L|C|S} Filename VarList

with L for linear interpolation
     C for Cubic Splines interpolation
     S for Steps interpolation

Example:

$WsLtoHStock C File1.var A B C

COMMAND WSLTOHFLOW

Builds higher frequency series for flow-type data (GDP, Deficit, …). To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously changes the frequency of these series. The new frequency is the one currently defined in the active workspace. The new series are added or replace (for existing names) those in the active workspace.

This procedure exists for the following cases:

  • annual to monthly

  • annual to quarterly

  • quarterly to monthly

Two methods are available, one for stocks, the other for flows. For flows, the series is distributed over the sub-periods:

  • linear interpolation: A[1980Q1] = A[1980Y1] / n (where n = number of sub-periods)

  • cubic spline interpolation: cubic interpolation

  • step interpolation: linear

Syntax:

$WsLtoHFlow {L|C|S}  Filename VarList

with L for linear interpolation
     C for Cubic Splines interpolation
     S for Steps interpolation

Example:

$WsLtoHFlow S File1.var A B C

COMMAND WSHTOLSUM

Builds lower frequency series by summing the sub-periods. To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously changes the frequency of these series. The new frequency is the one currently defined in the active workspace. The new series are added or replace (for existing names) those in the active workspace.

This procedure exists for the following cases:

  • monthly to annual (annual observation = sum of the 12 months)

  • quarterly to annual (annual observation = sum of the 4 quarters)

  • monthly to quarterly (quarterly observation = sum of the 3 months)

Three methods are available:

If a value is missing (NA) for one of the sub-periods, the result is NA.

Syntax:

$WsHtoLSum Filename VarList

Example:

$WsHtoLSum File1.var A B C

COMMAND WSHTOLMEAN

Builds lower frequency series by taking the mean of the sub-periods. To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously changes the frequency of these series. The new frequency is the one currently defined in the active workspace. The new series are added or replace (for existing names) those in the active workspace.

This procedure exists for the following cases:

  • monthly to annual (annual observation = mean of the 12 months)

  • quarterly to annual (annual observation = mean of the 4 quarters)

  • monthly to quarterly (quarterly observation = mean of the 3 months)

Three methods are available:

If a value is missing (NA) for one of the sub-periods, the result is NA.

Syntax:

$WsHtoLMean Filename VarList

Example:

$WsHtoLMean File1.var A B C

COMMAND WSHTOLLAST

Builds lower frequency series by taking the last observation of the sub-periods. To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously changes the frequency of these series. The new frequency is the one currently defined in the active workspace. The new series are added or replace (for existing names) those in the active workspace.

This procedure exists for the following cases:

  • monthly to annual (annual observation = that of December)

  • quarterly to annual (annual observation = that of the last quarter)

  • monthly to quarterly (quarterly observation = that of the last month of the quarter)

Three methods are available:

If a value is missing (NA) for one of the sub-periods, the result is NA.

Syntax:

$WsHtoLLast Filename VarList

Example:

$WsHtoLLast File1.var A B C

COMMAND WSSEASONADJ

Builds seasonally adjusted series using the Census XI method, as well as the trend-cycle and stochastic components.

Naming convention:

  • The series containing the trend-cycle component is named _Cname where name is the original name.

  • The series containing the stochastic component is named _Iname where name is the original name.

  • The seasonally adjusted series keeps its original name.

Note that the seasonally adjusted series is the product of the other two. To do this, the function loads into the IODE variables workspace the list of series from the specified file and simultaneously modifies the selected series if necessary. The new series are added or replace (for existing names) those in the active workspace. If a value is missing (NA) for one of the periods, the result is NA for the entire year.

Syntax:

$WsSeasonAdj Filename VarList

Example:

$WsSeasonAdj File1.var A B C

See also $WsSeasAdj.

COMMAND WSSEASADJ

This function is identical to $WsSeasAdj except that it allows you to set the parameter that controls the criterion for detecting whether a seasonal effect is present in a series.

Syntax:

$WsSeasAdj Filename Varname Varname ... Eps

COMMAND WSTREND

Implementation of the Hodrick-Prescott method for constructing trend series. The principle is the same as for seasonal adjustment: the series read from a file are imported and transformed simultaneously.

Syntax:

$WsTrend VarFilename Lambda series1 series2 ...

COMMAND WSIMPORTXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This operation allows the user to perform a $WsLoad from an ASCII file. Remember that the LOAD operation of a workspace replaces the contents of the current workspace with the contents of a disk file: all currently defined objects are deleted and replaced by those defined in the file to be loaded.

You pass the name of the file to load as a parameter to the command.

Syntax:

$WsImportXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsImportCmt myfile.ac

If you load a new IODE variables file, the sampling period of the workspace is replaced by that of the loaded file.

COMMAND WSEXPORTXXX

XXX takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function performs the inverse operation of the $WsImportXxx function: it saves the current state of the workspace to disk in ASCII format.

You pass the name of the file to save as a parameter to the command.

Syntax:

$WsExportXxx filename
where Xxx = cmt / eqs / idt / lst / scl / tbl / var

Example:

$WsExportCmt mytest.ac

COMMAND WSIMPORTEVIEWS

Extraction of equations, scalars and identities from E-Views export data.

Syntax:

$WsImportEviews filename

where filename is the name of the file to import. The current IODE workspaces are augmented with the detected equations and scalars.

Format of E-Views data:

Forecasting Equation
====================

D(B_PQVC) = C(1)*D(PQVC) + C(2)*(D2001+D2002) + C(3)*D(B_PQVC(-3))

Substituted Coefficients
========================

D(B_PQVC) = 0.894661573413*D(PQVC) - 0.0284533462569*(D2001+D2002) +
0.241546373731*D(B_PQVC(-3))

@IDENTITY gro_w_produz_def  = w_produz_def  / w_produz_def(-1)  - 1

Identities
==========
KEEP COEFS:
B_QHOA  = b_1(2)  * b_c0122222
B_QHOB  = b_qh_b_14(1)  * B_CO14

DROP COEFS:
B_QHOCADD  = (b_qh_c_1(1)  * B_CO1)  + (b_qh_c_2(1)  * B_CO2)  + (b_qh_c_7(1)  *
B_CO7)  + (b_qh_c_13(1)  * B_CO13)  + (b_qh_c_14(1)  * B_CO14)
B_QHOCR_NC  = b_qh_cr_14(1)  * B_CO14

The E-views file is interpreted as decribed below:

  • the 2 equations following the titles “Forecasting Equation” and “Substituted Coefficients” are extracted.

  • the first equation is translated into IODE format:
    • D(...) is replaced by d(...)

    • C(<n>) is replaced by the endoname_<n>

    • Expr(<lag>) is replaced by Expr[<lag>]

    • the first encountered variable is chosen as the endogenous variable

    • the first = sign is considered as the separator between left and right members of the equation and is therefore replaced by :=

  • the members NAME(n) are remplaced by name_n or name. If the last directive is KEEP COEFS:, the _n is kept. If the last directive is DROP COEFS:, _n is dropped.

  • the coefficients values are extracted from the second equation (“Substituted Coefficients”).

  • the lines Estimation Command: and Estimation Equation: are ignored

  • the lines beginning with @INNOV are skipped.

  • the lines beginning by @IDENTITY are extracted and translated in IODE equations with no coefficient.

  • every equation is added in the current Equations workspace.

  • every detected coefficient is saved in the Scalars workspace.

Lines following the line IDENTITIES

Lines containing identities are interpreted as equations from the moment:

  • either a line containing the text Identities: is found

  • or a first identity prefixed by @IDENTITY is found

From this point, all lines containing text are interpreted by the program as IODE equations. If there is a syntax error, reading stops and an error message is produced.

KEEP COEFS: and DROP COEFS: directives

These directives must appear alone on a line. They can be uppercase, lowercase, or a mix of both. They determine how EVIEWS equation or identity terms of the form name(1) or NAME(n) are translated into IODE:

KEEP COEFS:
DROP COEFS:
  • After KEEP COEFS:, the translation of name(1) or NAME(1) gives name_1.

  • After DROP COEFS:, the translation of name(1) or NAME(1) gives name.

At the start of file reading, DROP COEFS: is the initial value.

Example of an EVIEWS file:

Identities
==========
KEEP COEFS
B_QHOA  = b_1(2)  * b_c0122222
B_QHOB  = b_qh_b_14(1)  * B_CO14

DROP COEFS
B_QHOCADD  = (b_qh_c_1(1)  * B_CO1)  + (b_qh_c_2(1)  * B_CO2)  + (b_qh_c_7(1)  * B_CO7)
B_QHOCR_NC  = b_qh_cr_14(1)  * B_CO14

Result:

B_QHOA := b_1_2*B_C0122222
B_QHOB := b_qh_b_14_1*B_CO14
B_QHOCADD := (b_qh_c_1*B_CO1)+(b_qh_c_2*B_CO2)+(b_qh_c_7*B_CO7)
B_QHOCR_NC := b_qh_cr_14*B_CO14

Data operations

The commands operating on data in the active workspaces (in memory) allow you to copy, edit, delete, rename, print, etc., the data of a workspace:

  • datacreate : creates an object (cmt / eqs / idt / lst / scl / tbl / var)

  • datadelete : deletes an object (cmt / eqs / idt / lst / scl / tbl / var)

  • dataexist : tests for the existence of an object (cmt / eqs / idt / lst / scl / tbl / var)

  • dataedit : edits an object (cmt / eqs / idt / lst / scl / tbl / var)

  • dataupdate : modifies an object (cmt / eqs / idt / lst / scl / tbl / var)

  • dataappend : appends an object (cmt | lst)

  • dataduplicate : duplicates an object (cmt / idt / lst / scl / tbl / var) (an equation cannot be duplicated)

  • datarename : renames an object (cmt / eqs / idt / lst / scl / tbl / var)

  • datasearch : searches for an object cmt / eqs / idt / lst / scl / tbl / var

  • datascan : scans the objects eqs / idt / tbl

  • datalistXxx : creates a list of objects whose names match a given criterion cmt / eqs / idt / lst / scl / tbl / var

  • datalistsort : sorts a list in alphabetical order

  • datacompareEps : sets the equality threshold for variable comparison

  • datacompareXxx : compares the workspace and a file and creates lists

  • datacalclst : performs logical operations on lists

  • datacalcvar : calculates a variable based on a LEC expression

  • datadisplaygraph : displays a graph based on series (without a table)

  • datasavegraph : saves a graph calculated from series

  • datawidthvar : sets the column width for editing series

  • datandecvar : sets the number of decimals for editing series

  • datamodevar : sets the mode for editing series

  • datastartvar : sets the first period for editing series

  • datawidthtbl : sets the column width for editing tables

  • datawidthscl : sets the column width for editing scalars

  • datandecscl : sets the number of decimals for editing scalars

  • dataeditcnf : changes the editing options for variables

  • datarasvar : RAS method for completing a matrix of series

  • datapatternXXX : creates lists of names from a pattern

COMMAND DATACREATEXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function allows the user to create objects in the current workspace.

If the object name already exists, the function returns and signals an error. Otherwise, the object is created with a default value:

  • comments, lists, identities, and tables: empty

  • equation: “NAME := NAME”

  • scalars: 0.9

  • variables: a series with NA for the entire sample of the workspace

  • tables: creates an empty table

Syntax:

$DataCreateVar name

COMMAND DATADELETEXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function allows the user to delete objects in the current workspace. If the object name does not exist, the function returns and signals an error.

Syntax:

$DataDeleteVar name

Warning

Since version 5.13, wildcards are accepted in the name.

COMMAND DATAEXISTXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function checks for the existence of an object in the current workspace. If the object name does not exist, the function returns and signals an error.

Syntax:

$DataDeleteVar name

COMMAND DATAEDITXXX

Warning

OBSOLETE

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function allows the user to edit objects in the current workspace. A screen displays the selected objects in a scrollable table (or editing table) in which you can navigate.

The editing table consists of the following elements:

  • the name of the workspace in the top row

  • the names of the objects in the left column

  • the definition (or part of the definition) of the objects next to their name on the right

  • a scrollbar indicating the current position in the table and the visible proportion of the table

The current object is indicated by its corresponding row being highlighted (inverse video). The function keys of the scrollable tables allow you to display the value, modify, and create objects.

The list of objects to edit is passed as an argument to the command. The elements of the list are separated by spaces, commas, or semicolons. If the list is empty (no argument), all objects appear in the editing table.

Syntax:

#DataEditXxx [object [list of objects]]
{Xxx = cmt / eqs / idt / lst / scl / tbl / var}

COMMAND DATAUPDATEXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

The function changes the content of an object in the current workspace.

If the object name does not exist, an object containing the new definition is created. If the object exists, its content is replaced. The function takes several arguments. The arguments differ depending on the type of object to update. The first argument is always the name of the object to change.

Comments

Syntax:

$DataUpdateCmt name comment
Equations

Syntax:

$DataUpdateEqs name lec_equation
Identities

Syntax:

$DataUpdateIdt name lec_identity
Lists

Syntax:

$DataUpdateLst name list
Scalars

Syntax:

$DataUpdateScl name value [relax]
Tables

Syntax:

$DataUpdateTbl table_name title;lec1;lec2;...

If title is a comment name, the comment is used as the title. Similarly, if variable names are found as LEC forms, and there is a comment for these variables, the title of the corresponding row is replaced by the value of the comment. Suppose there is a comment for A in the workspace and not for B, and a comment TIT:

Comment A   : "Gross National Product"
Comment TIT : "Title of my table"

The line:

$DataUpdateTbl T1 TIT;A;B;A+B

creates the table T1 with the following form:

+-------------------------------------------+
|          Title of my table                |
|                                           |
|  Gross National Product              A    |
|  B                                   B    |
|  A+B                                 A+B  |
+-------------------------------------------+
Variables

Syntax:

$DataUpdateVar name [L,l | D,d | G,g] period value1 value2 ...
where L,l := in value (default)
   D, d := in difference
   G, g := in growth rate
   period := the period at the start of the update

COMMAND DATAAPPENDXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

The function appends text to the definition of an object in the current workspace.

If the object name does not exist, an object containing the new definition is created. If the object exists, its content is appended.

Comments

Syntax:

$DataAppendCmt name comment
Lists

Syntax:

$DataAppendLst name list

COMMAND DATADUPLICATEXXX

Xxx takes one of the following values:

cmt / idt / lst / scl / tbl / var

Objects defined in the current workspaces can be copied to objects of the same type but with a different name.

The $DataDuplicateXxx command takes two parameters in succession: the old and the new object name.

Syntax:

$DataDuplicateCmt old_name new_name

Example:

$DataDuplicateCmt A01 A02

The $DataDuplicateEqs command is not implemented and, in fact, has no meaning. Indeed, an equation is named after its endogenous variable. Changing its name therefore changes the name of the endogenous variable, which makes no sense.

COMMAND DATARENAMEXXX

Xxx takes one of the following values:

cmt / idt / lst / scl / tbl / var

This function changes the name of an object in the current workspace.

If the object name does not exist, the function returns and signals an error. If the object exists, it will be saved under a new name. If there is already an object with this new name, it is replaced.

Syntax:

$DataRenameVar name new_name

The $DataRenameEqs command is not implemented and, in fact, has no meaning. Indeed, an equation is named after its endogenous variable. Changing its name therefore changes the name of the endogenous variable, which makes no sense.

COMMAND DATASEARCHXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This function allows the user to search in one of the current workspaces for the list of objects containing a given string. The result of this search is a list of objects, which can, if needed, be saved in the current lists workspace.

The search differs depending on the type of object:

  • Comments: the name and the text of the comment are analyzed

  • Equations: the name and the LEC form of the equation are analyzed

  • Identities: the name and the LEC form of the identity are analyzed

  • Lists: the name and the text of the list are analyzed

  • Scalars: the name of the scalar is analyzed

  • Tables: the name, titles, and LEC forms of the table are analyzed

  • Variables: the name of the variable is analyzed

Syntax:

$DataSearchXxx mask word ecase in_name in_formula in_text list_result

(word, ecase, in_name, in_formula, in_text := 0 or 1)
(mask := characters and possibly ?, *, ...)
(list_result := the name of the result list)

Seven parameters are passed to the command:

  • mask: The search text can contain special characters that allow you to specify the search limits:
    • * : any sequence of characters (including empty)

    • ? : exactly one character (any)

    • @ : any alphanumeric character

    • & : any non-alphanumeric character

    • | : any alphanumeric character or none at the start and end of the string

    • ! : any non-alphanumeric character or none at the start and end of the string

    • \ : placed before one of the special characters disables its interpretation

  • word: specify Yes if the string to search for must be a whole word and not part of a word. Specify No if this does not matter.

  • ecase: specify if the search should be case-sensitive.

  • in_name: specify Yes if the search should be done in the object name, No otherwise.

  • in_formula: specify Yes if the search should be done in the object’s LEC formula(s), No otherwise.

  • in_text: specify Yes if the search should be done in the object’s text, No otherwise.

  • list_result: it is possible to save the list of objects matching the criteria in the current IODE lists workspace. The name of this list must be indicated and must be a valid list name. If a list with the same name exists, it will be replaced by the result.

Example:

$datasearchCmt TE?T 0 0 1 0 1 NEW2
#DataEditCMT $NEW2

COMMAND DATASCANXXX

Xxx takes one of the following values:

eqs / idt / tbl

This function allows the user to search in one of the current workspaces for the list of variables and scalars used in the definition of the objects in this workspace. The result of this search is saved in two lists, containing on the one hand the names of the scalars (list _SCAL) and on the other hand those of the variables (list _EXO). If no argument is passed to this function, the entire workspace is examined.

Syntax:

$DataScanEqs [name1,name2,...]
$DataScanIdt [name1,name2,...]
$DataScanTbl [name1,name2,...]

COMMAND DATALISTXXX

This function builds a list of object names based on a selection criterion (pattern) applied to the names. It can operate on objects in a workspace or on objects in a file. For example, it can be used to obtain the list of objects whose name starts with A and ends with BEL (A*BEL).

The command takes two or three parameters. The first specifies the name of the list to create. The second is the pattern. The third (optional) is the name of the file.

Syntax:

$DataListXxx listname pattern [filename]

Example:

$DataListVar _BEL_ *BEL*

generates the IODE list _BEL_ of all variables whose name contains the text BEL: AX1BEL, BEL1, MIRABELLE, etc.

COMMAND DATALISTSORT

This function performs an alphanumeric sort on the contents of a list.

The command takes two parameters. The first specifies the name of the list to sort. The second specifies the name of the resulting sorted list.

Syntax:

$DataListSort list sorted_list

COMMAND DATACOMPAREEPS

This function sets the threshold below which the variable equality test is considered satisfied.

The comparison test is:

if x1 <> 0 :  |(x1 - x2) / x1| < eps
else :        |x2| < eps

Syntax:

$DataCompareEps eps

The comparison threshold is set to 1e-7 by default.

COMMAND DATACOMPAREXXX

The contents of the current workspace can be compared to those of a file. The result of this comparison consists of 4 lists:

  • objects found only in the workspace

  • objects found only in the file

  • objects found in both, with the same definition

  • objects found in both, with a different definition

The function takes 5 parameters: the file to compare and the 4 lists to build.

Syntax:

$DataCompareXxx filename ONE TWO THREE FOR

ONE    in workspace only
TWO    in file only
THREE  in both, equal
FOR    in both, different

Example:

$DataCompareVar myws.var WS FILE EQ DIFF

COMMAND DATACALCLST

This function calculates a list based on two lists by taking their union, intersection, or difference.

The command takes 4 parameters:

  • the name of the result list

  • the name of the first list

  • the operation

  • the name of the second list

Syntax:

$DataCalcLst res lst1 op lst2
where op = + : union
        * : intersection
        - : difference

Example:

$DataCalcLst _RES LST1 * LST2

generates the IODE list _RES of names present in both LST1 and LST2.

COMMAND DATACALCVAR

This function allows the user to calculate a new series from a LEC formula. This formula is executed over the entire sample of the IODE variables workspace using the values of the other variables.

This function takes 2 parameters:

  • the name of the variable to create

  • the LEC formula to calculate

Syntax:

$DataCalcVar name formula

Example:

$DataCalcVar X  beta + gamma * ln B + alpha * ln C

COMMAND DATADISPLAYGRAPH

This function allows the user to display series as a graph.

Syntax:

$DataDisplayGraph mode chart_type gridX gridY scaling
                  {ymin | --} {ymax | --} perfrom perto
                  varname1 varname2 ...

where:

  • mode: specifies whether the variables should be displayed as values, differences, or growth rates:

    • L = level

    • D = differences

    • G = growth rates

    • d = YoY differences: year-over-year differences

    • g = YoY growth rates: year-over-year growth rates

  • chart_type: type of chart to produce: line, scatter, scatter line, or bar.

  • gridX/Y: type of grid for X and Y: No[X|Y]Grids, Minor[X|Y]Grids, or J(Major[X|Y]Grids).

  • scaling: type of coordinate transformation to use: Level, G(Log), Semi-Log, or Percent.

  • ymin/ymax: minimum and maximum values for the Y axis. If these values are null (--), the axis is calculated automatically based on the values to display.

  • perfrom perto: print sample (from period from to period to).

  • varname1 varname2 ...: list of variables to include in the graph. The names (or list) can be separated by a space, a +, or a combination of both. Variables separated by a space will be displayed in separate graphs in the same window, while added variables will be grouped in the same graph. Thus, if this field contains X Y+Z T, three graphs will be constructed with variables X (first graph), Y and Z (grouped in the second graph), and T (last graph).

COMMAND DATASAVEGRAPH

This function allows the user to build graphs from series and save the result in an AGL file.

Syntax:

$DataSaveGraph  aglfilename mode chart_type gridX gridY scaling
                {ymin | --} {ymax | --} perfrom perto
                varname1 varname2 ...

where:

  • aglfilename: name of the AGL file in which the graph will be saved.

  • mode: specifies whether the variables should be displayed as values, differences, or growth rates:

    • L = level

    • D = differences

    • G = growth rates

    • d = YoY differences: year-over-year differences

    • g = YoY growth rates: year-over-year growth rates

  • chart_type: type of chart to produce: line, scatter, scatter line, or bar.

  • gridX/Y: type of grid for X and Y: No[X|Y]Grids, Minor[X|Y]Grids, or J(Major[X|Y]Grids).

  • scaling: type of coordinate transformation to use: Level, G(Log), Semi-Log, or Percent.

  • ymin/ymax: minimum and maximum values for the Y axis. If these values are null (--), the axis is calculated automatically based on the values to display.

  • perfrom perto: print sample (from period from to period to).

  • varname1 varname2 ...: list of variables to include in the graph. The names (or list) can be separated by a space, a +, or a combination of both. Variables separated by a space will be displayed in separate graphs in the same window, while added variables will be grouped in the same graph. Thus, if this field contains X Y+Z T, three graphs will be constructed with variables X (first graph), Y and Z (grouped in the second graph), and T (last graph).

COMMAND DATAWIDTHVAR

Warning

OBSOLETE

This function allows the user to specify the column width for editing statistical series. The value must be between 2 and 12.

Syntax:

$DataWidthVar n
n between 2 and 12

COMMAND DATANDECVAR

This function allows the user to specify the number of decimals when editing statistical series. The value must be between -1 (variable number of decimals) and 6.

Syntax:

$DataNdecVar n
n between -1 and 6

COMMAND DATAMODEVAR

This function allows the user to choose the editing mode for statistical series: Level, differences, or growth rates.

Syntax:

$DataModeVar n
where n = 0 for level
      n = 1 for differences
      n = 2 for growth rates

COMMAND DATASTARTVAR

Warning

OBSOLETE

This function allows the user to choose the first visible column when editing statistical series. The value must be between 0 (first column) and the number of available periods.

Syntax:

$DataStartVar n
where n is between 0 and the number of periods

COMMAND DATAWIDTHTBL

Warning

OBSOLETE

This function allows the user to specify the column width for editing IODE tables. The value must be between 2 and 60.

Syntax:

$DataWidthTbl n
n between 2 and 60

COMMAND DATAWIDTHScalar

This function allows the user to specify the number of decimals when editing scalars. The value must be between -1 (variable number of decimals) and 6.

Syntax:

$DataNdecScl n
where n is between -1 and 6

COMMAND DATAEDITCNF

This function allows the user to change the display mode of the series table to Level (actual value), Difference, or Growth Rate. It also allows the user to choose the number of decimals to display.

This function takes two parameters:

  • the display mode: {Level | Differences | GrowthRates}

  • the number of decimals to display (-1, 0, 1, 2, …)

Syntax:

$DataEditCnf {L | D | G} n
(n := -1, 0, 1, 2, 3, ...)

COMMAND DATARASVAR

Starting from the values of variables matching the pattern, the values are distributed using an RAS method.

Syntax:

$DataRasVar pattern X_dimension Y_dimension ref_year sum_year [maxit [eps]]

where:

  • pattern: the variables used are those that meet the following criteria: x is replaced by all values from $X, y by those from $Y

  • X_dimension: list of values that x in the pattern can take. NOTE: the last in the list is the SUM over the x dimension

  • Y_dimension: list of values that y in the pattern can take. NOTE: the last in the list is the SUM over the y dimension

  • ref_year: reference year: the year for which all data is known

  • sum_year: the year for which only the sums are known

  • maxit: maximum iterations (default=100)

  • eps: the threshold (default=0.001)

Example:

$WsLoadVar ras.av
$DataUpdateLst X R1;R2;R3;R4;R5;R6;RT
$DataUpdateLst Y C1;C2;C3;C4;C5;CT
$DataRasVar xy $X $Y 1980Y1 1981Y1 10 0.00001

The RAS matrix then looks as follows:

R1C1 R1C2 R1C3 R1C4 R1C5 R1C6 | R1CT
R2C1 R2C2 R2C3 R2C4 R2C5 R2C6 | R2CT
R3C1 R3C2 R3C3 R3C4 R3C5 R3C6 | R3CT
R4C1 R4C2 R4C3 R4C4 R4C5 R4C6 | R4CT
R5C1 R5C2 R5C3 R5C4 R5C5 R5C6 | R5CT
-------------------------------
RTC1 RTC2 RTC3 RTC4 RTC5 RTC6 | RTCT

with the values for the year ref_year. The new row and column sums have the value from sum_year. If values are known in sum_year for some cells, those are used. RAS then calculates the cells so that the new boundary conditions are met and overwrites the unknown values with NA (Not Available).

COMMAND DATAPATTERNXXX

This function creates lists containing the names of objects that match a given pattern.

Syntax:

$DataPatternXXX list pattern X_dimension [Y_dimension]

where:

  • list: the name of the result list.

  • pattern: pattern that the object names must match, where x is replaced by the elements from X_dimension and, if specified, y by the elements from Y_dimension.

  • X_dimension: list of possible x values.

  • Y_dimension (optional): list of possible y values.

Warning

Only existing elements are included in the list.

Example:

$WsLoadVar ras.av
$DataUpdateLst X R1;R2;R3
$DataUpdateLst Y C1;C2
$DataPatternVar RC xy $X $Y

Result:

$RC=R1C1,R1C2,R2C1,R2C2,R3C1,R3C2

insofar as R1C1, R1C2, R2C1, R2C2, R3C1, R3C2 are variables in the variables workspace.

Specific operations on equations

The following commands allow you to modify estimation parameters and estimate equations:

COMMAND EQSESTIMATE

This function estimates an equation or a block of equations. Only the period can be adjusted in this function. Other parameters (method, instruments, etc.) are those currently defined in the equation. Other functions allow you to modify the instruments, the method: these are the EqsSet… functions.

Syntax:

$EqsEstimate perfrom perto eqname1 ...

At the end of estimation, certain variables and scalars are automatically created if the process has converged. These variables and scalars can be used for calculations and, as they are objects in the workspace, can be saved for future use.

The tests resulting from the last estimation are saved in scalars. These scalars have the following names (e0_* for the first equation in the block, e1_* for the second, …):

  • e0_n: number of periods in the sample

  • e0_k: number of estimated coefficients

  • e0_stdev: standard deviation of residuals

  • e0_meany: mean of Y

  • e0_ssres: sum of squared residuals

  • e0_stderr: standard error

  • e0_stderrp: standard error %

  • e0_fstat: F-Stat

  • e0_r2: R squared

  • e0_r2adj: adjusted R squared

  • e0_dw: Durbin-Watson

  • e0_loglik: Log Likelihood

The calculated series are also saved:

  • _YCALC0 for the right-hand side of the first equation in the block, _YCALC1 for the second equation, etc.

  • _YOBS0 for the left-hand side of the first equation in the block, _YOBS1 for the second equation, etc.

  • _YRES0 for the residuals of the first equation in the block, …

Outside the estimation sample, the values of the series are NA (Not Available).

COMMAND EQSSTEPWISE

This function estimates a block of equations and searches for the best possible tests for all possible combinations of coefficients.

Syntax:

$EqsStepWise from to eqname leccond {r2|fstat}
where from to : estimation period
      eqname  : equation to estimate
      leccond : acceptance condition

COMMAND EQSSETCMT

This function sets the comment for an equation.

Syntax:

$EqsSetCmt eqname comment
where eqname is the name of the equation
      comment is free text

Example:

$DataUpdateEqs E E := c1 + c2 * F
$EqsSetCmt E This is the comment for E
$EqsSetSample 1971Y1 1990Y1 E
$EqsSetMethod 1 B E
$EqsSetInstrs E instruments
$EqsSetBloc B E

COMMAND EQSSETSample

This function sets the estimation period for a list of equations. It is useful for changing the estimation period during the execution of a report.

The function modifies the period for all equations whose names are passed as parameters.

Syntax:

$EqsSetSample from to eqname1 eqname2 ...
where from and to are the sample period limits
      eqname1 .. are the names of existing equations

Example:

$DataUpdateEqs E E := c1 + c2 * F
$EqsSetCmt E This is the comment for E
$EqsSetSample 1971Y1 1990Y1 E
$EqsSetMethod 1 B E
$EqsSetInstrs E instruments
$EqsSetBloc B E

COMMAND EQSSETMETHOD

This function sets the estimation method for a list of equations. It is useful for changing the estimation method during the execution of a report.

The function modifies the method for all equations whose names are passed as parameters.

Syntax:

$EqsSetMethod   {0|1|2|3} eqname1 eqname2 ...

where 0 indicates the LSQ method (least squares)
      1 indicates the Zellner method
      2 indicates the INF method (2-stage with instruments)
      3 indicates the GLS method (3-stage with instruments)
      4 indicates the MAXLIK method (Maximum likelihood - BHHH - from version 6.21)

      eqname1 .. are the names of existing equations

Example:

$DataUpdateEqs E E := c1 + c2 * F
$EqsSetCmt E This is the comment for E
$EqsSetSample 1971Y1 1990Y1 E
$EqsSetMethod 1 B E
$EqsSetInstrs E instruments
$EqsSetBloc B E

COMMAND EQSSETINSTRS

This function sets the instruments to be used for estimating an equation.

The function modifies the instruments for the specified equation.

Syntax:

$EqsSetInstrs eqname lec_instr_1;lec_instr_2;...

where eqname is the name of the equation
      lec_instr_1, ... are the LEC forms of the instruments

Example:

$DataUpdateEqs E E := c1 + c2 * F
$EqsSetCmt E This is the comment for E
$EqsSetSample 1971Y1 1990Y1 E
$EqsSetMethod 1 B E
$EqsSetInstrs E instruments
$EqsSetBloc B E

COMMAND EQSSETBLOC

This function sets the estimation block for a list of equations. It is useful for setting the estimation block during the execution of a report.

The function sets the block for all equations whose names are passed as parameters. The block is the list of equations itself.

Syntax:

$EqsSetBloc eqname1 eqname2 ...

where eqname1 ... are the names of existing equations

Example:

$DataUpdateEqs E E := c1 + c2 * F
$EqsSetCmt E This is the comment for E
$EqsSetSample 1971Y1 1990Y1 E
$EqsSetMethod 1 B E
$EqsSetInstrs E instruments
$EqsSetBloc B E

Printer configuration

The following commands are used to configure the printer or the output file for print jobs:

COMMAND PRINTDEST

This function allows the user to specify whether to print to a file and, if so, the name and type of the output file. This setting applies to all print jobs initiated from an IODE menu or report, until the end of the current report execution or until another report command specifies a different destination, in which case the print configuration is updated for all subsequent print jobs. The destination file is always reset, even for a2m files.

This is new as of version 5 of IODE.

The name of the destination file is passed as a parameter to the command:

Syntax:

$PrintDest [filename] [format]
where format = A2M, MIF, HTML, RTF, or CSV

By default, A2M is the chosen format. If filename is not specified, printing will be sent to a printer.

Example:

$PrintDest test.mif MIF

COMMAND PRINTDESTNEW

This function is identical to $PrintDest, except that it deletes the output file.

The name of the destination file is passed as a parameter to the command:

Syntax:

$PrintDestNew [filename] [format]
where format = A2M, MIF, HTML, RTF, or CSV

By default, A2M is the chosen format. If filename is not specified, printing will be sent to a printer.

COMMAND PRINTNBDEC

This function allows the user to specify the number of decimals to print when printing tables or variables.

The number of decimals is passed as a parameter to the command: Syntax:

$PrintNbDec  nb

Example:

$wsloadvar bist92\bistel
$wsloadtbl bist92\tbistelf

$printdest bist92\bistelf1.a2m
#show processing french tables  file 1/2
$printnbdec 1
$PrintTbl 89:8 HYPEIR
$PrintTbl 89/88:8 HYPEIIR

COMMAND PRINTLANG

This function allows the user to specify the print language when printing tables. The default language is English.

The print language is passed as a parameter to the command:

Syntax:

$PrintLang {English | French | Dutch}

Example:

$wsloadvar bist92\bistel
$wsloadtbl bist92\tbistelf

$printdest bist92\bistelf1.a2m
#show processing dutch tables  file 1/2
$printnbdec 1
$printlang Dutch
$PrintTbl 89:8 HYPEIR
$PrintTbl 89/88:8 HYPEIIR

COMMAND PRINTA2MAPPEND

Allows the user not to clear the a2m file before printing. By default, the result files of print jobs are cleared before a new print. Only for a2m files, it is possible to avoid this default behavior and thus accumulate several successive print jobs in a single file.

Syntax:

$PrintA2mAppend [NO|Yes]

Example:

$PrintA2mAppend Yes
$PrintDest test.a2m A2M

These two calls define the file test.a2m as the result file for subsequent print jobs and do not clear this file.

COMMAND PRINTFONT

Sets the font for printing text paragraphs. In addition to the family, the base size (in points) and the size increment can also be specified. The base size corresponds to text paragraphs, the increment indicates by how many points each title level should be increased.

Warning

This value only has an effect before the $PrintDest function and not during the report.

Syntax:

$PrintFont Times|Helvetica|Courier|Bookman|Palatino [size [incr]]

The Bookman and Palatino fonts are not available for all print destinations. The first character of the font name is sufficient. Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintFont Times 10 2

Sets the size of paragraphs par_1, enum_1, etc. to 10 points, paragraph tit_2 to 12 points, tit_1 to 14 points, and tit_0 to 18 points.

COMMAND PRINTTABLEFONT

Sets the font for tables only. This font can therefore be different from that of the rest of the text, both in size and family.

Warning

This function only has an effect before the $PrintDest function and not during the report.

Syntax:

$PrintTableFont Times|Helvetica|Courier|Bookman|Palatino [size]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTableFont Palatino 8

Sets the font for all tables to Palatino, 8 points.

COMMAND PRINTTABLEBOX

Sets the border width of tables in points. This value can be zero to avoid borders.

Syntax:

$PrintTableBox  n

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTableBox  0

Removes the border from tables.

COMMAND PRINTTABLECOLOR

Allows the user to use or not use color in tables.

Syntax:

$PrintTableColor [NO|Yes]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTableColor No

Removes color from table printing.

COMMAND PRINTTABLEWIDTH

Sets the width of tables in Frame and Rtf. The parameters must be expressed in mm. Three values can be passed:

  • the total width

  • the width of the first column

  • the width of the following columns

Syntax:

$PrintTableWidth width [col1 [coln]]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTableWidth 160 60 15

COMMAND PRINTTABLEBREAK

Allows or disallows tables to be split across multiple pages: if a table is placed on the page so that it must be printed on two pages, an automatic page break is generated before the table.

Syntax:

$PrintTableBreak [NO|Yes]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTableBreak Yes

Table splitting is allowed during printing.

COMMAND PRINTTABLEPAGE

Forces a page break before each table.

Syntax:

$PrintTablePage  [NO|Yes]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintTablePage Yes

Forces a page break for each table.

COMMAND PRINTBACKGROUND

Sets the background color (tables and charts). A table will be hatched if the value of the “Shadow” graphic attribute is set to Yes. To avoid backgrounds in all tables, you can use White as the background.

Syntax:

$PrintBackground Black|Blue|Magenta|Cyan|Red|Green|Yellow|White

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintBackground Blue

The color of the hatched background in charts and tables is set to blue.

COMMAND PRINTGRAPHBOX

Sets the border width of charts in points.

Syntax:

$PrintGraphBox n

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintGraphBox 2

Subsequent charts will have a thick border.

COMMAND PRINTGRAPHBRUSH

Sets the background density of charts. The value is expressed as a percentage.

Syntax:

$PrintGraphBrush pct|Yes

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintGraphBrush 10

The density of the hatch “brush” is set to 10%. The color is determined by the $PrintBackground function.

COMMAND PRINTGRAPHSIZE

Sets the size of charts in mm and the font size used.

Syntax:

$PrintGraphSize  width [height] [fontsize]

where width and height are expressed in mm and fontsize in points.

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintGraphSize 150 60 8

Subsequent charts will occupy a frame of 15 cm by 6 cm and the text will be 8 points in size.

COMMAND PRINTGRAPHPAGE

Forces a page break before each chart.

Syntax:

$PrintGraphPage [NO|Yes]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example:

$PrintGraphPage Yes

Each subsequent chart will be placed at the beginning of a page.

COMMAND PRINTRTFHELP

Generates an RTF file for Windows help. This file can then be compiled using Microsoft’s HCW compiler. The RTF files generated in this way are not identical to those generated for WinWord.

Syntax:

$PrintRtfHelp [YES|No]

Once this value is set, it remains in effect for all subsequent print jobs, including in subsequent reports.

Example::

$PrintRtfHelp YES

The next file defined by $PrintDest … RTF will be of the Windows Help type.

COMMAND PRINTRTFTOPIC

Creates a new topic for a Windows help file (or a2m). This topic will be part of the automatic table of contents generated by IODE. The hierarchical level of the topic is set by the $PrintRtfLevel command. The topic text will also be used as the title.

Syntax:

$PrintRtfTopic topic title

Example:

$PrintRtfTopic Summary Tables

Generates in a2m (see a2m language syntax):

.topic [auto_number] [level] Summary Tables
.par1 tit_[level]
Summary Tables

If the generated file is an a2m file, the .topic command is only used in the case of a translation to Windows Help. However, .par1 tit_…. and the topic text will generate a title when printed.

COMMAND PRINTRTFLEVEL

Changes the hierarchical level of the following topics. This level change allows indentations to be generated in the resulting help file’s table of contents.

Syntax:

$PrintRtfLevel [+|-|n]

Example:

$PrintRtfLevel +

The level of the next topic will be incremented by 1, thus creating an indentation in the generated table of contents.

COMMAND PRINTRTFTITLE

Sets the title of the Windows help file.

Syntax:

$PrintRtfTitle help title

Example:

$PrintRtfTitle Hermes Model

COMMAND PRINTRTFCOPYRIGHT

Sets the copyright text for Windows help. This text appears in the Help option of the Winhelp program.

Syntax:

$PrintRtfCopyright copyright text

Example:

$PrintRtfCopyright (c) Federal Planning Bureau - 1998

COMMAND PRINTHTMLHELP

Specifies that the next generation of Html file should be for Windows HtmlHelp. This file can then be compiled using Microsoft’s HHC compiler.

Syntax:

$PrintHtmlHelp [YES|No]

Example:

$PrintHtmlHelp YES
$A2mToHtml myfile.a2m myfile.htm

COMMAND PRINTHTMLSTRIP

Specifies that the next generation of Html file should not include the HTML header and footer sections (<HEAD>, <BODY>, </BODY>, etc). Only the actual text is translated for later manual inclusion in an HTML file.

Syntax:

$PrintHtmlStrip [YES|No]

Example:

$PrintHtmlStrip YES
$PrintDest test.htm HTML
$PrintTbl ....

COMMAND PRINTPARANUM

Allows numbering of headings when printing (1., 1.1, …).

Warning

This function only has an effect before the $PrintDest function and not during the report.

Syntax:

$PrintParanum NO
$PrintParanum [NO|Yes]

Example:

$PrintParanum NO

Removes automatic numbering of headings.

COMMAND PRINTPAGEHEADER

Sets the title of printed pages. The characters %d are replaced by the current page number.

Syntax:

$PrintPageHeader title for the following pages

Example:

$PrintPageHeader Modtrim Model

COMMAND PRINTPAGEFOOTER

Sets the footnote of printed pages. The characters %d are replaced by the current page number.

Syntax:

$PrintPageFooter  footnote for the following pages

Example:

$PrintPageFooter - Page %d -

COMMAND SETPRINTER

Sets the default Windows printer for subsequent print jobs.

Syntax:

$SetPrinter printer_name

Example:

$SetPrinter 6_qms

COMMAND PRINTORIENTATION

Sets the orientation of the current Windows printer.

Syntax:

$PrintOrientation {Portrait|Landscape}

Example:

$PrintOrientation Portrait

COMMAND PRINTDUPLEX

Sets the duplex (double-sided) mode of the current Windows printer.

Syntax:

$PrintDuplex {Simplex|Duplex|VerticalDuplex}

Example:

$PrintDuplex Duplex

COMMAND PRINTGIFBACKCOLOR

Sets the background color of GIF charts generated when creating an HTML document.

Syntax:

$PrintGIFBackColor {Black|Blue|Magenta|Cyan|Red|Green|Yellow|White}

Example:

$PrintGIFBackColor Yellow

COMMAND PRINTGIFTRANSCOLOR

Sets the color considered as “transparent” in GIF files generated when creating an HTML document. This allows one of the colors to blend with the background. The “Transparent” option must be set by the $PrintGIFTransparent Yes command.

Syntax:

$PrintGIFTransColor {Black|Blue|Magenta|Cyan|Red|Green|Yellow|White}

Example:

$PrintGIFTransColor White

COMMAND PRINTGIFTRANSPARENT

Indicates whether GIF files generated when creating an HTML document should be in “transparent” format. This allows one of the colors (to be specified by the $PrintGIFTransColor command) to blend with the background.

Syntax:

$PrintGIFTransparent {Yes|No}

Example:

$PrintGIFTransparent No

COMMAND PRINTGIFINTERLACED

Indicates whether GIF files generated when creating an HTML document should be in interlaced format.

Syntax:

$PrintGIFInterlaced {Yes|No}

Example:

$PrintGIFInterlaced No

COMMAND PRINTGIFFILLED

Indicates whether to fill bars in bar charts of GIF graphics.

Syntax:

$PrintGIFFilled {Yes|No}

Example:

$PrintGIFFilled No

COMMAND PRINTGIFFONT

Specifies the font to use when creating GIF graphics. The available fonts are:

  • 0 : Tiny

  • 1 : Small

  • 2 : MediumBold

  • 3 : Large

  • 4 : Giant

  • 5 : Grayed

Syntax:

$PrintGIFFont FontNb (between 0 and 5)

Example:

$PrintGIFFont 1

Object printing

The following commands are used to print object definitions:

  • printobjdef : prints a definition of an object cmt / eqs / idt / lst / scl / tbl / var

  • printobjtitle : specifies whether only the titles should be printed

  • printobjlec : specifies the type of equation to print

  • printobjinfos : specifies the information to print

COMMAND PRINTOBJDEFXXX

Xxx takes one of the following values:

cmt / eqs / idt / lst / scl / tbl / var

This command prints the definition of objects from the current workspace in A2M format.

The list of comments to print is passed as a parameter to the command.

Syntax:

$PrintObjDefXxx [list of parameters]
where Xxx = {cmt / idt / lst / scl / tbl / var}

Example:

$PrintObjDefCmt CMT1 CMT2

COMMAND PRINTOBJTITLE

This function is used before $PrintObjDefTbl. It indicates whether only the table titles should be printed or the entire definition.

Syntax

$PrintObjTitle 0 or 1 0: full definition 1: titles only

COMMAND PRINTOBJLEC

This function is used before $PrintObjDefXxx. It indicates how equations should be printed: as is, with coefficients replaced by their values, or with t-tests.

Syntax

$PrintObjLec 0, 1 or 2 0: normal LEC form 1: coefficients replaced by their value 2: coefficients replaced by their value + t-tests

COMMAND PRINTOBJINFOS

This function is used before $PrintObjDefEqs. It indicates the information to print:

  • equations only

  • equations and comments

  • equations, comments, and estimation results

Syntax:

$PrintObjInfos 0, 1 or 2
0: equation only
1: equation + comment
2: equation + comment + estimation

Table compilation and printing

The following commands are used to compile tables and print or view them:

COMMAND PRINTTBLFILE

This command allows you to define the files to use when printing a comparison table between several files (maximum 4). The print sample can contain references to files other than the current workspace, placed in brackets (e.g. 90:2^[1;2]). File [1] is always the current workspace, the others can be defined either in the input page or as an argument in a report. The purpose of this function is to indicate the files referenced by [2], [3], etc.

The file number (2, 3, 4, or 5) followed by the file name are passed as parameters to the command.

Syntax:

$PrintTblFile n varfilename
where n = 2, 3, 4, 5

Example:

$wsloadvar bist92\bistel
$wsloadtbl bist92\tbistelf

$printdest bist92\bistelf1.a2m
#show processing french tables  file 1/2
$PrintNbDec 1
$PrintTblFile 2 variante
$PrintTbl 89:8[1;2] HYPEIR

After a call to $PrintTbl, you must redefine the files to compare: $PrintTbl “consumes” the file comparison definitions. There can be no space in the sample statement.

COMMAND PRINTTBL

This command allows you to build and print tables in A2M format.

The print sample followed by the list of tables to print are passed as parameters to the command. The last call to $PrintTblFile allows you to print file comparisons. However, the call to $PrintTbl` or $PrintVar “consumes” the files defined by $PrintTblFile. If you want to call $PrintTbl several times to compare files, you must specify the files to compare again before each call.

Syntax:

$PrintTbl sample table1 [other tables]

Example:

$wsloadvar bist92\bistel
$wsloadtbl bist92\tbistelf

$printdest bist92\bistelf1.a2m
#show processing french tables  file 1/2
$printnbdec 1
$PrintTbl 89:8 HYPEIR
$PrintTbl 89/88:8 HYPEIIR
$PrintTbl 89:8 RENAT01 RENAT0D RESL3R RESL31R RESL2

Warning

There can be no space in the sample statement.

Successive calls

The last call to $PrintTblFile allows the suer to print file comparisons. However, the call to $PrintTbl` or $PrintVar “consumes” the files defined by $PrintTblFile. If you want to call $PrintTbl` several times to compare files, you must specify the files to compare again before each call.

Example:

$PrintTblFile 2 ref.var
$PrintTblFile 3 var1.var
$PrintTbl 89:8[1;2;3] HYPEIR
$PrintTblFile 2 ref.var
$PrintTbl 89/88:8[1/2] HYPEIIR

COMMAND VIEWTBLFILE

This command allows you to define the files to use when viewing a comparison table between several files (max 4). The print sample can contain references to files other than the current workspace. (e.g. 90:2[1;2]). File [1] is always the current workspace, the others can be defined either in the input page or as an argument in a report.

The file number (2, 3, 4, or 5) followed by the file name are passed as parameters to the command.

Syntax:

$ViewTblFile n varfilename
where n = 2, 3, 4, 5

Example:

$wsloadvar bist92\bistel
$wsloadtbl bist92\tbistelf

$PrintNbDec 1
$ViewTblFile 2 variante
$ViewTbl 89:8[1;2] HYPEIR

After a call to $ViewTbl, you must redefine the files to compare: $ViewTbl “consumes” the file comparison definitions.

COMMAND VIEWTBL

This function builds and displays tables in a scrollable table (or editing table).

The print sample followed by the list of tables to view are passed as parameters to the command.

Syntax:

$ViewTbl sample table [list of tables]

Example:

$ViewTbl 90:6 CIIIR0 CIIR

Warning

There can be no space in the sample statement.

COMMAND VIEWBYTBL

Alias for the $ViewTbl command.

COMMAND PRINTVAR

This command allows the user to build and print comparison tables of series in A2M format. LEC forms are accepted and must be separated by semicolons. To define the files to compare, you must use the $PrintTblFile command as for tables and graphs.

Syntax:

$PrintVar gsample var1;var2

Example:

$PrintVar (80Y1/79Y1):10 X+Y;Z;ln(X)

Warning

There can be no spaces in the generalized sample.

COMMAND VIEWVAR

This command allows you to view comparison tables of series in A2M format.

Syntax:

$ViewVar gsample lec1 [lec2 ...]

where gsample is a generalized sample without spaces
      lec1 and lec2 are LEC forms without spaces

Example:

$ViewVar (80Y1/79Y1):10  X+Y  Z  ln(X)

Warning

There can be no spaces in the generalized sample.

COMMAND VIEWWIDTH

Warning

OBSOLETE

This function allows you to specify the column width when displaying tables (calculated). The value must be between 2 and 12.

Syntax:

$ViewWidth n
n between 2 and 12

COMMAND VIEWWIDTH0

Warning

OBSOLETE

This function allows you to specify the width of the first column (title column) when displaying tables (calculated). The value must be between 2 and 60.

Syntax:

$ViewWidth0 n
n between 2 and 60

COMMAND VIEWNDEC

This function allows you to specify the number of decimals for values displayed in tables (calculated). The value must be between -1 (variable number) and 6.

Syntax:

$ViewNdec n
n between -1 (variable) and 6

Graphs from tables

The following commands are used to compile tables and display them as graphs or save them in an A2M file:

COMMAND VIEWGR

This command allows you to display tables as graphs. Several graphs can be displayed on the same screen. The language is set by $PrintLang.

Syntax:

$ViewGr gsample tbl1[+tbl2] tbl3 ...
where gsample is a generalized sample without spaces
      tbl1, tbl2, and tbl3 are table names

When two tables are joined by the + sign, they are displayed on the same screen as two separate graphs.

Warning

There can be no spaces in the generalized sample.

COMMAND PRINTGRALL

Warning

This command is deprecated as of version 5 of IODE. It is replaced by the $PrintGr command.

COMMAND PRINTGRWIN

Warning

This command is deprecated as of version 5 of IODE.

COMMAND PRINTGRDATA

Warning

This command is deprecated as of version 5 of IODE.

COMMAND PRINTGR

This command prints one or more graphs defined from tables.

Syntax:

$PrintGr gsample table_names

Example:

$PrintGr 80/79:15 T1 T2

COMMAND DATAPRINTGRAPH

This command prints graphs built directly from variables (without using tables).

Syntax:

$DataPrintGraph   {Level | Diff | Grt}
                  {Line | Scatter | Bar | Mixt}
                  {NoXGrids | MinorXGrids | J(MajorXGrids)}
                  {NoYGrids | MinorYGrids | J(MajorYGrids)}
                  {Level | G(Log) | Semi-Log | Percent}
                  {ymin | --} {ymax | --}
                  perfrom perto varname1 varname2 ...

Example:

$DataPrintGraph  Level Line No No Level -- -- 1980Y1 1995Y1 X1 Y1 X1+Y1

Model operations

The following commands allow you to sort and simulate a model, estimate, and recompile equations:

COMMAND MODELCALCSCC

This function decomposes the model into Strongly Connected Components (SCC) and reorders it. Three lists are created: pre-recursive equations, interdependent equations, and post-recursive equations. When reordering the model, the number of triangulation (sorting) iterations for the interdependent block must be specified. This value only affects the list of interdependent equations. These 3 lists should only be constructed once for a given version of the model.

Syntax:

$ModelCalcSCC nbtri lstpre lstinter lstpost

where:

  • nbtri: number of triangulation iterations to perform

  • lst[pre|inter|post]: NAMES of the lists intended to contain the results of the equation sorting

Choosing the number of sorts

After decomposition into SCC, the interdependent block is sorted to increase simulation speed. The number of passes of the sorting algorithm can be specified in several places:

  • As a parameter to the $ModelCalcSCC report command

  • As the last parameter to the $ModelSimulateParms report command

Warning

In earlier versions, the number of triangulation passes specified in the simulation screen had no effect

COMMAND MODELSIMULATEPARMS

This command allows you to specify additional (mainly technical) parameters for a simulation. The simulation is actually launched by the $ModelSimulate command.

This function sets the following simulation parameters:

  • eps: convergence threshold

  • relax: relaxation parameter

  • maxit : maximum number of iterations

  • Connex, Triangulation or None: reordering algorithm

  • initial values (0 to 4)
    • 0 = Y := Y[-1], if Y null or NA

    • 1 = Y := Y[-1], always

    • 2 = Y := extrapolation, if Y null or NA

    • 3 = Y := extrapolation, always

    • 4 = Y unchanged

  • simulation with debugging

  • debugging of the Newton-Raphson sub-iteration

  • number of sorting iterations for the connected components

Syntax:

$ModelSimulateParms eps relax maxit
                    {Connex | Triang | None }
                    0 - 4 (starting values)
                    {Yes | no }
                    {yes | No }
                    nbtri

where eps   = convergence threshold (real number)
      relax = real number between 0.1 and 1

Example:

$ModelSimulateParms 0.001 0.7 100 Connex 0 Yes No 2
Debug Option

The simulation debug option automatically generates lists including pre-recursive and post-recursive equations.

Warning

Version 6.36: enabling the debug option generated a simul.dbg file containing a huge amount of information. In later versions, only the _PRE, _INTER and _POST lists (with the model decomposition) are generated.

Sub-iteration Debug Option

A trace file is generated if this option is set to Y. This file is named simul.dbg and is located in the directory from which IODE was launched. The trace file includes the list of equations for which a sub-iteration (Newton-Raphson) was necessary and the number of sub-iterations.

Choosing the number of sorts

After decomposition into SCC, the interdependent block is sorted to increase simulation speed.

COMMAND MODELSIMULATE

This function launches the simulation of a model. To simulate a model, all the model’s equations must be present in the equations workspace, and all variables and scalars used in the model’s equations must be defined in the variables and scalars workspaces. The values of exogenous variables and scalars CANNOT be NA (Not Available) over the relevant period.

The simulation parameters are defined by the auxiliary command $ModelSimulateParms. The simulation itself is performed by the $ModelSimulate command. The two boundary periods (start and end) and the list of equations to simulate are passed as arguments to the command. If the list is empty, the simulation will be performed for the model consisting of all equations in memory.

Syntax:

$modelsimulate period1 period2 [list_of_equations]

Example:

$-filedeletea2m ode.a2m
$printdest ode.a2m
#modelsimulate
$modelsimulate 1990Y1 1995Y1
$show test1
$modelsimulate 1990Y1 1995Y1 PC0 PIF
$show test2
$modelsimulate 1990Y1 1995Y1 $LIST
$show end of report

COMMAND MODELSIMULATESCC

This command launches the simulation of a model previously decomposed into SCC and sorted. Simulation performance, especially at startup (link, sort), is better with this command than with $ModelSimulate because the model reordering occurs only once and not at each simulation launch. The simulation process has been divided into 2 steps. The first only handles the reordering of the model ($ModelCalcSCC), the second handles the simulation.

The model simulation is based on three lists previously built by the $ModelCalcSCC command (or manually).

Syntax:

$ModelSimulateSCC from to pre inter post

where:

  • from and to determine the simulation sample

  • pre, inter and post are the lists that define the execution order of the model.

COMMAND MODELEXCHANGE

This command allows you to define or cancel endogenous-exogenous exchanges before launching the simulation of a model with goal seeking.

Syntax:

$ModelExchange eqname1-varname1,eqname2-varname2,...

where eqname1 and eqname2 are equation names (and thus endogenous variable names)
      varname1 and varname2 are exogenous variable names

To cancel the ENDO-EXO exchange, simply call the command without parameters:

$ModelExchange

COMMAND MODELCOMPILE

This command recompiles a list of equations or all equations if no list is specified. It is only useful if equations use macros in their LEC form.

Syntax:

$ModelCompile  [eqname1, eqname2, ... ]

where eqname1 and eqname2 are equation names.

COMMAND MODELSIMULATESAVENITERS

This command allows you to save in a variable the number of iterations required for each period during the last simulation. The name of the result variable is passed as a parameter. If there has not yet been a simulation during the session, the variable is created with NA values. If a simulation has already taken place, the values for non-simulated periods are set to 0 and those for simulated periods contain the number of iterations required for convergence for that period. If there is no convergence, the value is that of the maxit parameter of the simulation.

Syntax:

$ModelSimulateSaveNiters varname

Example:

$ModelSimulateSaveNiters SIM_NITERS

COMMAND MODELSIMULATESAVENORMS

This command allows you to save in a variable the convergence threshold (the norm) reached for each period during the last simulation. The name of the result variable is passed as a parameter. If there has not yet been a simulation during the session, the variable is created with NA values. If a simulation has already taken place, the values for non-simulated periods are set to 0 and those for simulated periods contain the convergence threshold for that period.

Syntax:

$ModelSimulateSaveNorms varname

Example:

$ModelSimulateSaveNiters SIM_NORMS

Identities executions

The following commands allow you to execute identities:

COMMAND IDTEXECUTE

An identity is an LEC form that indicates how a series (variable) should be constructed. The execution program calculates all the requested identities and saves the calculation results in the variables workspace. These identities are ordered in the logical order of execution: if A depends on B, B will be calculated before A. The user does not need to worry about this ordering. If a loop is detected among the identities, execution cannot start and a message is displayed.

The two boundary periods (start and end) and the list of identities to calculate are passed as arguments to the command. If the list is empty, the calculation will be performed for all identities in memory. Additional parameters can be defined by the commands IdtExecuteVarFiles and IdtExecuteSclFiles.

Syntax:

$IdtExecute period1 period2 [list_of_identities]

Example:

$IdtExecute 1953Y1 1996Y1 IDT1 IDT2
$IdtExecute 1953Y1 1996Y1 $IDTLIST

COMMAND IDTEXECUTETRACE

The trace of the identity calculation can be saved in the current A2M file defined by $PrintDest. Useful information (for example, the source file of a variable used to construct the identity) will be listed in the Trace file.

Depending on the parameter, the trace will or will not be saved during the next call to the $IdtExecute command.

Syntax:

$IdtExecuteTrace  {Yes | No}

COMMAND IDTEXECUTEVARFILES

This command is part of a group of commands that allow you to specify additional parameters (search files) for the calculation of identities. The associated commands are $IdtExecute and $IdtExecuteSclFiles. The calculation of identities is actually launched by the $IdtExecute command. This command allows you to specify the names of files where the series referenced in the identities should be searched. When a series or scalar needed for the execution of an identity is encountered, the specified files are analyzed in turn. As soon as the object is found, it is loaded into memory for the duration of the calculation. It is then deleted, unless it was initially in memory. If an object - variable or scalar - is neither in a workspace nor in one of the specified files, the calculation process stops. This command is only meaningful when the $IdtExecute command is used in command-line mode.

Warning

If the list of files is empty, only the current variables workspace is used for the search. Otherwise, you must specify WS (in uppercase) in the list of files, at the desired search position.

The list of files is passed as a parameter to the command.

Syntax:

$IdtExecuteVarFiles file [list of files]

Example:

$IdtExecuteVarFiles maribel.var WS test.var

COMMAND IDTEXECUTEScalarFILES

This command is part of a group of commands that allow you to specify additional parameters (search files) for the calculation of identities. The associated commands are $IdtExecuteVarFiles and $IdtExecute. The calculation of identities is actually launched by the $IdtExecute command. This function allows you to specify the names of files where the scalars referenced in the identities should be searched. When a scalar needed for the execution of an identity is encountered, the specified files are analyzed in turn. As soon as the object is found, it is loaded into memory for the duration of the calculation. It is then deleted, unless it was initially in the active workspace. If an object—variable or scalar—is neither in a workspace nor in one of the specified files, the calculation process stops. This function is only meaningful when the $IdtExecute command is used in command-line mode.

Warning

If the list of files is empty, only the current scalars workspace is used for the search. Otherwise, you must specify WS (in uppercase) in the list of files, at the desired search position.

The list of files is passed as a parameter to the function.

Syntax:

$IdtExecuteSclFiles file [list of files]

Exemple:

$IdtExecuteSclFiles WS maribel.scl test.scl

Report operations

The following commands allow you to manipulate reports (these functions are recursive):

COMMAND REPORTEXEC

This command executes an IODE report. The command is recursive and allows multiple levels of sub-reports. When sub-reports finish without a critical error, execution continues with the commands of the higher-level report.

The report to execute and its arguments are passed as parameters to the command.

Syntax:

$ReportExec report [arguments]

Example:

$ReportExec mysimul.rep 1990Y1 1992Y1

The $ReportExec function accepts a list as an argument:

$ReportExec test $LIST

receives as arguments the elements of the $LIST list and thus allows you to execute a generic report on an initially unknown number of arguments. For example, to replace all 0s with NA for the list $LIST of variables, simply do:

FILE ZEROTONA.REP

    $label again
    $goto end {%0%=0}
    #show Series processed: %1%
    $DataCalcVar %1% if(%1%=0, 1/0, %1%)
    $shift
    $goto again
    $label end

The command:

$ReportExec zerotona.rep $LIST

will replace 0s with NA for the series in the $LIST list.

COMMAND REPORTEDIT

Warning

OBSOLETE

This function allows you to create or modify a report.

The file to edit is passed as a parameter to the command.

Syntax:

$ReportEdit filename

Example:

$ReportEdit bist92\bistel.rep

A2M file translation

The following functions allow you to translate A2M files into different formats:

COMMAND A2MTOHTML

Translates an A2M file to HTML. If a previous call to the $PrintHtmlHelp command was made, the result will be an HTML file or several files allowing the creation of a HTML Help.

Syntax:

$A2mToHtml filein fileout
where filein = name of the input A2M file
      fileout = name of the output file

When creating the HtmlHelp, several output files will be created:

  • fileout.hhp

  • fileout.hhc

  • fileout.hhk

  • fileout.htm

  • T*.htm

COMMAND A2MTORTF

Translates an A2M file to RTF. If a previous call to the $PrintRtfHelp command was made, the result will be an RTF file allowing the creation of a Windows Help.

Syntax:

$A2mToRtf filein fileout
where filein = name of the input A2M file
      fileout = name of the output file

When creating the Windows Help, several output files will be created:

  • fileout.rtf

  • fileout.hpj

  • fileout.cnt

COMMAND A2MTOMIF

Translates an A2M file to a MIF file.

Syntax:

$A2mToMif filein fileout
where filein = name of the input A2M file
      fileout = name of the output file

COMMAND A2MTOCSV

Translates an A2M file to a CSV file.

Syntax:

$A2mToCsv filein fileout
where filein = name of the input A2M file
      fileout = name of the output file

COMMAND A2MTOPRINTER

Warning

OBSOLETE

Translates an A2M file and prints it on the current printer.

Syntax:

$A2mToPrinter file.a2m

Other report functions

COMMAND STATUNITROOT

This command computes Dickey-Fuller tests. The values of the tests are saved in scalars whose name is composed of the prefix df_ and the name of the first variable appearing in the formula to be tested. For example, the test for the formula d(A0GR+A0GF) is df_a0gr.

Syntax:

$StatUnitRoot drift trend order expression

where:

  • drift: 0 or 1 depending on whether the estimated formula should include a constant term (1) or not (0)

  • trend: 0 or 1 depending on whether the estimated formula should include a trend term (1) or not (0)

  • order: the order of the polynomial to estimate for the tests

  • expression: LEC formula to test

Example:

$StatUnitRoot 1 1 3 A

Result:

d(A) := df_ * A[-1]+
        df_d +                                        /* DRIFT */
        df_t * t +                                    /* TREND */
        df1 * d(A[-1]) + df2*d(A[-2]) + df3*d(A[-3])  /* ORDER */

COMMAND WSAGGRCHAR

Defines the character to introduce in the name of the series created by WsAggr.... See $WsAggrSum.

COMMAND WSAGGRSUM

Report functions allow you to perform aggregations, products, or sums of series. The series to process can be in the current workspace or in an external file.

Four report functions have been defined for this purpose:

$WsAggrChar [char] : defines the character to introduce in the name of the created series
$WsAggrSum  pattern [filename] : sum of the series defined by the pattern
$WsAggrMean pattern [filename] : mean of the series defined by the pattern
$WsAggrProd pattern [filename] : product of the series defined by the pattern

If filename is defined, the series from the file will be used instead of those from the current workspace.

pattern is defined as a sequence of name parts placed between brackets or parentheses. Each part can contain alphanumeric characters or a question mark.

Rules:

  • Name parts in parentheses () are NOT aggregated.

  • Those in brackets [] are aggregated.

Example:

Suppose a workspace with series by country (BE, FR, GE), and by sector (S101..S999):

BES101, BES102 ... BES199
BES201, BES202 ... BES299
...
BES901, BES902 ... BES999

FRS101, FRS102 ... FRS199
FRS201, FRS202 ... FRS299
...
FRS901, FRS902 ... FRS999

...

GBS101, GBS102 ... GBS199
GBS201, GBS202 ... GBS299
...
GBS901, GBS902 ... GBS999

It is possible to create the sum of all sectors for each country with the commands:

$WsAggrChar _
$WsAggrSum (??)[????]

The created series will be:

BE____, FR____, ..., GB____

The ? characters in () specify the series codes to process. The others in [] indicate the parts to aggregate. In the above case, the ? characters are replaced by underscores _ (or another character according to the argument of $WsAggrChar) in the result series. This character can be a blank space. In the example, the created series are then BE, FR, and GB.

It is also possible to create the sum of all countries by sector or the sum of all countries for certain sectors:

$WsAggrSum [??](????)   : creates __S101, __S102, ...
$WsAggrSum [??](??)[??] : creates __S1__, __S1__, ...

It is even possible to limit the creation to only one or a few codes:

$WsAggrSum (BE)[S??9]   : creates BES__9
$WsAggrSum (BES)[?](?9) : creates BES_09, BES_19, BES_29, ... BES_99
Grouping character

The $WsAggrChar command allows you to specify the character to place in the generated series. This character can be a blank space. To prevent already aggregated series from being included in a subsequent aggregation, these series are not included in the calculation if the current aggregate character is found at a position in the pattern corresponding to a ? in []. Thus, the series BE____ will not be included in the calculation (BE)[????]. However, it will be included in the calculation with the pattern [??](????).

Suppose the series BE____, FR____ and GB____ are defined as well as BES101, … Then, the call $WsAggrSum (??)[????] will overwrite BE____, FR____, etc. Therefore, it does not use the series containing the underscore _ after the second position, such as BE____. Indeed, if they were included, the same series would be added twice. On the other hand, the call $WsAggrSum [??](????) will generate ______ by taking the sum of BE____, FR____, GB____, which is correct because the other series (like BES101) will be aggregated in other series (__S101).

COMMAND WSAGGRMEAN

Computes the mean of series. See $WsAggrSum.

COMMAND WSAGGRPROD

Computes the product of series. See $WsAggrSum.

Python equivalent functions

To get the Python equivalent of the above IODE commands, refers to the Equivalence Between IODE Report Commands and Python Methods tables.

Macros

Two types of macros can be used in IODE reports.

The first are local macros, which are only known to the currently running report. These are the report arguments (%n%). You can use these values as long as you know the order in which they are passed. A sub-report, of course, receives new definitions for the %n% variables. When returning to the higher-level report, the values of %n% are restored to their original state.

If the % character needs to appear in the text, it must be doubled. Thus:

%%1%%

is not considered a macro but is replaced in the output by the text %1%.

Syntax:

%n%
n := position of the argument
(%0% := number of arguments passed to the report)
(%*% := all arguments passed to the report)

For example, let’s assume we have a report invert.rep with the following content:

$show %2% %1%
$show %*%
$shift
$show %*%
$Return

Then, the call:

$ReportExec invert one two

will display the following output:

two one
one two
two

The second type of macros are global: they are known as soon as they are defined and can be used in all sub-reports via their name. Their content can be modified during the execution of the report (or sub-reports) by the $Define instruction with the same name. The last definition encountered overrides the previous ones.

Syntax:

%name%
name := name of the macro (see $Define)

You can also use them to globalize a local variable and thus use a report parameter in a sub-report:

$Define FILE %1%
$Define VAR %2%
$WsCopyVar %FILE% %VAR%

LEC Expressions

It is possible to interleave text and LEC formula commands: this allows, for example, to base $goto conditions on the values of variables or scalars. If variables are used, the calculation period corresponds to the current value of t, set by the $SetTime and $IncrTime commands.

To indicate a LEC formula to be calculated in a report, simply enclose it in curly braces {}. You can format its result as follows:

{LEC}       the result is formatted automatically
{LEC@T}     the result is formatted as a period (1990Y1)
{LEC@99.9}  the result is formatted in 3 digits with one decimal
{LEC@.99}   the result is formatted with two decimals

For example, the two following report lines:

$SetTime 1990Y1
The GNP in {t@T} is {PNB@9999.9} billion FB.

will display the output:

The GNP in 1990Y1 is 3089.0 billion FB.

If the characters { and } must appear in the text, they must be doubled. Thus:

{{example of lec formula}}

is not considered a LEC formula to be calculated but is replaced in the output by the text:

{example of lec formula}

Report Lines Interpretation

A report line is interpreted before being (possibly) executed. Each line is interpreted from left to right. As soon as one of the special characters (%, {, } or @) is encountered, a specific processing is applied.

If % is encountered:

  • if the next character is %, the double % is replaced by % in the output text.

Example: increase of 10%% of GNP -> increase of 10% of GNP - otherwise, the macro is replaced by its value or empty if the macro does not exist. Example: the variable %VAR% -> the variable XYZ

If { is encountered:

  • if the next character is =, the content between braces is considered as an Excel reference and replaced

  • if the next character is {, the double { is replaced by { in the output text.

Example: {{example of lec formula}} -> {example of lec formula} - the text is read up to }, macros are replaced - if the resulting text starts with $ or #, it is a report command that is executed and the result (0 or 1) is inserted in the text - otherwise, the resulting text is calculated as a LEC formula at the current period defined by $SetTime. If the formula ends with @T or @999.999, the result is formatted accordingly.

If @ is encountered:

  • if the next character is @, the double @ is replaced by @ in the output text.

Example: @@example of lec formula -> @example of lec formula - the text is read up to the closing parenthesis - the corresponding function is executed. Note that if there are no parentheses, the text remains unchanged (e.g.: gb@plan.be remains as is).

For example, the following report lines:

$define VAL 123.123
$msg {%VAL%@999.9}
gb@plan.be

will display the output:

123.1 gb@plan.be