User Tools

Site Tools


Create template files for batch mode

EASA drives software applications in their batch mode. Therefore, pre-existing batch input files must be available for an EASAP to work, and these files may need to be modified by an author to work properly with an EASAP. Batch input files only need to be modified if they contain settings or commands that are affected or dependent on user inputs.

All batch files, modified or not, need to be uploaded onto the EASA Server and into the EASAP folder using the Files selection under the Authoring menu or the Files tab in EASAP Builder.

Once you have determined that a batch file requires modification, then there are two steps involved:

  1. Insert delimited object references into the batch file using the Template Editor or the text editor of your choice.
  2. Create a REPLACEMENT object identifying the batch file to be targeted for replacement of object references with actual object values when the EASAP executes.

Editing Batch Files

To create Templates from existing batch files, you will need to edit the files by inserting DORs at the appropriate locations within these files. There are two basic usages of DORs within batch files:

  1. Direct replacement of input parameter values or settings based on user inputs, and
  2. Place holders for complete command lines that are dependent on user inputs.
  • When editing template batch files, replace any “full paths” with “local paths”, for example replace,
    • C:\Test\run.bat.\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 Authoring Menu, 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 Authoring Menu. 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


Page Tools