home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
tem98233.zip
/
TEMPLATE.INF
(
.txt
)
< prev
Wrap
OS/2 Help File
|
1998-07-26
|
37KB
|
1,487 lines
ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
Introduction
This document covers the TEMPLATE.CMD command which can be used to create
output files based on a template.
The template can extract information from the environment (environment
variables etc), and can also prompt user for information. Data from user can
be validated both with standard validations and custom validation code that the
template supplies.
The TEMPLATE.CMD command supports decision making with commands such as "#if"
and supports #define & #include commands.
If you have any suggestions or if you find any bugs I'd appreciate you
contacting me by email (db0@anz.com).
Regina
Regina is a free rexx interpreter which allows this program to run under DOS
and Windows 95 or Windows NT.
Currently when running under regina there are these known limitations:
1. Unless running under OS/2 you will not be able to use ANSI colors for
"pretty" command prompts.
2. The prompt where you enter your data is not very good as its that
provided by the operating system.
3. Can't set initial values in prompts.
4. A lot of the inbuild validations and case conversions etc do not
work. You will need to do your own validation routines (not hard) to
perform validations and ensuring values are upper case etc.
Note that the "CURSORT.EXE" is an OS/2 program only. Its not used under
Regina.
Whether I improve this or not depends on feedback, so far I haven't had any at
all... So I concentrate my efforts where it benefits me most.
ΓòÉΓòÉΓòÉ 2. TEMPLATE.CMD Command Line ΓòÉΓòÉΓòÉ
TEMPLATE.CMD Command Line
TEMPLATE[.CMD] TemplateFileName OutputBase
The "TemplateFileName" names the template file which determines the questions
the user is asked and what output files are generated. This parameter can be
accessed from your script via the "${Template}" variable. An example is
available.
Whenever a "StartTemplate" command is encountered the text attached is appended
to the "OutputBase" parameter. In general you would probably specify the
output directory here and the filename on the "StartTemplate" command.
ΓòÉΓòÉΓòÉ 3. General Syntax ΓòÉΓòÉΓòÉ
SYNTAX
This section describes the basic syntax of the template file.
Unless within a "StartTemplate" and "EndTemplate" block all leading (&
trailing) whitespace on a line is ignored.
Unless within a "StartTemplate" and "EndTemplate" block all lines beginning
with ";" are comment lines and are ignored. If a line contains ";;" then the
line is truncated immediately after the last whitespace prior to the inline
comment. Note that you may need to use ";;" in a line, in this case add an
inline comment to the end of the line as everything after the last ";;" is
removed!
Unless within a "StartTemplate" and "EndTemplate" block a line which only
contains spaces or is empty (blank) is treated as a comment and is ignored.
Template commands are not case sensitive, for example you could use any of the
following:
StartTemplate
STARTTEMPLATE
starttemplate
QUOTED TEXT
Many commands require quoted text, the only thing special about the quotes in
this program are that they can be almost any character (anything
non-alphanumeric), the only restriction are as follows:
1. The same quote character must appear at the start and end of the
text.
2. If another parameter follows then there must be at least one space
after the end quote character.
QUOTED TEXT EXAMPLES
The following are examples of valid quoted strings:
"A string"
'Another string'
^A 'string' which contains "quotes"^
ΓûêABCΓûê
ΓòÉΓòÉΓòÉ 4. Commands ΓòÉΓòÉΓòÉ
AVAILABLE COMMANDS
The following commands are related to user prompting:
StartPrompt
EndPrompt
AnswerLength
PromptOption
PromptText
ValidCharList
InitialValue
StripAnswer
BeforePrompt
AfterPrompt
ValidationRoutine
The following commands are related to template handling:
StartTemplate
EndTemplate
The following commands are are used to set internal variables which will be
replaced in any future source lines (textual replacement):
#define
Evaluate
The following commands allow you to execute parts of your template
conditionally (for example to selectivly ask user questions based on
previously selected information):
#if
#elseif
#endif
Other Commands:
#hash
#include
DEBUG
ΓòÉΓòÉΓòÉ 4.1. #define ΓòÉΓòÉΓòÉ
#define
A #define can be used to define a value (constant) once and then refer to it
elsewhere. It allows you to update one place and have all necessary change
flow though to all the statements that refer to it. Another possible use would
be to "pass" parameters to a common piece of code which is included a number of
times in your script.
You can redefine the contents of a variable if you wish later on in the script.
To use your #define'd variable simply enclose it with "{" and "}", the line
will be modified before its executed.
Syntax
[whitespace]#define Variable [whitespace]"Contents"[whitespace]
The "Variable" is to be defined and whenever seen in following lines will be
replaced by the Contents.
The "EVALUATE" command performs a similar function however it executes rexx
commands and/or your scripts to determine what the value is.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "HostConnectMethod"
PromptText "SDLC or FRAD (S/F) ==> "
AnswerLength 1 1
ValidCharList "SF"
PromptOption "Upper"
EndPrompt
#if '{HostConnectMethod}' = 'F'
#define SDLC 00
#elseif
;--- Ask Question ------------------------------------------------
StartPrompt "SDLC"
PromptText "POLL Address (2 Character Hex) ==> "
AnswerLength 2 2
ValidCharList "0123456789ABCDEF"
PromptOption "Upper"
EndPrompt
#endif
ΓòÉΓòÉΓòÉ 4.2. #elseif ΓòÉΓòÉΓòÉ
#elseif
This command is used if you wish to have some lines included when the #if
condition is false.
ΓòÉΓòÉΓòÉ 4.3. #endif ΓòÉΓòÉΓòÉ
#endif
This command is used to terminate a previous #if command. There should be a
matching #endif for every #if command.
ΓòÉΓòÉΓòÉ 4.4. #hash ΓòÉΓòÉΓòÉ
#hash
A #hash is used to change all following commands that begin with a '#' in this
document to use a different character as specified. The main use of this
command would tend to be to remove clashes with lines within "StartTemplate" &
"EndTemplate" commands (for example if "#include" is found is this a Template
command or should it be output as is into the generated output).
Syntax
[whitespace]#hash [whitespace]"NewHash"[whitespace]
The "NewHash" variable specifies what following template commands should be
preceeded by.
Example
#define VAR1 "Var1 Contents"
#hash "!"
!define VAR2 "Var2 Contents"
!hash "#"
#define VAR3 "Var3 Contents"
ΓòÉΓòÉΓòÉ 4.5. #if ΓòÉΓòÉΓòÉ
#if
A #if can be used to conditionally include lines of text, this can be any other
type of line or command except #elseif or #endif.
#if commands can be nested to any level and there need not be any lines between
a #if and a #endif or #elseif command.
Syntax
[whitespace]#if [whitespace]"ValidRexxCondition"[whitespace]
The "ValidRexxCondition" specifies a valid rexx conditional test which results
in a TRUE or FALSE answer. The condition may be as complex as you wish and may
include the special GetEnv() function to obtain information from the
environment.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "HostConnectMethod"
PromptText "SDLC or FRAD (S/F) ==> "
AnswerLength 1 1
ValidCharList "SF"
PromptOption "Upper"
EndPrompt
#if '{HostConnectMethod}' = 'F'
#define SDLC 00
#elseif
;--- Ask Question ------------------------------------------------
StartPrompt "SDLC"
PromptText "POLL Address (2 Character Hex) ==> "
AnswerLength 2 2
ValidCharList "0123456789ABCDEF"
PromptOption "Upper"
EndPrompt
#endif
ΓòÉΓòÉΓòÉ 4.6. #include ΓòÉΓòÉΓòÉ
#include
A #include can be used to include another file for processing. This allows you
to split a very large complicated script into smaller easier to understand
components or reuse a long sequence of lines "passing" parameters to the
included file via a "#define" or "evaluate" command.
Syntax
[whitespace]#include [whitespace]"FileName$"[whitespace]
The "FileName" specifies the file to be included.
Example
#include "CM2.RSP"
ΓòÉΓòÉΓòÉ 4.7. AfterPrompt ΓòÉΓòÉΓòÉ
AfterPrompt
The intention of this command is to allow the user to change the color of the
text that the user enters (the answer). One would normally only include ANSI
codes which are otherwise invisible.
If this command is used between "StartPrompt" and "EndPrompt" statements then
the command applies only to the current prompt, otherwise it applies to all
following prompts (as a default value).
Syntax
[whitespace]AfterPrompt [whitespace]"AnsiCodes"[whitespace]
The "AnsiCodes" parameter is output to the screen immediately after the prompt
text (specified on the "PromptText" command).
Example
;--- Specify colors to be used when asking questions ------------------------
BeforePrompt "
"
AfterPrompt "
"
;--- 1st Prompt -------------------------------------------------------------
StartPrompt "Var1"
PromptText "Prompt 1 ==> "
EndPrompt
ΓòÉΓòÉΓòÉ 4.8. AnswerLength ΓòÉΓòÉΓòÉ
AnswerLength
This command can be used to limit the length of a users response and to specify
a minimum number of characters that must be entered. If the command is not
used then there is no minimum (empty answer is OK) and the maximum response is
79 characters less the length of the prompt specified on the "PromptText"
command. This command is only valid between "StartPrompt" and "EndPrompt"
statements.
Syntax
[whitespace]AnswerLength [whitespace]Minimum [whitespace]Maximum[whitespace]
The "Minimum" & "Maximum" parameters specifies the length of the answer.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "BSB"
PromptText "BSB ==> "
AnswerLength 4 4
ValidCharList "0123456789"
EndPrompt
ΓòÉΓòÉΓòÉ 4.9. BeforePrompt ΓòÉΓòÉΓòÉ
BeforePrompt
The intention of this command is to allow the user to change the color of the
text that the user is prompted with. One would normally only include ANSI
codes which are otherwise invisible.
If this command is used between "StartPrompt" and "EndPrompt" statements then
the command applies only to the current prompt, otherwise it applies to all
following prompts (as a default value).
Syntax
[whitespace]BeforePrompt [whitespace]"AnsiCodes"[whitespace]
The "AnsiCodes" parameter is output to the screen just prior to the prompt text
(specified on the "PromptText" command).
Example
;--- Specify colors to be used when asking questions ------------------------
BeforePrompt "
"
AfterPrompt "
"
;--- 1st Prompt -------------------------------------------------------------
StartPrompt "Var1"
PromptText "Prompt 1 ==> "
EndPrompt
ΓòÉΓòÉΓòÉ 4.10. DEBUG ΓòÉΓòÉΓòÉ
DEBUG
This command is useful if your template is not doing what you expect it to.
Fairly basic support as yet....
Syntax
[whitespace]Debug[whitespace]
This command does not take any parameters.
ΓòÉΓòÉΓòÉ 4.11. EndPrompt ΓòÉΓòÉΓòÉ
EndPrompt
This command marks the end of a prompt block that began with the "StartPrompt"
command. The user will be immediately prompted for the answer.
Syntax
[whitespace]EndPrompt[whitespace]
This command does not take any parameters.
ΓòÉΓòÉΓòÉ 4.12. EndTemplate ΓòÉΓòÉΓòÉ
EndTemplate
This command marks the end of a template block that began with the
"StartTemplate" command.
Syntax
[whitespace]EndTemplate[whitespace]
This command does not take any parameters.
ΓòÉΓòÉΓòÉ 4.13. Evaluate ΓòÉΓòÉΓòÉ
EVALUATE
This command performs a similar function to the #define command in that the
result is stored and is used if the variable name is enclosed with "{" & "}".
You would use this command (over #define) for one of the following main
reasons:
1. You wish to get some some data from rexx.
2. You wish to perform arithmetic or other similar operation.
3. You wish to get some information out of the environment.
The evaluate command will handle syntax errors and unknown variables (it will
die in these situations).
Syntax
[whitespace]EVALUATE [whitespace]"Variable" [whitespace]["Expression"][whitespace]
The "Variable" parameter is the name of the #define variable you wish created
or updated. Note that it is possible to execute a rexx command which does not
directly return a result that can be assigned via a "=" sign if the variable
parameter is blank.
The "Expression" parameter is executed by rexx and the result assigned to a
variable (Variable = Expression). If its not supplied then its assumed you
wish to get the value of a rexx variable with the same name. The expression
currently supports the "GetEnv()" function.
EXAMPLE
evaluate Path "GetEnv('PATH')"
evaluate 'Answer' "(5 + 6) * 11"
ΓòÉΓòÉΓòÉ 4.14. InitialValue ΓòÉΓòÉΓòÉ
InitialValue
This command specified the initial answer for the prompt the user gets. If
this command is not used the initial answer is empty. This command is only
valid between "StartPrompt" and "EndPrompt" statements.
Syntax
[whitespace]InitialValue [whitespace]"StartingValue"[whitespace]
The "StartingValue" parameter is the initial value for the users response.
Note that the value is not validated in any way (for example the value may
contain characters not specified in a "ValidCharList" command).
Example
StartPrompt "HostConnectMethod"
PromptText "SDLC or FRAD (S/F) ==> "
AnswerLength 1 1
ValidCharList "SF"
PromptOption "Upper"
InitialValue "S"
EndPrompt
ΓòÉΓòÉΓòÉ 4.15. PromptOption ΓòÉΓòÉΓòÉ
PromptOption
This command can be used to further specify how the users input should be
handled. This command is only valid between "StartPrompt" and "EndPrompt"
statements. This command can be used more than once per prompt.
Syntax
[whitespace]PromptOption [whitespace]"Option"[whitespace]
The "Option" parameter should be one of the following:
"Upper"
Lower case characters are converted to upper case.
"Lower"
Upper case characters are converted to lower case.
"Hidden"
On screen characters are replaced with '*'.
"AutoSkip"
Return when field is full (don't wait for <ENTER> key).
"Insert"
Start in insert mode and not overtype.
"~Esc~"
Escape on empty field returns "~Esc~" for cancel.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "WSN_BRANDID"
PromptText "WSN BRAND (I/C/D) ==> "
AnswerLength 1 1
ValidCharList "ICD"
PromptOption "Upper"
EndPrompt
ΓòÉΓòÉΓòÉ 4.16. PromptText ΓòÉΓòÉΓòÉ
PromptText
This command determines the text of the prompt that the user gets. This command
is only valid between "StartPrompt" and "EndPrompt" statements.
Syntax
[whitespace]PromptText [whitespace]"PromptText"[whitespace]
The "PromptText" parameter specifies the text to display.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "BSB"
PromptText "BSB ==> "
AnswerLength 4 4
ValidCharList "0123456789"
EndPrompt
ΓòÉΓòÉΓòÉ 4.17. StartPrompt ΓòÉΓòÉΓòÉ
StartPrompt
This command marks the start of a question that the user is required to answer.
The users input will be placed into a "#define" variable of the name specified.
Syntax
[whitespace]StartPrompt [whitespace]#defineName[whitespace]
The "#defineName" parameter specifies the name of the variable. To use within
a "StartTemplate" and "EndTemplate" block simply surround the variable name
with '{' & '}'.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "BSB"
PromptText "BSB ==> "
AnswerLength 4 4
ValidCharList "0123456789"
EndPrompt
;--- Ask Question -----------------------------------------------------------
StartPrompt "IMSC"
PromptText "CONTROLLER # ==> "
AnswerLength 1 1
ValidCharList "123456789ABCDEF"
PromptOption "Upper"
EndPrompt
StartTemplate "CM2.OUT"
***************************************************************************
* Variable Contents
* ~~~~~~~~ ~~~~~~~~
* BSB = "{BSB}"
* IMSC = "{IMSC}"
***************************************************************************
*
*
#include "CM2.RSP"
EndTemplate
ΓòÉΓòÉΓòÉ 4.18. StartTemplate ΓòÉΓòÉΓòÉ
StartTemplate
This command marks the start of an output file. All lines up until the
"EndTemplate" command are output to the indicated file. Its possible to
encounter some commands such as "#define" that should not be treated as
TEMPLATE.CMD commands, in this case surround the commands to be ignored with
"#hash" commands.
Syntax
[whitespace]StartTemplate [whitespace]FileBit[whitespace]
The "FileBit" parameter is appended to the "OutputBase" parameter specified on
the command line to build the complete name of the generated file.
Example
StartTemplate "CM2.OUT"
#include "CM2.RSP"
EndTemplate
ΓòÉΓòÉΓòÉ 4.19. StripAnswer ΓòÉΓòÉΓòÉ
StripAnswer
This command determines how the users answer to a prompt is processed (how
leading & trailing whitespace is handled). By default all leading & trailing
whitespace is removed.
If this command is used between "StartPrompt" and "EndPrompt" statements then
the command applies only to the current prompt, otherwise it applies to all
following prompts (as a default value).
Syntax
[whitespace]StripAnswer [whitespace]"RemoveWhat"[whitespace]
The "RemoveWhat" parameter determines what whitespace (if present) is removed,
possible values are:
1. "" or "OFF" - Don't remove any whitespace.
2. "Both" - Remove leading AND trailing whitespace.
3. "Leading" - Remove leading whitespace.
4. "Trailing" - Remove trailing whitespace.
Example
StripAnswer "Trailing"
ΓòÉΓòÉΓòÉ 4.20. ValidationRoutine ΓòÉΓòÉΓòÉ
ValidationRoutine
This command specifies a rexx script which should be called after the user
presses enter in reponse to a question (and the answer otherwise looks valid).
The routine is passed a single parameter which is the name of the variable (as
specified on the "StartPrompt" command). This or any other answer can be
retrieved as all answers are stored in the environment surrounded by "_"
characters.
The rexx validation code should return "OK" if the answer is acceptable. It
can create environment variables which can be accessed later on with the
"evaluate" command.
If this command is used between "StartPrompt" and "EndPrompt" statements then
the command applies only to the current prompt, otherwise it applies to all
following prompts (as a default value).
Syntax
[whitespace]ValidationRoutine [whitespace]"RexxProcName"[whitespace]
The "RexxProcName" parameter specifies the name of the rexx code to be executed
to validate users response.
Example
ValidationRoutine "VALTEST.CMD"
;--- 1st Prompt (only allowed to enter "1111") ------------------------------
StartPrompt "Var1"
PromptText "Prompt 1 ==> "
EndPrompt
Example - VALTEST.CMD
/****************************************************************************
*
* *******************************************************
* *** This routine is included in the ONLINE MANUAL. ***
* *******************************************************
*
* Example of validation function. This example handles all fields rather
* than a specific one. It also demonstrates how new variables can be created
* for use within the template.
*
* This routine ignores all variables apart from "Var1" & "Var2" and these
* fields must contain "1111" & "2222". If we are processing "Var2" then
* we will create a new variable which the caller can access.
*
* It is recommended that uninitialized variables and syntax errors be
* trapped (as is done in this example).
****************************************************************************/
/*--- Add trap handler for SYNTAX & NOVALUE errors --------------------------*/
signal on NOVALUE name RexxTrapUninitializedVariable;
signal on SYNTAX name RexxTrapSyntaxError;
/*--- Get variable details --------------------------------------------------*/
Variable = arg(1);
ItsValue = GetEnv('_' || Variable || '_');
/*--- Do validation ---------------------------------------------------------*/
select
/*+++++++++++++++++++++++++*/
when Variable = 'Var1' then
/*+++++++++++++++++++++++++*/
do
/*--- Validate Variable 1 --------------------------------------------*/
ValidValue = (ItsValue = '1111');
end;
/*+++++++++++++++++++++++++*/
when Variable = 'Var2' then
/*+++++++++++++++++++++++++*/
do
/*--- Validate Variable 2 --------------------------------------------*/
ValidValue = (ItsValue = '2222');
/*--- This is the last validation, create stuff for "TEMPLATE" to use ---*/
call SetEnv "Var3", GetEnv('_' || "VAR1" || '_') || '/' || GetEnv('_' || "VAR2" || '_');
end;
/*+++++++++++++++++++++++++*/
otherwise
/*+++++++++++++++++++++++++*/
ValidValue = 1;
end;
/*--- Return result of validation to caller ---------------------------------*/
if ValidValue <> 0 then
exit('OK'); /* Value in variable is OK */
else
exit('ERROR'); /* User must change value */
/*===========================================================================*/
GetEnv:
/* */
/* arg(1) : Name of environment variable. */
/*===========================================================================*/
return( value(arg(1),,'OS2ENVIRONMENT') );
/*===========================================================================*/
SetEnv:
/* */
/* arg(1) : Name of environment variable. */
/* arg(2) : New Value. */
/* */
/* Returns original value of the environment variable. */
/*===========================================================================*/
return( value(arg(1),arg(2),'OS2ENVIRONMENT') );
/*===========================================================================*/
CommonTrapHandler:
/* */
/* arg(1) = Failing Line */
/* arg(2) = Type of trap (heading to be underlined) */
/* arg(3) = Trap specific Title (text description) */
/* arg(4) = Trap specific Text */
/*===========================================================================*/
/*--- Work out some details based on passed info -------------------------*/
FailingLine = arg(1);
TrapHeading = 'BUG: ' || arg(2);
TextDescription = arg(3);
Text = arg(4);
/*--- Work out name of THIS rexx procedure -------------------------------*/
parse source . . SourceFileName;
/*--- Display details of the failing rexx code ---------------------------*/
say '';
say "
" || copies('=+', 39);
say TrapHeading;
say copies('~', length(TrapHeading));
say substr(TextDescription, 1 , 16) || ': ' || Text;
say 'Failing Module : ' || SourceFileName;
say 'Failing Line # : ' || FailingLine;
say 'Failing Command : ' || strip(SourceLine(FailingLine));
say copies('=+', 39) || "";
/*--- We won't let a failure in one subprocedure stop others working -----*/
exit(FailingLine);
/*===========================================================================*/
RexxTrapUninitializedVariable:
/*===========================================================================*/
/*--- Process the trap (it never returns) --------------------------------*/
call CommonTrapHandler SIGL, 'NoValue Abort!', 'Unknown Variable', condition('D');
/*===========================================================================*/
RexxTrapSyntaxError:
/*===========================================================================*/
/*--- Process the trap (it never returns) --------------------------------*/
call CommonTrapHandler SIGL, 'Syntax Error!', 'Reason', errortext(Rc);
ΓòÉΓòÉΓòÉ 4.21. ValidCharList ΓòÉΓòÉΓòÉ
ValidCharList
This command specifies an exhaustive list of all characters that may be entered
by the user. This command is only valid between "StartPrompt" and "EndPrompt"
statements.
Syntax
[whitespace]ValidCharList [whitespace]"AllChars"[whitespace]
The "AllChars" parameter specifies all valid characters that may be entered in
the users response to a prompt.
Example
;--- Ask Question -----------------------------------------------------------
StartPrompt "BSB"
PromptText "BSB ==> "
AnswerLength 4 4
ValidCharList "0123456789"
EndPrompt
ΓòÉΓòÉΓòÉ 5. Standard Variables ΓòÉΓòÉΓòÉ
Standard Variables
The following standard variables are available for subsitution into your
script:
${Template}
${ChangeTime}
${Version}
ΓòÉΓòÉΓòÉ 5.1. ${ChangeTime} ΓòÉΓòÉΓòÉ
${ChangeTime}
This is the current date/time and may change from use to use. If you wish a
constant value then one way would be to copy the current time using the
EVALUATE command.
ΓòÉΓòÉΓòÉ 5.2. ${Template} ΓòÉΓòÉΓòÉ
${Template}
This is the name of the input template file which was specified on the command
line.
ΓòÉΓòÉΓòÉ 5.3. ${Version} ΓòÉΓòÉΓòÉ
${Version}
This is the version number of this program. You can use this to make sure that
you are using a current version of the product. It has the form YY.DDD where
YY=Year and DDD=Day of Year.
ΓòÉΓòÉΓòÉ 6. Example ΓòÉΓòÉΓòÉ
The following examples are available:
1. Input Template
2. CM/2 Response file used by template
ΓòÉΓòÉΓòÉ 6.1. Example Template ΓòÉΓòÉΓòÉ
Example Template - ConfSvr.TEM
;--- Ask Question -----------------------------------------------------------
StartPrompt "BSB"
PromptText "BSB ==> "
AnswerLength 4 4
ValidCharList "0123456789"
EndPrompt
;--- Ask Question -----------------------------------------------------------
StartPrompt "IMSC"
PromptText "CONTROLLER # ==> "
AnswerLength 1 1
ValidCharList "123456789ABCDEF"
PromptOption "Upper"
EndPrompt
;--- Ask Question -----------------------------------------------------------
StartPrompt "WSN_BRANDID"
PromptText "WSN BRAND (I/C/D) ==> "
AnswerLength 1 1
ValidCharList "ICD"
PromptOption "Upper"
EndPrompt
;--- Ask Question -----------------------------------------------------------
StartPrompt "HostConnectMethod"
PromptText "SDLC or FRAD (S/F) ==> "
AnswerLength 1 1
ValidCharList "SF"
InitialValue "S"
PromptOption "Upper"
EndPrompt
#if '{HostConnectMethod}' = 'F'
#define SDLC 00
#elseif
;--- Ask Question ------------------------------------------------
StartPrompt "SDLC"
PromptText "POLL Address (2 Character Hex) ==> "
AnswerLength 2 2
ValidCharList "0123456789ABCDEF"
PromptOption "Upper"
EndPrompt
#endif
;--- Hard Code some answers for now -----------------------------------------
#define TandemLuName "MEL02"
#define TandemTpName "CSPDEVTP"
#define LocalCpNodeId "05D00001"
#define AdjCpName "A01M09"
#define NvdmPluName "A07NDM"
;--- Create output file(s) --------------------------------------------------
StartTemplate "CM2.OUT"
***************************************************************************
* Variable Contents
* ~~~~~~~~ ~~~~~~~~
* Standard: Template "${Template}"
* Standard: Version "${Version}"
* Standard: ChangeTime "${ChangeTime}"
*
* BSB = "{BSB}"
* IMSC = "{IMSC}"
* WSN_BRANDID = "{WSN_BRANDID}"
* HostConnectMethod = "{HostConnectMethod}"
* SDLC = "{SDLC}"
*
* TandemLuName = "{TandemLuName}"
* TandemTpName = "{TandemTpName}"
* LocalCpNodeId = "{LocalCpNodeId}"
* AdjCpName = "{AdjCpName}"
* NvdmPluName = "{NvdmPluName}"
***************************************************************************
#include "CM2.RSP"
EndTemplate
ΓòÉΓòÉΓòÉ 6.2. CM/2 Response file ΓòÉΓòÉΓòÉ
CM/2 Response File - CM2.RSP
*****************************************************************************
*
* A.N.Z. Bank Confidential
*
* MODULE NAME: CM2.RSP
*
* $Author: Dennis_Bareis $
* $Revision: 1.0 $
* $Date: 26 Jul 1998 10:44:12 $
* $Logfile: E:/DB/PVCS.IT/OS2/TEMPLATE/CM2.RSV $/template/CM2.rsv $
*
* DESCRIPTION: Sample Server configuration with SDLC or FRAD communications.
* Some lines removed to limit size of file.
*
*****************************************************************************
* Installation keywords:
CMUPDATETYPE = 4
CMUSERCFG = C:\CMLIB\BASCONF
CMTARGET = C:
CMINSTALLFOLDERS = 0
CMINSTALLSSM = 1
CMINSTALLKEYBDREMAP = 1
CMINSTALLROPS = 0
CMINSTALLPD = 1
CMINSTALLCOMMANDREFERENCE = 1
CMINSTALLMESSAGEREFERENCE = 1
CMINSTALLKEYLOCK = 1
CMINSTALLCONFIGDIALOG = 1
CMINSTALLOVERVIEW = 1
CMINSTALLGLOSSARY = 1
CMINSTALLPDGUIDE = 1
CMINSTALLANYNET = 0
CMINSTALLHOSTGRAPHICS = 0
CMINSTALLRESPONSEFILEREFERENCE = 0
CMINSTALLAPLFONT = 0
CMSERVER = 0
CMINSTALLUPM = 0
CONFIGSYSTEMMAXDUMPS = 32
CONFIGSYSTEMDUMPPATH = C:\OS2\SYSTEM\
CONFIGAPPLMAXDUMPS = 32
CONFIGAPPLDUMPPATH = C:\OS2\SYSTEM\
CONFIGMSGLOGNAME = C:\OS2\SYSTEM\OS2MLOG.DAT
CONFIGWSID = PRGWKSTN
CONFIGWSSERIAL1 = 00
CONFIGWSSERIAL2 = 00
CONFIGWSTYPE1 = 000
CONFIGWSTYPE2 = 000
CONFIGDISPLAYMSG = 0
CMWORKSTATIONTYPE = 1
LAN_DLC = (
NAME = 0
ADAPTER_TYPE = 2
MAX_LINK_STATION = 40
PER_INCOMING_CALLS = 0
FREE_LINK = 0
MAX_I_FIELD_SIZE = 01929
SEND_COUNT = 7
RECEIVE_COUNT = 7
CASM_LAN_ID = C{BSB}{IMSC}
SEND_ALERT = 0
LINK_ESTABLISHMENT_RETRANSMISSION = 8
MAX_ACTIVATION_ATTEMPTS = 0
LOCAL_SAP = 04
RETRANSMISSION_THRESHOLD = 8
)
#if '{HostConnectMethod}' <> 'F'
SDLC_DLC = (
NAME = 0
* COMMENT is either not used or not configured.
ISDN = 0
FREE_LINK = 0
MAX_I_FIELD_SIZE = 0521
SEND_COUNT = 7
RECEIVE_COUNT = 7
LINE_TYPE = 2
LINK_STATION_ROLE = 1
LINE_MODE = 1
NRZI = 0
MODEM_RATE = 1
DSR_TIMEOUT = 5
LOCAL_STATION_ADDRESS = {SDLC}
XID_REPOLL_COUNT = 10
NON_XID_REPOLL_COUNT = 7
ACCEPT_CALL = 0
* ISDN_INCOMING_DIR is either not used or not configured.
XID_IMMEDIATE_RESPONSE = 1
MAX_ACTIVATION_ATTEMPTS = 3
INACTIVITY_TIMEOUT = 000
LIMITED_RESOURCE_TIMEOUT = 30
)
#endif
WORKSTATION = (
COMMENT = Machine Defaults
LOAD_SNA_APPC = 1
LOAD_SRPI = 0
LOAD_X25_API = 0
LOAD_ACDI = 0
USE_ACDI_API = 0
USE_ARTIC_ADAPTER_WITHOUT_X25 = 0
USE_LAN_PROTOCOLS_USING_ISDN = 0
)
ATTACH_MANAGER = (
START = 1
)
CPIC_SIDE_INFO = (
NAME = CSSBW1
COMMENT = Background Side Info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
TP_NAME = CssTpBackground
MODE_NAME = CSSMODE
)
CPIC_SIDE_INFO = (
NAME = CSSFW1
COMMENT = Foreground Side Info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
TP_NAME = CssTpForeground
MODE_NAME = CSSMODE
)
CPIC_SIDE_INFO = (
NAME = CSSBW2
COMMENT = Background Side Info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}02
TP_NAME = CssTpBackground
MODE_NAME = CSSMODE
)
CPIC_SIDE_INFO = (
NAME = CSSFW2
COMMENT = Foreground Side Info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}02
TP_NAME = CssTpForeground
MODE_NAME = CSSMODE
)
CPIC_SIDE_INFO = (
NAME = CSSFHOST
COMMENT = Host foreground side info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
TP_NAME = CssTpForeground
MODE_NAME = CSSHMODE
)
CPIC_SIDE_INFO = (
NAME = CSSBHOST
COMMENT = Host background side info
FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
TP_NAME = CssTpBackground
MODE_NAME = CSSHMODE
)
CPIC_SIDE_INFO = (
NAME = CSPTANDM
COMMENT = TANDEM side info
FQ_PARTNER_LU_NAME = AUTHEZ01.{TandemLuName}
TP_NAME = {TandemTpName}
MODE_NAME = CSPMODE
)
GATEWAY_WORKSTATION = (
NAME = WKST0002,NULL
COMMENT = Created on 28-07-95 at 15:08
WORKSTATION_LU.1.NAME = W2LU2
WORKSTATION_LU.1.HOST_LINK_NAME = LINK0001
WORKSTATION_LU.1.NAU_ADDRESS_AT_WORKSTATION = 2
WORKSTATION_LU.1.NAU_ADDRESS_AT_HOST = 81
)
LOCAL_CP = (
NAME = AUTHEZ01.C{BSB}{IMSC}01
COMMENT = Control Point local node name
CP_ALIAS = C{BSB}{IMSC}01
HOST_FP_LINK_NAME = LINK0001
HOST_FP_SUPPORT = 1
NAU_ADDRESS = 0
NODE_ID = {LocalCpNodeId}
NODE_TYPE = 2
NW_FP_SUPPORT = 0
MAX_COMPRESSION_LEVEL = 0
MAX_COMPRESSION_TOKENS = 0
)
LOCAL_LU = (
NAME = Q{BSB}{IMSC}01
COMMENT = Local LU
LU_ALIAS = Q{BSB}{IMSC}01
NAU_ADDRESS = 0
)
#if '{HostConnectMethod}' <> 'F'
LOGICAL_LINK = (
NAME = LINK0001
COMMENT = *** SDLC Host Connection ***
DLC_NAME = SDLC
ACTIVATE_AT_STARTUP = 0
CP_CP_SESSION_SUPPORT = 0
ADAPTER_NUMBER = 0
ADJACENT_NODE_TYPE = 1
DESTINATION_ADDRESS = FF
INIT_WITH_SNRM = 0
ETHERNET_FORMAT = 0
FQ_ADJACENT_CP_NAME = AUTHEZ01.{AdjCpName}
EFFECTIVE_CAPACITY = -1
COST_PER_BYTE = -1
COST_PER_CONNECT_TIME = -1
PROPAGATION_DELAY = -1
SECURITY = -1
USER_DEFINED_1 = -1
USER_DEFINED_2 = -1
USER_DEFINED_3 = -1
LIMITED_RESOURCE = -1
SOLICIT_SSCP_SESSION = 1
MAX_ACTIVATION_ATTEMPTS = 0
USE_PUNAME_AS_CPNAME = 0
)
#elseif
LOGICAL_LINK = (
NAME = LINK0001
COMMENT = *** FRAD Host Connection ***
DLC_NAME = IBMTRNET
ACTIVATE_AT_STARTUP = 0
CP_CP_SESSION_SUPPORT = 1
ADAPTER_NUMBER = 0
ADJACENT_NODE_TYPE = 2
DESTINATION_ADDRESS = 4000{IMSC}{BSB}C00
INIT_WITH_SNRM = 0
ETHERNET_FORMAT = 0
FQ_ADJACENT_CP_NAME = AUTHEZ01.C{BSB}{IMSC}00
EFFECTIVE_CAPACITY = -1
COST_PER_BYTE = -1
COST_PER_CONNECT_TIME = -1
PROPAGATION_DELAY = -1
SECURITY = -1
USER_DEFINED_1 = -1
USER_DEFINED_2 = -1
USER_DEFINED_3 = -1
LIMITED_RESOURCE = -1
SOLICIT_SSCP_SESSION = 1
MAX_ACTIVATION_ATTEMPTS = 0
USE_PUNAME_AS_CPNAME = 0
)
#endif
LOGICAL_LINK = (
NAME = WKST0002
COMMENT = Gateway session for workstation 2
DLC_NAME = IBMTRNET
ACTIVATE_AT_STARTUP = 0
CP_CP_SESSION_SUPPORT = 1
ADAPTER_NUMBER = 0
ADJACENT_NODE_TYPE = 0
DESTINATION_ADDRESS = 4000{IMSC}{BSB}702
ETHERNET_FORMAT = 0
EFFECTIVE_CAPACITY = -1
COST_PER_BYTE = -1
COST_PER_CONNECT_TIME = -1
PROPAGATION_DELAY = -1
SECURITY = -1
USER_DEFINED_1 = -1
USER_DEFINED_2 = -1
USER_DEFINED_3 = -1
LIMITED_RESOURCE = -1
LINK_STATION_ROLE = -1
SOLICIT_SSCP_SESSION = 0
MAX_ACTIVATION_ATTEMPTS = 0
USE_PUNAME_AS_CPNAME = 0
)
LUA = (
NAME = EHCD110
COMMENT = UNSOLICITED MESSAGE SERVER
HOST_LINK_NAME = LINK0001
NAU_ADDRESS = 15
)
LUA = (
NAME = EHCW101
COMMENT = TBS90 Session for W1
HOST_LINK_NAME = LINK0001
NAU_ADDRESS = 16
)
LUA = (
NAME = EHCW201
COMMENT = TBS90 Session for W2
HOST_LINK_NAME = LINK0001
NAU_ADDRESS = 17
)
MODE = (
NAME = NDMLU62P
COMMENT = Filecreq Transmission Service Mode
COS_NAME = #CONNECT
DEFAULT_RU_SIZE = 1
MAX_NEGOTIABLE_SESSION_LIMIT = 32767
MIN_CONWINNERS_SOURCE = 0
PLU_MODE_SESSION_LIMIT = 1
RECEIVE_PACING_WINDOW = 7
COMPRESSION_NEED = 0
PLU_SLU_COMPRESSION = 0
SLU_PLU_COMPRESSION = 0
PACING_TYPE = 1
)
MODE = (
NAME = LU62
COMMENT = Lu 62 for Esanda
COS_NAME = #CONNECT
DEFAULT_RU_SIZE = 1
MAX_NEGOTIABLE_SESSION_LIMIT = 32767
MIN_CONWINNERS_SOURCE = 0
PLU_MODE_SESSION_LIMIT = 8
RECEIVE_PACING_WINDOW = 4
COMPRESSION_NEED = 0
PLU_SLU_COMPRESSION = 0
SLU_PLU_COMPRESSION = 0
PACING_TYPE = 1
)
MODE = (
NAME = CSSHMODE
COMMENT = Host Mode
COS_NAME = #INTER
DEFAULT_RU_SIZE = 1
MAX_NEGOTIABLE_SESSION_LIMIT = 32767
#if '{HostConnectMethod}' = 'F'
MIN_CONWINNERS_SOURCE = 0
PLU_MODE_SESSION_LIMIT = 1
#elseif
MIN_CONWINNERS_SOURCE = 4
PLU_MODE_SESSION_LIMIT = 8
#endif
RECEIVE_PACING_WINDOW = 4
COMPRESSION_NEED = 0
PLU_SLU_COMPRESSION = 0
SLU_PLU_COMPRESSION = 0
PACING_TYPE = 1
)
PARTNER_LU = (
NAME = AUTHEZ01.{NvdmPluName}
COMMENT = NVDM at Host
PARTNER_LU_ALIAS = {NvdmPluName}
PARTNER_LU_UNINTERPRETED_NAME = {NvdmPluName}
CONV_SECURITY_VERIFICATION = 0
MAX_MC_LL_SEND_SIZE = 32767
PARALLEL_SESSION_SUPPORT = 0
)
PARTNER_LU = (
NAME = AUTHEZ01.{TandemLuName}
COMMENT = Tandem via NVDM
PARTNER_LU_ALIAS = TANDEM
PARTNER_LU_UNINTERPRETED_NAME = {TandemLuName}
CONV_SECURITY_VERIFICATION = 0
MAX_MC_LL_SEND_SIZE = 32767
#if '{HostConnectMethod}' = 'F'
PARALLEL_SESSION_SUPPORT = 0
#elseif
PARALLEL_SESSION_SUPPORT = 1
#endif
)
#if '{HostConnectMethod}' <> 'F'
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.{NvdmPluName}
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.{TandemLuName}
COMMENT = Tandem via NVDM
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.Q
COMMENT = CSP Wildcard
WILDCARD_ENTRY = 2
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.A36DP410
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.A36DP400
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU016
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU017
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU019
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU020
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU021
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
PARTNER_LU_LOCATION = (
NAME = AUTHEZ01.AU015
COMMENT = Created by BATCH utility on 27-07-95 at 14:33
WILDCARD_ENTRY = 0
FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
LOCAL_NODE_NN_SERVER = 1
)
#endif
SNA_DEFAULTS = (
COMMENT = APPN Defaults
DEFAULT_TP_CONV_SECURITY_RQD = 0
DEFAULT_TP_OPERATION = 0
DEFAULT_TP_PROGRAM_TYPE = 0
DIRECTORY_FOR_INBOUND_ATTACHES = *
IMPLICIT_INBOUND_PLU_SUPPORT = 1
DEFAULT_MODE_NAME = NDMLU62P
DEFAULT_LOCAL_LU_ALIAS = Q{BSB}{IMSC}01
MAX_HELD_ALERTS = 10
MAX_MC_LL_SEND_SIZE = 32767
)