cpheader

Adds and removes data code page header information to and from exported workspace items (queries, charts, reports, report formats) and form files created by using the original Rational ClearQuest Designer.

Synopsis

cqperl cpheader.pl -a [ file-path | [ directory-path { regular-expression } ] ] code-page
cqperl cpheader.pl -s [ file-path | [ directory-path { regular-expression } ] ]

Description

Starting in version 7.1.1.0, IBM Rational ClearQuest adds header information to exported workspace items and to form files created by using the original ClearQuest Designer. The header contains information about the data code page of the ClearQuest database that the files are exported from. The header ensures that the exported files are imported correctly into other ClearQuest databases that might use a different code page.

In ClearQuest versions earlier than 7.1.1.0, exported workspace items and form files do not have a code page header.

If you are using a mix of pre-and-post version 7.1.1.0 ClearQuest clients and you want to export or import the workspace items and form files by using different pre-and-post version 7.1.1.0 ClearQuest clients, use the cpheader command to add and remove code page headers to enable cross-version client compatibility. This allows the exported files to be converted into the proper format for import by a ClearQuest client at a different version than the client that exported the files.

Use the cpheader command to migrate the workspace items and form files created by using the original ClearQuest Designer into a ClearQuest database with a UTF-8 (8-bit Unicode Transformation Format) code page. By using this command, you prevent importing workspace items and form files into a ClearQuest database that does not match the code page of the exported files and thus prevent data corruption. UTF-8 supports characters from all code pages, so you can import all code pages into a database that supports the UTF-8 code page.

Attention: The ClearQuest Eclipse Designer exports forms into XML format, which contains code page information. Do not use the cpheader command against forms exported from the ClearQuest Eclipse Designer.

Options and arguments

-a
Add the data code page header to the specified file or files in the specified directory and its subdirectories.
-s
Remove the data code page header from the specified file or files in the specified directory and its subdirectories.
file-path
Path specification of the file to which to add or remove the code page header.
directory-path { regular-expression }
Path specification of the directory containing the files to which to add or remove the code page header. If you specify a regular-expression, then the code page header is added to or removed from only the files in the directory and its subdirectories with a name that matches the regular-expression. If you do not specify a regular expression, then the code page header is added to or removed from all the files in the directory and its subdirectories.
code-page
Rational ClearQuest data code page.

Examples

  • Add the header for the Western European data code page 1252 to the file c:/all_defects.qry:
    cqperl cpheader.pl -a c:/all_defects.qry 1252
  • Add the header for the Simplified Chinese data code page 936 to all files in the directory c:/queries and its subdirectories:
    cqperl cpheader.pl -a c:/queries 936
  • Add the header for the Simplified Chinese data code page 936 to all files in the directory c:/queries and its subdirectories matched by the expression .cfg$:
    cqperl cpheader.pl -a c:/queries .cfg$ 936
  • Remove the code page header from the file c:/alldefect.qry:
    cqperl cpheader.pl -s c:/alldefect.qry
  • Remove the code page header from all files in the directory c:/qrydir and its subdirectories:
    cqperl cpheader.pl -s c:/qrydir

See also

bkt_tool


Feedback