home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / tem98233.zip / TEMPLATE.INF (.txt) < prev   
OS/2 Help File  |  1998-07-26  |  37KB  |  1,487 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. Introduction 
  5.  
  6. This document covers the TEMPLATE.CMD command which can be used to create 
  7. output files based on a template. 
  8.  
  9. The template can extract information from the environment (environment 
  10. variables etc), and can also prompt user for information.  Data from user can 
  11. be validated both with standard validations and custom validation code that the 
  12. template supplies. 
  13.  
  14. The TEMPLATE.CMD command supports decision making with commands such as "#if" 
  15. and supports #define & #include commands. 
  16.  
  17. If you have any suggestions or if you find any bugs I'd appreciate you 
  18. contacting me by email (db0@anz.com). 
  19.  
  20. Regina 
  21.  
  22. Regina is a  free rexx interpreter which allows this program to run under DOS 
  23. and Windows 95 or Windows NT. 
  24.  
  25. Currently when running under regina there are these known limitations: 
  26.  
  27.        1. Unless running under OS/2 you will not be able to use ANSI colors for 
  28.           "pretty" command prompts. 
  29.  
  30.        2. The prompt where you enter your data is not very good as its that 
  31.           provided by the operating system. 
  32.  
  33.        3. Can't set initial values in prompts. 
  34.  
  35.        4. A lot of the inbuild validations and case conversions etc do not 
  36.           work.  You will need to do your own validation routines (not hard) to 
  37.           perform validations and ensuring values are upper case etc. 
  38.  
  39.  Note that the "CURSORT.EXE" is an OS/2 program only.  Its not used under 
  40.  Regina. 
  41.  
  42.  Whether I improve this or not depends on feedback, so far I haven't had any at 
  43.  all...  So I concentrate my efforts where it benefits me most. 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ 2. TEMPLATE.CMD Command Line ΓòÉΓòÉΓòÉ
  47.  
  48. TEMPLATE.CMD Command Line 
  49.  
  50.         TEMPLATE[.CMD]  TemplateFileName  OutputBase
  51.  
  52. The "TemplateFileName" names the template file which determines the questions 
  53. the user is asked and what output files are generated.  This parameter can be 
  54. accessed from your script via the "${Template}" variable.  An example is 
  55. available. 
  56.  
  57. Whenever a "StartTemplate" command is encountered the text attached is appended 
  58. to the "OutputBase" parameter.  In general you would probably specify the 
  59. output directory here and the filename on the "StartTemplate" command. 
  60.  
  61.  
  62. ΓòÉΓòÉΓòÉ 3. General Syntax ΓòÉΓòÉΓòÉ
  63.  
  64. SYNTAX 
  65.  
  66. This section describes the basic syntax of the template file. 
  67.  
  68. Unless within a "StartTemplate" and "EndTemplate" block all leading (& 
  69. trailing) whitespace on a line is ignored. 
  70.  
  71. Unless within a "StartTemplate" and "EndTemplate" block all lines beginning 
  72. with ";" are comment lines and are ignored.  If a line contains ";;" then the 
  73. line is truncated immediately after the last whitespace prior to the inline 
  74. comment.  Note that you may need to use ";;" in a line, in this case add an 
  75. inline comment to the end of the line as everything after the last ";;" is 
  76. removed! 
  77.  
  78. Unless within a "StartTemplate" and "EndTemplate" block a line which only 
  79. contains spaces or is empty (blank) is treated as a comment and is ignored. 
  80.  
  81. Template commands are not case sensitive, for example you could use any of the 
  82. following: 
  83.  
  84.          StartTemplate 
  85.          STARTTEMPLATE 
  86.          starttemplate 
  87.  
  88.  QUOTED TEXT 
  89.  
  90.  Many commands require quoted text, the only thing special about the quotes in 
  91.  this program are that they can be almost any character (anything 
  92.  non-alphanumeric), the only restriction are as follows: 
  93.  
  94.        1. The same quote character must appear at the start and end of the 
  95.           text. 
  96.        2. If another parameter follows then there must be at least one space 
  97.           after the end quote character. 
  98.  
  99.  QUOTED TEXT EXAMPLES 
  100.  
  101.  The following are examples of valid quoted strings: 
  102.  
  103.          "A string" 
  104.          'Another string' 
  105.          ^A 'string' which contains "quotes"^ 
  106.          ΓûêABCΓûê 
  107.  
  108.  
  109. ΓòÉΓòÉΓòÉ 4. Commands ΓòÉΓòÉΓòÉ
  110.  
  111. AVAILABLE COMMANDS 
  112.  
  113. The following commands are related to user prompting: 
  114.  
  115.          StartPrompt 
  116.          EndPrompt 
  117.          AnswerLength 
  118.          PromptOption 
  119.          PromptText 
  120.          ValidCharList 
  121.          InitialValue 
  122.          StripAnswer 
  123.          BeforePrompt 
  124.          AfterPrompt 
  125.          ValidationRoutine 
  126.  
  127.  The following commands are related to template handling: 
  128.  
  129.          StartTemplate 
  130.          EndTemplate 
  131.  
  132.  The following commands are are used to set internal variables which will be 
  133.  replaced in any future source lines (textual replacement): 
  134.  
  135.          #define 
  136.          Evaluate 
  137.  
  138.  The following commands allow you to execute parts of your template 
  139.  conditionally (for example to selectivly ask user questions based on 
  140.  previously selected information): 
  141.  
  142.          #if 
  143.          #elseif 
  144.          #endif 
  145.  
  146.  Other Commands: 
  147.  
  148.          #hash 
  149.          #include 
  150.          DEBUG 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 4.1. #define ΓòÉΓòÉΓòÉ
  154.  
  155. #define 
  156.  
  157. A #define can be used to define a value (constant) once and then refer to it 
  158. elsewhere.  It allows you to update one place and have all necessary change 
  159. flow though to all the statements that refer to it.  Another possible use would 
  160. be to "pass" parameters to a common piece of code which is included a number of 
  161. times in your script. 
  162.  
  163. You can redefine the contents of a variable if you wish later on in the script. 
  164.  
  165. To use your #define'd variable simply enclose it with "{" and "}", the line 
  166. will be modified before its executed. 
  167.  
  168. Syntax 
  169.  
  170.         [whitespace]#define Variable [whitespace]"Contents"[whitespace]
  171.  
  172. The "Variable" is to be defined and whenever seen in following lines will be 
  173. replaced by the Contents. 
  174.  
  175. The "EVALUATE" command performs a similar function however it executes rexx 
  176. commands and/or your scripts to determine what the value is. 
  177.  
  178. Example 
  179.  
  180. ;--- Ask Question -----------------------------------------------------------
  181. StartPrompt    "HostConnectMethod"
  182.                PromptText        "SDLC or FRAD (S/F) ==> "
  183.                AnswerLength      1      1
  184.                ValidCharList     "SF"
  185.                PromptOption      "Upper"
  186. EndPrompt
  187. #if        '{HostConnectMethod}' = 'F'
  188.            #define  SDLC           00
  189. #elseif
  190.            ;--- Ask Question ------------------------------------------------
  191.            StartPrompt    "SDLC"
  192.                            PromptText        "POLL Address (2 Character Hex) ==> "
  193.                            AnswerLength      2      2
  194.                            ValidCharList     "0123456789ABCDEF"
  195.                            PromptOption      "Upper"
  196.            EndPrompt
  197. #endif
  198.  
  199.  
  200. ΓòÉΓòÉΓòÉ 4.2. #elseif ΓòÉΓòÉΓòÉ
  201.  
  202. #elseif 
  203.  
  204. This command is used if you wish to have some lines included when the #if 
  205. condition is false. 
  206.  
  207.  
  208. ΓòÉΓòÉΓòÉ 4.3. #endif ΓòÉΓòÉΓòÉ
  209.  
  210. #endif 
  211.  
  212. This command is used to terminate a previous #if command.  There should be a 
  213. matching #endif for every #if command. 
  214.  
  215.  
  216. ΓòÉΓòÉΓòÉ 4.4. #hash ΓòÉΓòÉΓòÉ
  217.  
  218. #hash 
  219.  
  220. A #hash is used to change all following commands that begin with a '#' in this 
  221. document to use a different character as specified.  The main use of this 
  222. command would tend to be to remove clashes with lines within "StartTemplate" & 
  223. "EndTemplate" commands (for example if "#include" is found is this a Template 
  224. command or should it be output as is into the generated output). 
  225.  
  226. Syntax 
  227.  
  228.         [whitespace]#hash [whitespace]"NewHash"[whitespace]
  229.  
  230. The "NewHash" variable specifies what following template commands should be 
  231. preceeded by. 
  232.  
  233. Example 
  234.  
  235. #define VAR1     "Var1 Contents"
  236. #hash   "!"
  237. !define VAR2     "Var2 Contents"
  238. !hash   "#"
  239. #define VAR3     "Var3 Contents"
  240.  
  241.  
  242. ΓòÉΓòÉΓòÉ 4.5. #if ΓòÉΓòÉΓòÉ
  243.  
  244. #if 
  245.  
  246. A #if can be used to conditionally include lines of text, this can be any other 
  247. type of line or command except #elseif or #endif. 
  248.  
  249. #if commands can be nested to any level and there need not be any lines between 
  250. a #if and a #endif or #elseif command. 
  251.  
  252. Syntax 
  253.  
  254.         [whitespace]#if [whitespace]"ValidRexxCondition"[whitespace]
  255.  
  256. The "ValidRexxCondition" specifies a valid rexx conditional test which results 
  257. in a TRUE or FALSE answer.  The condition may be as complex as you wish and may 
  258. include the special GetEnv() function to obtain information from the 
  259. environment. 
  260.  
  261. Example 
  262.  
  263. ;--- Ask Question -----------------------------------------------------------
  264. StartPrompt    "HostConnectMethod"
  265.                PromptText        "SDLC or FRAD (S/F) ==> "
  266.                AnswerLength      1      1
  267.                ValidCharList     "SF"
  268.                PromptOption      "Upper"
  269. EndPrompt
  270. #if        '{HostConnectMethod}' = 'F'
  271.            #define  SDLC           00
  272. #elseif
  273.            ;--- Ask Question ------------------------------------------------
  274.            StartPrompt    "SDLC"
  275.                            PromptText        "POLL Address (2 Character Hex) ==> "
  276.                            AnswerLength      2      2
  277.                            ValidCharList     "0123456789ABCDEF"
  278.                            PromptOption      "Upper"
  279.            EndPrompt
  280. #endif
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ 4.6. #include ΓòÉΓòÉΓòÉ
  284.  
  285. #include 
  286.  
  287. A #include can be used to include another file for processing. This allows you 
  288. to split a very large complicated script into smaller easier to understand 
  289. components or reuse a long sequence of lines "passing" parameters to the 
  290. included file via a "#define" or "evaluate" command. 
  291.  
  292. Syntax 
  293.  
  294.         [whitespace]#include [whitespace]"FileName$"[whitespace]
  295.  
  296. The "FileName" specifies the file to be included. 
  297.  
  298. Example 
  299.  
  300. #include "CM2.RSP"
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 4.7. AfterPrompt ΓòÉΓòÉΓòÉ
  304.  
  305. AfterPrompt 
  306.  
  307. The intention of this command is to allow the user to change the color of the 
  308. text that the user enters (the answer).  One would normally only include ANSI 
  309. codes which are otherwise invisible. 
  310.  
  311. If this command is used between "StartPrompt" and "EndPrompt" statements then 
  312. the command applies only to the current prompt, otherwise it applies to all 
  313. following prompts (as a default value). 
  314.  
  315. Syntax 
  316.  
  317.         [whitespace]AfterPrompt [whitespace]"AnsiCodes"[whitespace]
  318.  
  319. The "AnsiCodes" parameter is output to the screen immediately after the prompt 
  320. text (specified on the "PromptText" command). 
  321.  
  322. Example 
  323.  
  324. ;--- Specify colors to be used when asking questions ------------------------
  325. BeforePrompt      ""
  326. AfterPrompt       ""
  327.  
  328. ;--- 1st Prompt -------------------------------------------------------------
  329. StartPrompt    "Var1"
  330.                PromptText        "Prompt 1 ==> "
  331. EndPrompt
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 4.8. AnswerLength ΓòÉΓòÉΓòÉ
  335.  
  336. AnswerLength 
  337.  
  338. This command can be used to limit the length of a users response and to specify 
  339. a minimum number of characters that must be entered.  If the command is not 
  340. used then there is no minimum (empty answer is OK) and the maximum response is 
  341. 79 characters less the length of the prompt specified on the "PromptText" 
  342. command. This command is only valid between "StartPrompt" and "EndPrompt" 
  343. statements. 
  344.  
  345. Syntax 
  346.  
  347.         [whitespace]AnswerLength [whitespace]Minimum [whitespace]Maximum[whitespace]
  348.  
  349. The "Minimum" & "Maximum" parameters specifies the length of the answer. 
  350.  
  351. Example 
  352.  
  353. ;--- Ask Question -----------------------------------------------------------
  354. StartPrompt    "BSB"
  355.                PromptText        "BSB ==> "
  356.                AnswerLength      4      4
  357.                ValidCharList     "0123456789"
  358. EndPrompt
  359.  
  360.  
  361. ΓòÉΓòÉΓòÉ 4.9. BeforePrompt ΓòÉΓòÉΓòÉ
  362.  
  363. BeforePrompt 
  364.  
  365. The intention of this command is to allow the user to change the color of the 
  366. text that the user is prompted with.  One would normally only include ANSI 
  367. codes which are otherwise invisible. 
  368.  
  369. If this command is used between "StartPrompt" and "EndPrompt" statements then 
  370. the command applies only to the current prompt, otherwise it applies to all 
  371. following prompts (as a default value). 
  372.  
  373. Syntax 
  374.  
  375.         [whitespace]BeforePrompt [whitespace]"AnsiCodes"[whitespace]
  376.  
  377. The "AnsiCodes" parameter is output to the screen just prior to the prompt text 
  378. (specified on the "PromptText" command). 
  379.  
  380. Example 
  381.  
  382. ;--- Specify colors to be used when asking questions ------------------------
  383. BeforePrompt      ""
  384. AfterPrompt       ""
  385.  
  386. ;--- 1st Prompt -------------------------------------------------------------
  387. StartPrompt    "Var1"
  388.                PromptText        "Prompt 1 ==> "
  389. EndPrompt
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 4.10. DEBUG ΓòÉΓòÉΓòÉ
  393.  
  394. DEBUG 
  395.  
  396. This command is useful if your template is not doing what you expect it to. 
  397. Fairly basic support as yet.... 
  398.  
  399. Syntax 
  400.  
  401.         [whitespace]Debug[whitespace]
  402.  
  403. This command does not take any parameters. 
  404.  
  405.  
  406. ΓòÉΓòÉΓòÉ 4.11. EndPrompt ΓòÉΓòÉΓòÉ
  407.  
  408. EndPrompt 
  409.  
  410. This command marks the end of a prompt block that began with the "StartPrompt" 
  411. command.  The user will be immediately prompted for the answer. 
  412.  
  413. Syntax 
  414.  
  415.         [whitespace]EndPrompt[whitespace]
  416.  
  417. This command does not take any parameters. 
  418.  
  419.  
  420. ΓòÉΓòÉΓòÉ 4.12. EndTemplate ΓòÉΓòÉΓòÉ
  421.  
  422. EndTemplate 
  423.  
  424. This command marks the end of a template block that began with the 
  425. "StartTemplate" command. 
  426.  
  427. Syntax 
  428.  
  429.         [whitespace]EndTemplate[whitespace]
  430.  
  431. This command does not take any parameters. 
  432.  
  433.  
  434. ΓòÉΓòÉΓòÉ 4.13. Evaluate ΓòÉΓòÉΓòÉ
  435.  
  436. EVALUATE 
  437.  
  438. This command performs a similar function to the #define command in that the 
  439. result is stored and is used if the variable name is enclosed with "{" & "}". 
  440.  
  441. You would use this command (over #define) for one of the following main 
  442. reasons: 
  443.  
  444.        1. You wish to get some some data from rexx. 
  445.  
  446.        2. You wish to perform arithmetic or other similar operation. 
  447.  
  448.        3. You wish to get some information out of the environment. 
  449.  
  450.  The evaluate command will handle syntax errors and unknown variables (it will 
  451.  die in these situations). 
  452.  
  453.  Syntax 
  454.  
  455.           [whitespace]EVALUATE [whitespace]"Variable" [whitespace]["Expression"][whitespace]
  456.  
  457.  The "Variable" parameter is the name of the #define variable you wish created 
  458.  or updated.  Note that it is possible to execute a rexx command which does not 
  459.  directly return a result that can be assigned via a "=" sign if the variable 
  460.  parameter is blank. 
  461.  
  462.  The "Expression" parameter is executed by rexx and the result assigned to a 
  463.  variable (Variable = Expression).  If its not supplied then its assumed you 
  464.  wish to get the value of a rexx variable with the same name.  The expression 
  465.  currently supports the "GetEnv()" function. 
  466.  
  467.  EXAMPLE 
  468.  
  469.   evaluate Path             "GetEnv('PATH')"
  470.   evaluate 'Answer'         "(5 + 6) * 11"
  471.  
  472.  
  473. ΓòÉΓòÉΓòÉ 4.14. InitialValue ΓòÉΓòÉΓòÉ
  474.  
  475. InitialValue 
  476.  
  477. This command specified the initial answer for the prompt the user gets.  If 
  478. this command is not used the initial answer is empty.  This command is only 
  479. valid between "StartPrompt" and "EndPrompt" statements. 
  480.  
  481. Syntax 
  482.  
  483.         [whitespace]InitialValue [whitespace]"StartingValue"[whitespace]
  484.  
  485. The "StartingValue" parameter is the initial value for the users response. 
  486. Note that the value is not validated in any way (for example the value may 
  487. contain characters not specified in a "ValidCharList" command). 
  488.  
  489. Example 
  490.  
  491. StartPrompt    "HostConnectMethod"
  492.                PromptText        "SDLC or FRAD (S/F) ==> "
  493.                AnswerLength      1      1
  494.                ValidCharList     "SF"
  495.                PromptOption      "Upper"
  496.                InitialValue      "S"
  497. EndPrompt
  498.  
  499.  
  500. ΓòÉΓòÉΓòÉ 4.15. PromptOption ΓòÉΓòÉΓòÉ
  501.  
  502. PromptOption 
  503.  
  504. This command can be used to further specify how the users input should be 
  505. handled.  This command is only valid between "StartPrompt" and "EndPrompt" 
  506. statements.  This command can be used more than once per prompt. 
  507.  
  508. Syntax 
  509.  
  510.         [whitespace]PromptOption [whitespace]"Option"[whitespace]
  511.  
  512. The "Option" parameter should be one of the following: 
  513.  
  514.          "Upper" 
  515.           Lower case characters are converted to upper case. 
  516.  
  517.          "Lower" 
  518.           Upper case characters are converted to lower case. 
  519.  
  520.          "Hidden" 
  521.           On screen characters are replaced with '*'. 
  522.  
  523.          "AutoSkip" 
  524.           Return when field is full (don't wait for <ENTER> key). 
  525.  
  526.          "Insert" 
  527.           Start in insert mode and not overtype. 
  528.  
  529.          "~Esc~" 
  530.           Escape on empty field returns "~Esc~" for cancel. 
  531.  
  532.  Example 
  533.  
  534.   ;--- Ask Question -----------------------------------------------------------
  535.   StartPrompt    "WSN_BRANDID"
  536.                  PromptText        "WSN BRAND (I/C/D) ==> "
  537.                  AnswerLength      1      1
  538.                  ValidCharList     "ICD"
  539.                  PromptOption      "Upper"
  540.   EndPrompt
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ 4.16. PromptText ΓòÉΓòÉΓòÉ
  544.  
  545. PromptText 
  546.  
  547. This command determines the text of the prompt that the user gets. This command 
  548. is only valid between "StartPrompt" and "EndPrompt" statements. 
  549.  
  550. Syntax 
  551.  
  552.         [whitespace]PromptText [whitespace]"PromptText"[whitespace]
  553.  
  554. The "PromptText" parameter specifies the text to display. 
  555.  
  556. Example 
  557.  
  558. ;--- Ask Question -----------------------------------------------------------
  559. StartPrompt    "BSB"
  560.                PromptText        "BSB ==> "
  561.                AnswerLength      4      4
  562.                ValidCharList     "0123456789"
  563. EndPrompt
  564.  
  565.  
  566. ΓòÉΓòÉΓòÉ 4.17. StartPrompt ΓòÉΓòÉΓòÉ
  567.  
  568. StartPrompt 
  569.  
  570. This command marks the start of a question that the user is required to answer. 
  571. The users input will be placed into a "#define" variable of the name specified. 
  572.  
  573. Syntax 
  574.  
  575.         [whitespace]StartPrompt [whitespace]#defineName[whitespace]
  576.  
  577. The "#defineName" parameter specifies the name of the variable.  To use within 
  578. a "StartTemplate" and "EndTemplate" block simply surround the variable name 
  579. with '{' & '}'. 
  580.  
  581. Example 
  582.  
  583. ;--- Ask Question -----------------------------------------------------------
  584. StartPrompt    "BSB"
  585.                PromptText        "BSB ==> "
  586.                AnswerLength      4      4
  587.                ValidCharList     "0123456789"
  588. EndPrompt
  589.  
  590. ;--- Ask Question -----------------------------------------------------------
  591. StartPrompt    "IMSC"
  592.                PromptText        "CONTROLLER # ==> "
  593.                AnswerLength      1      1
  594.                ValidCharList     "123456789ABCDEF"
  595.                PromptOption      "Upper"
  596. EndPrompt
  597.  
  598. StartTemplate  "CM2.OUT"
  599. ***************************************************************************
  600. *  Variable                Contents
  601. *  ~~~~~~~~                ~~~~~~~~
  602. *  BSB                   = "{BSB}"
  603. *  IMSC                  = "{IMSC}"
  604. ***************************************************************************
  605. *
  606. *
  607.                #include "CM2.RSP"
  608. EndTemplate
  609.  
  610.  
  611. ΓòÉΓòÉΓòÉ 4.18. StartTemplate ΓòÉΓòÉΓòÉ
  612.  
  613. StartTemplate 
  614.  
  615. This command marks the start of an output file.  All lines up until the 
  616. "EndTemplate" command are output to the indicated file. Its possible to 
  617. encounter some commands such as "#define" that should not be treated as 
  618. TEMPLATE.CMD commands, in this case surround the commands to be ignored with 
  619. "#hash" commands. 
  620.  
  621. Syntax 
  622.  
  623.         [whitespace]StartTemplate [whitespace]FileBit[whitespace]
  624.  
  625. The "FileBit" parameter is appended to the "OutputBase" parameter specified on 
  626. the command line to build the complete name of the generated file. 
  627.  
  628. Example 
  629.  
  630. StartTemplate  "CM2.OUT"
  631.                #include "CM2.RSP"
  632. EndTemplate
  633.  
  634.  
  635. ΓòÉΓòÉΓòÉ 4.19. StripAnswer ΓòÉΓòÉΓòÉ
  636.  
  637. StripAnswer 
  638.  
  639. This command determines how the users answer to a prompt is processed (how 
  640. leading & trailing whitespace is handled).  By default all leading & trailing 
  641. whitespace is removed. 
  642.  
  643. If this command is used between "StartPrompt" and "EndPrompt" statements then 
  644. the command applies only to the current prompt, otherwise it applies to all 
  645. following prompts (as a default value). 
  646.  
  647. Syntax 
  648.  
  649.         [whitespace]StripAnswer [whitespace]"RemoveWhat"[whitespace]
  650.  
  651. The "RemoveWhat" parameter determines what whitespace (if present) is removed, 
  652. possible values are: 
  653.  
  654.        1. "" or "OFF" - Don't remove any whitespace. 
  655.  
  656.        2. "Both" - Remove leading AND trailing whitespace. 
  657.  
  658.        3. "Leading" - Remove leading whitespace. 
  659.  
  660.        4. "Trailing" - Remove trailing whitespace. 
  661.  
  662.  Example 
  663.  
  664.   StripAnswer "Trailing"
  665.  
  666.  
  667. ΓòÉΓòÉΓòÉ 4.20. ValidationRoutine ΓòÉΓòÉΓòÉ
  668.  
  669. ValidationRoutine 
  670.  
  671. This command specifies a rexx script which should be called after the user 
  672. presses enter in reponse to a question (and the answer otherwise looks valid). 
  673. The routine is passed a single parameter which is the name of the variable (as 
  674. specified on the "StartPrompt" command).  This or any other answer can be 
  675. retrieved as all answers are stored in the environment surrounded by "_" 
  676. characters. 
  677.  
  678. The rexx validation code should return "OK" if the answer is acceptable.  It 
  679. can create environment variables which can be accessed later on with the 
  680. "evaluate" command. 
  681.  
  682. If this command is used between "StartPrompt" and "EndPrompt" statements then 
  683. the command applies only to the current prompt, otherwise it applies to all 
  684. following prompts (as a default value). 
  685.  
  686. Syntax 
  687.  
  688.         [whitespace]ValidationRoutine [whitespace]"RexxProcName"[whitespace]
  689.  
  690. The "RexxProcName" parameter specifies the name of the rexx code to be executed 
  691. to validate users response. 
  692.  
  693. Example 
  694.  
  695. ValidationRoutine "VALTEST.CMD"
  696.  
  697. ;--- 1st Prompt (only allowed to enter "1111") ------------------------------
  698. StartPrompt    "Var1"
  699.                PromptText        "Prompt 1 ==> "
  700. EndPrompt
  701.  
  702. Example - VALTEST.CMD 
  703.  
  704. /****************************************************************************
  705. *
  706. *        *******************************************************
  707. *        ***  This routine is included in the ONLINE MANUAL. ***
  708. *        *******************************************************
  709. *
  710. * Example of validation function.  This example handles all fields rather
  711. * than a specific one. It also demonstrates how new variables can be created
  712. * for use within the template.
  713. *
  714. * This routine ignores all variables apart from "Var1" & "Var2" and these
  715. * fields must contain "1111" & "2222".  If we are processing "Var2" then
  716. * we will create a new variable which the caller can access.
  717. *
  718. * It is recommended that uninitialized variables and syntax errors be
  719. * trapped (as is done in this example).
  720. ****************************************************************************/
  721.  
  722. /*--- Add trap handler for SYNTAX & NOVALUE errors --------------------------*/
  723. signal on NOVALUE name RexxTrapUninitializedVariable;
  724. signal on SYNTAX  name RexxTrapSyntaxError;
  725.  
  726. /*--- Get variable details --------------------------------------------------*/
  727. Variable = arg(1);
  728. ItsValue = GetEnv('_' || Variable || '_');
  729.  
  730. /*--- Do validation ---------------------------------------------------------*/
  731. select
  732.    /*+++++++++++++++++++++++++*/
  733.    when Variable = 'Var1' then
  734.    /*+++++++++++++++++++++++++*/
  735.    do
  736.        /*--- Validate Variable 1 --------------------------------------------*/
  737.        ValidValue = (ItsValue = '1111');
  738.    end;
  739.    /*+++++++++++++++++++++++++*/
  740.    when Variable = 'Var2' then
  741.    /*+++++++++++++++++++++++++*/
  742.    do
  743.        /*--- Validate Variable 2 --------------------------------------------*/
  744.        ValidValue = (ItsValue = '2222');
  745.  
  746.        /*--- This is the last validation, create stuff for "TEMPLATE" to use ---*/
  747.        call SetEnv "Var3", GetEnv('_' || "VAR1" || '_') || '/' || GetEnv('_' || "VAR2" || '_');
  748.    end;
  749.    /*+++++++++++++++++++++++++*/
  750.    otherwise
  751.    /*+++++++++++++++++++++++++*/
  752.        ValidValue = 1;
  753. end;
  754.  
  755. /*--- Return result of validation to caller ---------------------------------*/
  756. if ValidValue <> 0 then
  757.    exit('OK');                                    /* Value in variable is OK */
  758. else
  759.    exit('ERROR');                                  /* User must change value */
  760.  
  761.  
  762.  
  763. /*===========================================================================*/
  764. GetEnv:
  765. /*                                                                           */
  766. /* arg(1) : Name of environment variable.                                    */
  767. /*===========================================================================*/
  768.    return( value(arg(1),,'OS2ENVIRONMENT') );
  769.  
  770.  
  771.  
  772. /*===========================================================================*/
  773. SetEnv:
  774. /*                                                                           */
  775. /* arg(1) : Name of environment variable.                                    */
  776. /* arg(2) : New Value.                                                       */
  777. /*                                                                           */
  778. /* Returns original value of the environment variable.                       */
  779. /*===========================================================================*/
  780.    return( value(arg(1),arg(2),'OS2ENVIRONMENT') );
  781.  
  782.  
  783.  
  784. /*===========================================================================*/
  785. CommonTrapHandler:
  786. /*                                                                           */
  787. /* arg(1) = Failing Line                                                     */
  788. /* arg(2) = Type of trap (heading to be underlined)                          */
  789. /* arg(3) = Trap specific Title  (text description)                          */
  790. /* arg(4) = Trap specific Text                                               */
  791. /*===========================================================================*/
  792.    /*--- Work out some details based on passed info -------------------------*/
  793.    FailingLine     = arg(1);
  794.    TrapHeading     = 'BUG: ' || arg(2);
  795.    TextDescription = arg(3);
  796.    Text            = arg(4);
  797.  
  798.    /*--- Work out name of THIS rexx procedure -------------------------------*/
  799.    parse source . . SourceFileName;
  800.  
  801.    /*--- Display details of the failing rexx code ---------------------------*/
  802.    say '';
  803.    say "" || copies('=+', 39);
  804.    say TrapHeading;
  805.    say copies('~', length(TrapHeading));
  806.    say substr(TextDescription, 1 , 16) || ': ' || Text;
  807.    say 'Failing Module  : ' || SourceFileName;
  808.    say 'Failing Line #  : ' || FailingLine;
  809.    say 'Failing Command : ' || strip(SourceLine(FailingLine));
  810.    say copies('=+', 39) || "";
  811.  
  812.    /*--- We won't let a failure in one subprocedure stop others working -----*/
  813.    exit(FailingLine);
  814.  
  815.  
  816. /*===========================================================================*/
  817. RexxTrapUninitializedVariable:
  818. /*===========================================================================*/
  819.    /*--- Process the trap (it never returns) --------------------------------*/
  820.    call CommonTrapHandler SIGL, 'NoValue Abort!', 'Unknown Variable', condition('D');
  821.  
  822. /*===========================================================================*/
  823. RexxTrapSyntaxError:
  824. /*===========================================================================*/
  825.    /*--- Process the trap (it never returns) --------------------------------*/
  826.    call CommonTrapHandler SIGL, 'Syntax Error!', 'Reason', errortext(Rc);
  827.  
  828.  
  829. ΓòÉΓòÉΓòÉ 4.21. ValidCharList ΓòÉΓòÉΓòÉ
  830.  
  831. ValidCharList 
  832.  
  833. This command specifies an exhaustive list of all characters that may be entered 
  834. by the user. This command is only valid between "StartPrompt" and "EndPrompt" 
  835. statements. 
  836.  
  837. Syntax 
  838.  
  839.         [whitespace]ValidCharList [whitespace]"AllChars"[whitespace]
  840.  
  841. The "AllChars" parameter specifies all valid characters that may be entered in 
  842. the users response to a prompt. 
  843.  
  844. Example 
  845.  
  846. ;--- Ask Question -----------------------------------------------------------
  847. StartPrompt    "BSB"
  848.                PromptText        "BSB ==> "
  849.                AnswerLength      4      4
  850.                ValidCharList     "0123456789"
  851. EndPrompt
  852.  
  853.  
  854. ΓòÉΓòÉΓòÉ 5. Standard Variables ΓòÉΓòÉΓòÉ
  855.  
  856. Standard Variables 
  857.  
  858. The following standard variables are available for subsitution into your 
  859. script: 
  860.  
  861.          ${Template} 
  862.          ${ChangeTime} 
  863.          ${Version} 
  864.  
  865.  
  866. ΓòÉΓòÉΓòÉ 5.1. ${ChangeTime} ΓòÉΓòÉΓòÉ
  867.  
  868. ${ChangeTime} 
  869.  
  870. This is the current date/time and may change from use to use.  If you wish a 
  871. constant value then one way would be to copy the current time using the 
  872. EVALUATE command. 
  873.  
  874.  
  875. ΓòÉΓòÉΓòÉ 5.2. ${Template} ΓòÉΓòÉΓòÉ
  876.  
  877. ${Template} 
  878.  
  879. This is the name of the input template file which was specified on the command 
  880. line. 
  881.  
  882.  
  883. ΓòÉΓòÉΓòÉ 5.3. ${Version} ΓòÉΓòÉΓòÉ
  884.  
  885. ${Version} 
  886.  
  887. This is the version number of this program.  You can use this to make sure that 
  888. you are using a current version of the product.  It has the form YY.DDD where 
  889. YY=Year and DDD=Day of Year. 
  890.  
  891.  
  892. ΓòÉΓòÉΓòÉ 6. Example ΓòÉΓòÉΓòÉ
  893.  
  894. The following examples are available: 
  895.  
  896.        1. Input Template 
  897.        2. CM/2 Response file used by template 
  898.  
  899.  
  900. ΓòÉΓòÉΓòÉ 6.1. Example Template ΓòÉΓòÉΓòÉ
  901.  
  902. Example Template - ConfSvr.TEM 
  903.  
  904. ;--- Ask Question -----------------------------------------------------------
  905. StartPrompt    "BSB"
  906.                PromptText        "BSB ==> "
  907.                AnswerLength      4      4
  908.                ValidCharList     "0123456789"
  909. EndPrompt
  910.  
  911. ;--- Ask Question -----------------------------------------------------------
  912. StartPrompt    "IMSC"
  913.                PromptText        "CONTROLLER # ==> "
  914.                AnswerLength      1      1
  915.                ValidCharList     "123456789ABCDEF"
  916.                PromptOption      "Upper"
  917. EndPrompt
  918.  
  919. ;--- Ask Question -----------------------------------------------------------
  920. StartPrompt    "WSN_BRANDID"
  921.                PromptText        "WSN BRAND (I/C/D) ==> "
  922.                AnswerLength      1      1
  923.                ValidCharList     "ICD"
  924.                PromptOption      "Upper"
  925. EndPrompt
  926.  
  927. ;--- Ask Question -----------------------------------------------------------
  928. StartPrompt    "HostConnectMethod"
  929.                PromptText        "SDLC or FRAD (S/F) ==> "
  930.                AnswerLength      1      1
  931.                ValidCharList     "SF"
  932.                InitialValue      "S"
  933.                PromptOption      "Upper"
  934. EndPrompt
  935. #if        '{HostConnectMethod}' = 'F'
  936.            #define  SDLC           00
  937. #elseif
  938.            ;--- Ask Question ------------------------------------------------
  939.            StartPrompt    "SDLC"
  940.                            PromptText        "POLL Address (2 Character Hex) ==> "
  941.                            AnswerLength      2      2
  942.                            ValidCharList     "0123456789ABCDEF"
  943.                            PromptOption      "Upper"
  944.            EndPrompt
  945. #endif
  946.  
  947. ;--- Hard Code some answers for now -----------------------------------------
  948. #define    TandemLuName         "MEL02"
  949. #define    TandemTpName         "CSPDEVTP"
  950. #define    LocalCpNodeId        "05D00001"
  951. #define    AdjCpName            "A01M09"
  952. #define    NvdmPluName          "A07NDM"
  953.  
  954.  
  955. ;--- Create output file(s) --------------------------------------------------
  956. StartTemplate  "CM2.OUT"
  957. ***************************************************************************
  958. *  Variable                Contents
  959. *  ~~~~~~~~                ~~~~~~~~
  960. *  Standard: Template      "${Template}"
  961. *  Standard: Version       "${Version}"
  962. *  Standard: ChangeTime    "${ChangeTime}"
  963. *
  964. *  BSB                   = "{BSB}"
  965. *  IMSC                  = "{IMSC}"
  966. *  WSN_BRANDID           = "{WSN_BRANDID}"
  967. *  HostConnectMethod     = "{HostConnectMethod}"
  968. *  SDLC                  = "{SDLC}"
  969. *
  970. *  TandemLuName          = "{TandemLuName}"
  971. *  TandemTpName          = "{TandemTpName}"
  972. *  LocalCpNodeId         = "{LocalCpNodeId}"
  973. *  AdjCpName             = "{AdjCpName}"
  974. *  NvdmPluName           = "{NvdmPluName}"
  975. ***************************************************************************
  976.  
  977.  
  978.                #include "CM2.RSP"
  979. EndTemplate
  980.  
  981.  
  982. ΓòÉΓòÉΓòÉ 6.2. CM/2 Response file ΓòÉΓòÉΓòÉ
  983.  
  984. CM/2 Response File - CM2.RSP 
  985.  
  986. *****************************************************************************
  987. *
  988. *                   A.N.Z. Bank Confidential
  989. *
  990. *    MODULE NAME:   CM2.RSP
  991. *
  992. *        $Author:   Dennis_Bareis  $
  993. *      $Revision:   1.0  $
  994. *          $Date:   26 Jul 1998 10:44:12  $
  995. *       $Logfile:   E:/DB/PVCS.IT/OS2/TEMPLATE/CM2.RSV  $/template/CM2.rsv  $
  996. *
  997. *    DESCRIPTION:   Sample Server configuration with SDLC or FRAD communications.
  998. *                   Some lines removed to limit size of file.
  999. *
  1000. *****************************************************************************
  1001.  
  1002.  
  1003.  
  1004. * Installation keywords:
  1005.  
  1006.      CMUPDATETYPE = 4
  1007.      CMUSERCFG = C:\CMLIB\BASCONF
  1008.      CMTARGET = C:
  1009.      CMINSTALLFOLDERS = 0
  1010.      CMINSTALLSSM = 1
  1011.      CMINSTALLKEYBDREMAP = 1
  1012.      CMINSTALLROPS = 0
  1013.      CMINSTALLPD = 1
  1014.      CMINSTALLCOMMANDREFERENCE = 1
  1015.      CMINSTALLMESSAGEREFERENCE = 1
  1016.      CMINSTALLKEYLOCK = 1
  1017.      CMINSTALLCONFIGDIALOG = 1
  1018.      CMINSTALLOVERVIEW = 1
  1019.      CMINSTALLGLOSSARY = 1
  1020.      CMINSTALLPDGUIDE = 1
  1021.      CMINSTALLANYNET = 0
  1022.      CMINSTALLHOSTGRAPHICS = 0
  1023.      CMINSTALLRESPONSEFILEREFERENCE = 0
  1024.      CMINSTALLAPLFONT = 0
  1025.      CMSERVER = 0
  1026.      CMINSTALLUPM = 0
  1027.      CONFIGSYSTEMMAXDUMPS = 32
  1028.      CONFIGSYSTEMDUMPPATH = C:\OS2\SYSTEM\
  1029.      CONFIGAPPLMAXDUMPS = 32
  1030.      CONFIGAPPLDUMPPATH = C:\OS2\SYSTEM\
  1031.      CONFIGMSGLOGNAME = C:\OS2\SYSTEM\OS2MLOG.DAT
  1032.      CONFIGWSID = PRGWKSTN
  1033.      CONFIGWSSERIAL1 = 00
  1034.      CONFIGWSSERIAL2 = 00
  1035.      CONFIGWSTYPE1 = 000
  1036.      CONFIGWSTYPE2 = 000
  1037.      CONFIGDISPLAYMSG = 0
  1038.      CMWORKSTATIONTYPE = 1
  1039.  
  1040.  
  1041.  
  1042.  
  1043. LAN_DLC = (
  1044.      NAME = 0
  1045.      ADAPTER_TYPE = 2
  1046.      MAX_LINK_STATION = 40
  1047.      PER_INCOMING_CALLS = 0
  1048.      FREE_LINK = 0
  1049.      MAX_I_FIELD_SIZE = 01929
  1050.      SEND_COUNT = 7
  1051.      RECEIVE_COUNT = 7
  1052.      CASM_LAN_ID = C{BSB}{IMSC}
  1053.      SEND_ALERT = 0
  1054.      LINK_ESTABLISHMENT_RETRANSMISSION = 8
  1055.      MAX_ACTIVATION_ATTEMPTS = 0
  1056.      LOCAL_SAP = 04
  1057.      RETRANSMISSION_THRESHOLD = 8
  1058. )
  1059.  
  1060. #if    '{HostConnectMethod}' <> 'F'
  1061.        SDLC_DLC = (
  1062.                        NAME = 0
  1063.                      * COMMENT is either not used or not configured.
  1064.                        ISDN = 0
  1065.                        FREE_LINK = 0
  1066.                        MAX_I_FIELD_SIZE = 0521
  1067.                        SEND_COUNT = 7
  1068.                        RECEIVE_COUNT = 7
  1069.                        LINE_TYPE = 2
  1070.                        LINK_STATION_ROLE = 1
  1071.                        LINE_MODE = 1
  1072.                        NRZI = 0
  1073.                        MODEM_RATE = 1
  1074.                        DSR_TIMEOUT = 5
  1075.                        LOCAL_STATION_ADDRESS = {SDLC}
  1076.                        XID_REPOLL_COUNT = 10
  1077.                        NON_XID_REPOLL_COUNT = 7
  1078.                        ACCEPT_CALL = 0
  1079.                      * ISDN_INCOMING_DIR is either not used or not configured.
  1080.                        XID_IMMEDIATE_RESPONSE = 1
  1081.                        MAX_ACTIVATION_ATTEMPTS = 3
  1082.                        INACTIVITY_TIMEOUT = 000
  1083.                        LIMITED_RESOURCE_TIMEOUT = 30
  1084.                   )
  1085. #endif
  1086.  
  1087.  
  1088. WORKSTATION = (
  1089.      COMMENT = Machine Defaults
  1090.      LOAD_SNA_APPC = 1
  1091.      LOAD_SRPI = 0
  1092.      LOAD_X25_API = 0
  1093.      LOAD_ACDI = 0
  1094.      USE_ACDI_API = 0
  1095.      USE_ARTIC_ADAPTER_WITHOUT_X25 = 0
  1096.      USE_LAN_PROTOCOLS_USING_ISDN = 0
  1097. )
  1098.  
  1099.  
  1100.  
  1101. ATTACH_MANAGER = (
  1102.      START = 1
  1103. )
  1104.  
  1105.  
  1106.  
  1107. CPIC_SIDE_INFO = (
  1108.      NAME = CSSBW1
  1109.      COMMENT = Background Side Info
  1110.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
  1111.      TP_NAME = CssTpBackground
  1112.      MODE_NAME = CSSMODE
  1113. )
  1114.  
  1115. CPIC_SIDE_INFO = (
  1116.      NAME = CSSFW1
  1117.      COMMENT = Foreground Side Info
  1118.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
  1119.      TP_NAME = CssTpForeground
  1120.      MODE_NAME = CSSMODE
  1121. )
  1122.  
  1123. CPIC_SIDE_INFO = (
  1124.      NAME = CSSBW2
  1125.      COMMENT = Background Side Info
  1126.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}02
  1127.      TP_NAME = CssTpBackground
  1128.      MODE_NAME = CSSMODE
  1129. )
  1130.  
  1131. CPIC_SIDE_INFO = (
  1132.      NAME = CSSFW2
  1133.      COMMENT = Foreground Side Info
  1134.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}02
  1135.      TP_NAME = CssTpForeground
  1136.      MODE_NAME = CSSMODE
  1137. )
  1138.  
  1139.  
  1140. CPIC_SIDE_INFO = (
  1141.      NAME = CSSFHOST
  1142.      COMMENT = Host foreground side info
  1143.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
  1144.      TP_NAME = CssTpForeground
  1145.      MODE_NAME = CSSHMODE
  1146. )
  1147.  
  1148. CPIC_SIDE_INFO = (
  1149.      NAME = CSSBHOST
  1150.      COMMENT = Host background side info
  1151.      FQ_PARTNER_LU_NAME = AUTHEZ01.Q{BSB}{IMSC}01
  1152.      TP_NAME = CssTpBackground
  1153.      MODE_NAME = CSSHMODE
  1154. )
  1155.  
  1156. CPIC_SIDE_INFO = (
  1157.      NAME = CSPTANDM
  1158.      COMMENT = TANDEM side info
  1159.      FQ_PARTNER_LU_NAME = AUTHEZ01.{TandemLuName}
  1160.      TP_NAME = {TandemTpName}
  1161.      MODE_NAME = CSPMODE
  1162. )
  1163.  
  1164.  
  1165. GATEWAY_WORKSTATION = (
  1166.      NAME = WKST0002,NULL
  1167.      COMMENT = Created on 28-07-95 at 15:08
  1168.      WORKSTATION_LU.1.NAME = W2LU2
  1169.      WORKSTATION_LU.1.HOST_LINK_NAME = LINK0001
  1170.      WORKSTATION_LU.1.NAU_ADDRESS_AT_WORKSTATION = 2
  1171.      WORKSTATION_LU.1.NAU_ADDRESS_AT_HOST = 81
  1172. )
  1173.  
  1174.  
  1175.  
  1176. LOCAL_CP = (
  1177.      NAME = AUTHEZ01.C{BSB}{IMSC}01
  1178.      COMMENT = Control Point local node name
  1179.      CP_ALIAS = C{BSB}{IMSC}01
  1180.      HOST_FP_LINK_NAME = LINK0001
  1181.      HOST_FP_SUPPORT = 1
  1182.      NAU_ADDRESS = 0
  1183.      NODE_ID = {LocalCpNodeId}
  1184.      NODE_TYPE = 2
  1185.      NW_FP_SUPPORT = 0
  1186.      MAX_COMPRESSION_LEVEL = 0
  1187.      MAX_COMPRESSION_TOKENS = 0
  1188. )
  1189.  
  1190. LOCAL_LU = (
  1191.      NAME = Q{BSB}{IMSC}01
  1192.      COMMENT = Local LU
  1193.      LU_ALIAS = Q{BSB}{IMSC}01
  1194.      NAU_ADDRESS = 0
  1195. )
  1196.  
  1197.  
  1198. #if    '{HostConnectMethod}' <> 'F'
  1199.        LOGICAL_LINK = (
  1200.                            NAME = LINK0001
  1201.                            COMMENT = *** SDLC Host Connection ***
  1202.                            DLC_NAME = SDLC
  1203.                            ACTIVATE_AT_STARTUP = 0
  1204.                            CP_CP_SESSION_SUPPORT = 0
  1205.                            ADAPTER_NUMBER = 0
  1206.                            ADJACENT_NODE_TYPE = 1
  1207.                            DESTINATION_ADDRESS = FF
  1208.                            INIT_WITH_SNRM = 0
  1209.                            ETHERNET_FORMAT = 0
  1210.                            FQ_ADJACENT_CP_NAME = AUTHEZ01.{AdjCpName}
  1211.                            EFFECTIVE_CAPACITY = -1
  1212.                            COST_PER_BYTE = -1
  1213.                            COST_PER_CONNECT_TIME = -1
  1214.                            PROPAGATION_DELAY = -1
  1215.                            SECURITY = -1
  1216.                            USER_DEFINED_1 = -1
  1217.                            USER_DEFINED_2 = -1
  1218.                            USER_DEFINED_3 = -1
  1219.                            LIMITED_RESOURCE = -1
  1220.                            SOLICIT_SSCP_SESSION = 1
  1221.                            MAX_ACTIVATION_ATTEMPTS = 0
  1222.                            USE_PUNAME_AS_CPNAME = 0
  1223.                       )
  1224. #elseif
  1225.        LOGICAL_LINK = (
  1226.                            NAME = LINK0001
  1227.                            COMMENT = *** FRAD Host Connection ***
  1228.                            DLC_NAME = IBMTRNET
  1229.                            ACTIVATE_AT_STARTUP = 0
  1230.                            CP_CP_SESSION_SUPPORT = 1
  1231.                            ADAPTER_NUMBER = 0
  1232.                            ADJACENT_NODE_TYPE = 2
  1233.                            DESTINATION_ADDRESS = 4000{IMSC}{BSB}C00
  1234.                            INIT_WITH_SNRM = 0
  1235.                            ETHERNET_FORMAT = 0
  1236.                            FQ_ADJACENT_CP_NAME = AUTHEZ01.C{BSB}{IMSC}00
  1237.                            EFFECTIVE_CAPACITY = -1
  1238.                            COST_PER_BYTE = -1
  1239.                            COST_PER_CONNECT_TIME = -1
  1240.                            PROPAGATION_DELAY = -1
  1241.                            SECURITY = -1
  1242.                            USER_DEFINED_1 = -1
  1243.                            USER_DEFINED_2 = -1
  1244.                            USER_DEFINED_3 = -1
  1245.                            LIMITED_RESOURCE = -1
  1246.                            SOLICIT_SSCP_SESSION = 1
  1247.                            MAX_ACTIVATION_ATTEMPTS = 0
  1248.                            USE_PUNAME_AS_CPNAME = 0
  1249.                       )
  1250. #endif
  1251.  
  1252.  
  1253. LOGICAL_LINK = (
  1254.      NAME = WKST0002
  1255.      COMMENT = Gateway session for workstation 2
  1256.      DLC_NAME = IBMTRNET
  1257.      ACTIVATE_AT_STARTUP = 0
  1258.      CP_CP_SESSION_SUPPORT = 1
  1259.      ADAPTER_NUMBER = 0
  1260.      ADJACENT_NODE_TYPE = 0
  1261.      DESTINATION_ADDRESS = 4000{IMSC}{BSB}702
  1262.      ETHERNET_FORMAT = 0
  1263.      EFFECTIVE_CAPACITY = -1
  1264.      COST_PER_BYTE = -1
  1265.      COST_PER_CONNECT_TIME = -1
  1266.      PROPAGATION_DELAY = -1
  1267.      SECURITY = -1
  1268.      USER_DEFINED_1 = -1
  1269.      USER_DEFINED_2 = -1
  1270.      USER_DEFINED_3 = -1
  1271.      LIMITED_RESOURCE = -1
  1272.      LINK_STATION_ROLE = -1
  1273.      SOLICIT_SSCP_SESSION = 0
  1274.      MAX_ACTIVATION_ATTEMPTS = 0
  1275.      USE_PUNAME_AS_CPNAME = 0
  1276. )
  1277.  
  1278.  
  1279. LUA = (
  1280.      NAME = EHCD110
  1281.      COMMENT = UNSOLICITED MESSAGE SERVER
  1282.      HOST_LINK_NAME = LINK0001
  1283.      NAU_ADDRESS = 15
  1284. )
  1285.  
  1286. LUA = (
  1287.      NAME = EHCW101
  1288.      COMMENT = TBS90 Session for W1
  1289.      HOST_LINK_NAME = LINK0001
  1290.      NAU_ADDRESS = 16
  1291. )
  1292.  
  1293. LUA = (
  1294.      NAME = EHCW201
  1295.      COMMENT = TBS90 Session for W2
  1296.      HOST_LINK_NAME = LINK0001
  1297.      NAU_ADDRESS = 17
  1298. )
  1299.  
  1300.  
  1301.  
  1302.  
  1303. MODE = (
  1304.      NAME = NDMLU62P
  1305.      COMMENT = Filecreq Transmission Service Mode
  1306.      COS_NAME = #CONNECT
  1307.      DEFAULT_RU_SIZE = 1
  1308.      MAX_NEGOTIABLE_SESSION_LIMIT = 32767
  1309.      MIN_CONWINNERS_SOURCE = 0
  1310.      PLU_MODE_SESSION_LIMIT = 1
  1311.      RECEIVE_PACING_WINDOW = 7
  1312.      COMPRESSION_NEED = 0
  1313.      PLU_SLU_COMPRESSION = 0
  1314.      SLU_PLU_COMPRESSION = 0
  1315.      PACING_TYPE = 1
  1316. )
  1317.  
  1318. MODE = (
  1319.      NAME = LU62
  1320.      COMMENT = Lu 62 for Esanda
  1321.      COS_NAME = #CONNECT
  1322.      DEFAULT_RU_SIZE = 1
  1323.      MAX_NEGOTIABLE_SESSION_LIMIT = 32767
  1324.      MIN_CONWINNERS_SOURCE = 0
  1325.      PLU_MODE_SESSION_LIMIT = 8
  1326.      RECEIVE_PACING_WINDOW = 4
  1327.      COMPRESSION_NEED = 0
  1328.      PLU_SLU_COMPRESSION = 0
  1329.      SLU_PLU_COMPRESSION = 0
  1330.      PACING_TYPE = 1
  1331. )
  1332.  
  1333. MODE = (
  1334.      NAME = CSSHMODE
  1335.      COMMENT = Host Mode
  1336.      COS_NAME = #INTER
  1337.      DEFAULT_RU_SIZE = 1
  1338.      MAX_NEGOTIABLE_SESSION_LIMIT = 32767
  1339.      #if   '{HostConnectMethod}' = 'F'
  1340.            MIN_CONWINNERS_SOURCE = 0
  1341.            PLU_MODE_SESSION_LIMIT = 1
  1342.      #elseif
  1343.            MIN_CONWINNERS_SOURCE = 4
  1344.            PLU_MODE_SESSION_LIMIT = 8
  1345.      #endif
  1346.      RECEIVE_PACING_WINDOW = 4
  1347.      COMPRESSION_NEED = 0
  1348.      PLU_SLU_COMPRESSION = 0
  1349.      SLU_PLU_COMPRESSION = 0
  1350.      PACING_TYPE = 1
  1351. )
  1352.  
  1353.  
  1354. PARTNER_LU = (
  1355.      NAME = AUTHEZ01.{NvdmPluName}
  1356.      COMMENT = NVDM at Host
  1357.      PARTNER_LU_ALIAS = {NvdmPluName}
  1358.      PARTNER_LU_UNINTERPRETED_NAME = {NvdmPluName}
  1359.      CONV_SECURITY_VERIFICATION = 0
  1360.      MAX_MC_LL_SEND_SIZE = 32767
  1361.      PARALLEL_SESSION_SUPPORT = 0
  1362. )
  1363.  
  1364. PARTNER_LU = (
  1365.      NAME = AUTHEZ01.{TandemLuName}
  1366.      COMMENT = Tandem via NVDM
  1367.      PARTNER_LU_ALIAS = TANDEM
  1368.      PARTNER_LU_UNINTERPRETED_NAME = {TandemLuName}
  1369.      CONV_SECURITY_VERIFICATION = 0
  1370.      MAX_MC_LL_SEND_SIZE = 32767
  1371.      #if   '{HostConnectMethod}' = 'F'
  1372.            PARALLEL_SESSION_SUPPORT = 0
  1373.      #elseif
  1374.            PARALLEL_SESSION_SUPPORT = 1
  1375.      #endif
  1376. )
  1377.  
  1378.  
  1379.  
  1380. #if    '{HostConnectMethod}' <> 'F'
  1381.        PARTNER_LU_LOCATION = (
  1382.            NAME = AUTHEZ01.{NvdmPluName}
  1383.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1384.            WILDCARD_ENTRY = 0
  1385.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1386.            LOCAL_NODE_NN_SERVER = 1
  1387.        )
  1388.  
  1389.        PARTNER_LU_LOCATION = (
  1390.            NAME = AUTHEZ01.{TandemLuName}
  1391.            COMMENT = Tandem via NVDM
  1392.            WILDCARD_ENTRY = 0
  1393.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1394.            LOCAL_NODE_NN_SERVER = 1
  1395.        )
  1396.  
  1397.        PARTNER_LU_LOCATION = (
  1398.            NAME = AUTHEZ01.Q
  1399.            COMMENT = CSP Wildcard
  1400.            WILDCARD_ENTRY = 2
  1401.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1402.            LOCAL_NODE_NN_SERVER = 1
  1403.        )
  1404.  
  1405.        PARTNER_LU_LOCATION = (
  1406.            NAME = AUTHEZ01.A36DP410
  1407.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1408.            WILDCARD_ENTRY = 0
  1409.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1410.            LOCAL_NODE_NN_SERVER = 1
  1411.        )
  1412.  
  1413.        PARTNER_LU_LOCATION = (
  1414.            NAME = AUTHEZ01.A36DP400
  1415.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1416.            WILDCARD_ENTRY = 0
  1417.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1418.            LOCAL_NODE_NN_SERVER = 1
  1419.        )
  1420.  
  1421.        PARTNER_LU_LOCATION = (
  1422.            NAME = AUTHEZ01.AU016
  1423.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1424.            WILDCARD_ENTRY = 0
  1425.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1426.            LOCAL_NODE_NN_SERVER = 1
  1427.        )
  1428.  
  1429.        PARTNER_LU_LOCATION = (
  1430.            NAME = AUTHEZ01.AU017
  1431.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1432.            WILDCARD_ENTRY = 0
  1433.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1434.            LOCAL_NODE_NN_SERVER = 1
  1435.        )
  1436.  
  1437.        PARTNER_LU_LOCATION = (
  1438.            NAME = AUTHEZ01.AU019
  1439.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1440.            WILDCARD_ENTRY = 0
  1441.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1442.            LOCAL_NODE_NN_SERVER = 1
  1443.        )
  1444.  
  1445.        PARTNER_LU_LOCATION = (
  1446.            NAME = AUTHEZ01.AU020
  1447.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1448.            WILDCARD_ENTRY = 0
  1449.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1450.            LOCAL_NODE_NN_SERVER = 1
  1451.        )
  1452.  
  1453.        PARTNER_LU_LOCATION = (
  1454.            NAME = AUTHEZ01.AU021
  1455.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1456.            WILDCARD_ENTRY = 0
  1457.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1458.            LOCAL_NODE_NN_SERVER = 1
  1459.        )
  1460.  
  1461.        PARTNER_LU_LOCATION = (
  1462.            NAME = AUTHEZ01.AU015
  1463.            COMMENT = Created by BATCH utility on 27-07-95 at 14:33
  1464.            WILDCARD_ENTRY = 0
  1465.            FQ_OWNING_CP_NAME = AUTHEZ01.{AdjCpName}
  1466.            LOCAL_NODE_NN_SERVER = 1
  1467.        )
  1468. #endif
  1469.  
  1470.  
  1471. SNA_DEFAULTS = (
  1472.      COMMENT = APPN Defaults
  1473.      DEFAULT_TP_CONV_SECURITY_RQD = 0
  1474.      DEFAULT_TP_OPERATION = 0
  1475.      DEFAULT_TP_PROGRAM_TYPE = 0
  1476.      DIRECTORY_FOR_INBOUND_ATTACHES = *
  1477.      IMPLICIT_INBOUND_PLU_SUPPORT = 1
  1478.      DEFAULT_MODE_NAME = NDMLU62P
  1479.      DEFAULT_LOCAL_LU_ALIAS = Q{BSB}{IMSC}01
  1480.      MAX_HELD_ALERTS = 10
  1481.      MAX_MC_LL_SEND_SIZE = 32767
  1482. )
  1483.  
  1484.  
  1485.  
  1486.  
  1487.