| iMatix home page
| Libero home page | Libero documentation
| << | < | > | >>
Libero Libero
Version 2.32

Using Templates

The standard Libero schemas support templates. This just means that you can build a library of code that the generator will pull-in whenever you use it in a dialog.

For example, let's say that you are working in a COBOL application where a lot of programs need to do the same work in Initialise-The-Program:

    MOVE LINKAGE-BLOCK TO OWN-LINKAGE-BLOCK
    PERFORM CHECK-LINKAGE-VALUES
    IF CURRENT-LANGUAGE = SPACES
        MOVE "ENGLISH" TO CURRENT-LANGUAGE

You can either:

Let's say you make a file called TEMPLATE.cob. This looks like this:

<Initialise-The-Program>
    MOVE LINKAGE-BLOCK TO OWN-LINKAGE-BLOCK
    PERFORM CHECK-LINKAGE-VALUES
    IF CURRENT-LANGUAGE = SPACES
        MOVE "ENGLISH" TO CURRENT-LANGUAGE
<END>

Now, when you build a new program, Libero magically includes this code in the INITIALISE-THE-PROGRAM section. This is how templates work:

The file template provides an example that you can use for your own templates.


| << | < | > | >>
| Using Libero | The Dialog File Syntax | Libero Options | Using Exceptions | Using The Defaults State | Using Sub-Dialogs | Using Super-States | Using Templates | Using Get-External-Event | Efficiency | Care and Feeding of Dialogs | When To Use Libero
iMatix
Copyright © 1996-97 iMatix