Specifying Substitution Text |
There are four ways in which substitution text is entered into GI/Substitution.
Parsing of user's Permanent XML configuration file
Parsing of VISTA/ACTIVE/INPUT comment lines
Parsing of embedded HTML
Processing of User-Input values from Dialog
The XML configuration file is set by the calling application. Not all applications may support this feature. Consult the individual application regarding it's use of GI/Substitution.
VISTA files are parsed based on the following criteria:
Column 1 contains a single quote (')
Column 2 contains an ampersand (&)
Column 3 contains a digit 1-9*
Column 4 contains a space
Column 5-<eol> contains the text to substitute.
Currently, the only "macro" defined for VISTA is "_DDMMM", which will substitute the current date in DDMMM format.
Example:
|
'THIS INPUT FILE CREATES PNRS FOR CONNECTION SEGMENTS ON TW AND WITH 'OAL SEGMENTS ALSO TO TEST 11742 AUTO UPGRADE '&1 _DDMMM '&3 PATSY I G*I BSO LOGI PARS BSIA5555CE/CE B@F33/GS BSAD A&1CHISLC-TW/STL 01Y1Y2 A/R5D 01Y1Y2 -LOUD/SPEAKER¦7TAW/00/&1¦9-&3¦5-CM10 3SSRFQTUTWHK/TW88709014-1 E |
IN addition to VISTA/ACTIVE/INPUT substitution, GI/Substitute will accept a specially coded "HTML" comment.
The requirements are:
Column 1 contains a single quote (')
the line contains a "<SUB ..>" pseudo-HTML expression
Example:
|
'THIS INPUT FILE CREATES PNRS FOR CONNECTION SEGMENTS ON TW AND WITH 'OAL SEGMENTS ALSO TO TEST 11742 AUTO UPGRADE '&1 _DDMMM+1 '&2 ~NOW[Ha/p] '&3 PATSY '<SUB KEY="CHIMIA" TYPE="Text" VALUE="NYCLAX" Description="New York to LAX"> I G*I BSO LOGI PARS BSIA5555CE/CE B@F33/GS BSAD A&1CHISLC&2-TW/STL 01Y1Y2 A/R5D 01Y1Y2 -LOUD/SPEAKER¦7TAW/00/&1¦9-&3¦5-CM10 3SSRFQTUTWHK/TW88709014-1 ER QEP/70*C2 I A&1CHISLC8A-UA/DEN 01Y1Y2 A/R5D-TW/STL 01Y1Y2 -CD/PLAYER¦7TAW/00/&1¦9-&3¦5-CM10 3SSRFQTUTWHK/TW88709014-1/Time=&2 ER QEP/70*C2 I A&1CHIMIA8A-TW/STL 01Y1Y2 A/R5D-AA/ATL 01Y1Y2 -TAPE/PLAYER¦7TAW/00/&1¦9-PATSY¦5-CM10 3SSRFQTUTWHK/TW88709014-1 ER QEP/70*C2 I |
In this example, all occurrences of the string "CHIMIA" will be substituted with "NYCLAX". This allows you to build even more generic input scripts and test with different substitutions.
More information can be found in Inline Substitution
If the application supports it, GI/Subsitution can show a dialog box to allow the user to edit the current substitutions.
An example of the dialog box: