IBM Support

How to use SetEmail() in Perl script which uses Rational ClearQuest API

Question & Answer


Question

How do you use SetEmail() in a Perl script which uses IBM Rational ClearQuest API?

Cause

SetEmail() does not write correct email id while being used in a Perl script and ClearQuest APIs.

Example: If you use the below API in your script:

S
etEmail("testuser@test.com");

The user email id will be printed as "testuser.com" in Rational ClearQuest User Administration tool.

Answer

Perl considers @variablename as an array. In the scenario mentioned above Perl considers @test as an array.

In order to be able to print the complete email id you would need to prefix \ to @ character when using SetEmail() API as shown below:

SetEmail("testuser\@test.com")

The User Email id will be printed as "testuser@test.com" in Rational ClearQuest User Administration tool.

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"API","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.1.2;7.1.2.5;7.1.2.6","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21643281