User Tools

Site Tools


Create a template file for batch mode

EASA may drive a batch mode software application.

Batch mode uses input files instead of interactive inputs, EASA uses a single input file as a template to allow dynamically change values prior to the 'EASAP run'.

All batch files, whether used dynamically as a template or static need to be uploaded onto the EASA Server and into the EASAP folder using EASA→Author-mode→Authoring→Files the Files tab in the Builder.

  • if a batch file requires modification, then
    1. insert delimited object references into the batch file using the Template Editor or the text editor of your choice.
    2. create a REPLACEMENT to designate the batch file to with object references replaced when the EASAP is run

Edit a batch file

To create a template from an existing batch file, edit the file by inserting percent delimited object references ('DORS') at the relevant locations within these files.

  • there are two general cases to use a DOR within a batch file
    1. direct replacement of input parameter value or setting based on user input
    2. place holder for a complete command line that is dependent on user input

When editing template batch files, replace any full paths with local paths (eg. replace C:\Test\run.bat with .\run.bat)


Template Editor

EASA contains a tool called the Template Editor that is designed to simplify the process of adding DORs into text files, such as template batch files. In addition to adding delimited object references to files, the Template Editor can also be used like a text editor to type in other changes to the file.

The Template Editor is accessed by clicking on one of the Open Template Editor buttons (open_template_editor.jpg) or by selecting Template Editor under the EASA > Authoring, and then by clicking on one of the Edit buttons () within the ‘Template Files’ table. When you click on an Edit button, the Template Editor will appear in a separate window as shown below.

Basic functions expected within a text file editor are present in the form of both menu picks under the File and Edit menus and as buttons on the editor’s toolbar. Descriptions of the individual buttons on the toolbar are provided in Table 12.2.

IconNameFunction
Save FileSaves current version of the file. CTRL-s
Refresh FileRefreshes the display of delimited object references in the file.
UndoUn-does last action. Multiple undo’s allowed.
RedoRe-does last action. Multiple redo’s allowed.
CutCuts the selected text. CTRL-x
CopyCopies the selected text. CTRL-c
PastePastes the previously cut or copied text. CTRL-v
FindFinds typed in text within file. CTRL-f
Select DORsSelects all delimited object references containing typed text within file.
Goto Line NumberPositions cursor at beginning of typed line number. CTRL-g
Filter DOR ListShows only objects in DOR List matching search string entered
Reset DOR ListResets display in DOR List to all available objects
Insert DORInserts a DOR in the selected file location for the selected object in the DOR List
Remove DORRemoves the selected DOR from the file and replaces it with the original value
DOR Name ViewDisplays DORs as bold colored object names
DOR Value ViewDisplays DORs as bold colored values of the objects
DOR Text ViewDisplays the full syntax of DORs in the file
Format DORSets the number format for the selected DOR

Some important menu functions not provided in the toolbar are:

  • Reload the last saved version of the DOR List in EASAP Builder under the File menu CTRL-r NOTE: Allows updating of DOR List from recently saved EASAP Builder session without Template Editor restart.
  • Create Shortcut to file on your desktop under the File menu
  • Save Options → Windows or Unix under the File menu
  • Exit under the File menu CTRL-q
  • Format Groups … to create predefined number formats under the Edit menu

The Save function always writes over the previous version of the file.

Adding a DOR The main purpose of the Template Editor is to add DORs to text files. The process for adding a DOR is as follows:

  1. With the mouse, highlight the characters in the file to be replaced by a DOR.
  2. In the DOR List frame, highlight the object name to be inserted as the DOR, and then click on the Insert DOR button () in the toolbar or simply double-click on the object name.
  3. If the DOR has units associated with it, select the appropriate unit in the pull-down list labeled Units: in the toolbar.

For certain types of objects, e.g. COMPUTE, the Unit Group parameter must be set to a DIMENSIONAL GROUP, in order for a unit to be specified in a DOR of the object.

  • If the DOR has a numerical value and you would like to format the number, click on the Format DOR button () in the toolbar and then set the format on the form that appears (See the next section for more details).
  • Formatting Numbers in DORs In the Template Editor, there are a few methods for formatting the number of a numerical DOR. First, when you select a DOR and then click on the Format DOR button, a form appears as shown in Figure 12.10. On this form, you first select the type of number format to use on the DOR from four choices:
  • No Format
  • Single Format - where you set the type (General, Number, Scientific, Integer), width and decimal places of the number.
  • Group Format - where you select an existing number format group that has been defined using the Format Groups selection under the Edit menu
  • Custom Format where you type in number format syntax as described in Formatting Numbers in DORs.

EASA Text File Editor

The EASA Text File Editor is a basic file editor that is accessed by clicking on one of the Edit buttons () within the ‘Current Files’ table found on the Files page under the EASA > Authoring. This text editor can be used as an alternative to the Template Editor. However, you will need to take care to type in the proper syntax for any DORs inserted into a file. When you click on an Edit button, the editor will appear in a separate window as shown below.

Basic functions expected within a text file editor are present in the form of both menu picks under the File and Edit menus and as buttons on the editor’s toolbar. Descriptions of the individual buttons on the toolbar are provided in the table below.

IconNameFunction
Save FileSaves current version of the file. CTRL-s
Reload FileReloads the last saved version of the file. CTRL-r
UndoUn-does last action. Multiple undo’s allowed. CTRL-z
Redo