The use of variables when a specific format needed.

greenspun.com : LUSENET : Tool Command Language (Tcl) : One Thread

I am attempting to modify some of my projects current tcl scripts. I am atempting to insert variables so that we can put the code under source control where it requestingthe information that we currently insert when running a test. in the following code example I am attempting to insert a variable but I keep getting an error back of a syntax error.

## According to the email received from vertel testCategoryInformation can be ## defined as a type TestCategoryInformation which was of type ## AdditionalInformation, which is a SET OF ManagementExtension. ## ManagementExtension contains the ANY DEFINED BY field to carry the parameter. ## Hence redifining testCategoryInformation to be type TestCategoryInformation, ## rather than type PotsTestRequest.

## set testRequestUncontrolledActionInfo {{ ## testCategoryInformation 4,

puts "Enter Account Name.

ATT-CTR ATT-ESP M02 MCI MCILSR Sprint SprintLSR U99 X99 \n" gets stdin ch

puts "You entered the Account Name of $ch.\n"

puts " Enter the Telephone number to be tested. (i.e. NPANNX####)\n"

gets stdin tn

puts "You entered the Telephone Number of $tn to be tested.\n"

puts "Enter the appropriate number for the level of the POTS Test Request being issued.

Full = 1 Quick = 2 Central Office = 3 Loop = 4 \n"

gets stdin int

puts " The level number of the POTS Test Request you entered was $int."

set testRequestUncontrolledActionInfo {{ testCategoryInformation {{ identifier T1262:potsUncontrolledTestRequest, information STF.PotsTestRequest {"$int"} ## this is where the POTs test designation number would be located without any brackets or quotes. }}, toBeTestedMORTs normalForm: { distinguishedName : { {{ dnattributeId M3100:networkId, dnattributeValue ASN1DefinedTypesModule.NameType gStrinG:"U S WEST" }}, {{ dnattributeId T1227:accountName, dnattributeValue ASN1DefinedTypesModule.NameType gStrinG:"$ch" ## this is where the account name should be within the double quotes. }}, {{ dnattributeId T1214:serviceID, dnattributeValue GNM.NameType pStrinG: "$tn" ## this is where the complete telephone number would be including area code within the double quotes. }} } }

I would appreciate any assistance this matter.

-- David Hinrichs (dhinric@uswest.com), November 01, 2000

Answers

What is the error you get?

-- Larry W. Virden (lvirden@cas.org), December 02, 2000.

Moderation questions? read the FAQ