Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This documentation may not be copied, transferred, reproduced, disclosed or duplicated, in whole or in part, without
the prior written consent of CA. This documentation is proprietary information of CA and protected by the copyright
laws of the United States and international treaties.
Notwithstanding the foregoing, licensed users may print a reasonable number of copies of this documentation for
their own internal use, provided that all CA copyright notices and legends are affixed to each reproduced copy. Only
authorized employees, consultants, or agents of the user who are bound by the confidentiality provisions of the
license for the software are permitted to have access to such copies.
This right to print copies is limited to the period during which the license for the product remains in full force and
effect. Should the license terminate for any reason, it shall be the user’s responsibility to return to CA the reproduced
copies or to certify to CA that same have been destroyed.
To the extent permitted by applicable law, CA provides this documentation “as is” without warranty of any kind,
including without limitation, any implied warranties of merchantability, fitness for a particular purpose or
noninfringement. In no event will CA be liable to the end user or any third party for any loss or damage, direct or
indirect, from the use of this documentation, including without limitation, lost profits, business interruption,
goodwill, or lost data, even if CA is expressly advised of such loss or damage.
The use of any product referenced in this documentation and this documentation is governed by the end user’s
applicable license agreement.
Provided with “Restricted Rights” as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.227-19(c)(1) and (2) or
DFARS Section 252.227-7013(c)(1)(ii) or applicable successor provisions.
All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.
Contents
Chapter 1: Introduction
What You Need to Know ..................................................................... 1-1
Conventions ................................................................................. 1-2
Contents iii
PAGE FOOTER .......................................................................... 3-20
PAGE HEADER ......................................................................... 3-21
PRINT .................................................................................. 3-22
Contents v
Chapter 8: Version Control
Requirements ................................................................................ 8-2
Primary Server ........................................................................... 8-2
Secondary Server ......................................................................... 8-3
Client .................................................................................... 8-3
Version Control for Installation Customizations ................................................. 8-4
Version Control Server Modes ................................................................. 8-5
Version Control File Syntax .................................................................... 8-6
Contents vii
Column_Name Table ....................................................................... A-28
Computer_Extension Table .................................................................. A-28
Contact Table .............................................................................. A-29
Contact_Method Table ...................................................................... A-32
Contact_Type Table......................................................................... A-32
Controlled_Table Table ..................................................................... A-33
Cr_Call_Timers Table ....................................................................... A-34
Cr_Status Table ............................................................................ A-35
CR_Stored_Queries Table ................................................................... A-36
CT_Comment Table ........................................................................ A-37
D_PAINTER Table ......................................................................... A-37
Delegation_Server Table .................................................................... A-38
Delegation_Status Table ..................................................................... A-38
Delegation_Transport Table ................................................................. A-39
Document_Repository Table ................................................................. A-39
Domain Table .............................................................................. A-40
Domain_Constraint Table ................................................................... A-41
Domain_Constraint_Type Table ............................................................. A-42
Escalation_Control Table .................................................................... A-42
Escalation_Entry_Log Table ................................................................. A-42
Escalation_Level Table ...................................................................... A-43
Event_Delay Table .......................................................................... A-43
Event_Delay_Type Table .................................................................... A-44
Events Table ............................................................................... A-45
Expense_Code_Opt Table ................................................................... A-46
Failure Table ............................................................................... A-46
General_Resource_Class Table ............................................................... A-46
Geo_Coord_Type Table ..................................................................... A-48
GRC_Comment Table ....................................................................... A-48
Group_Member Table....................................................................... A-49
Impact Table ............................................................................... A-50
Initial_Report Table ......................................................................... A-50
Interface ................................................................................... A-51
Internal_Organization Table ................................................................. A-52
IR_Order_By Table ......................................................................... A-53
IR_Stored_wc Table......................................................................... A-53
Key_Control Table .......................................................................... A-53
Knowledge_Keywords Table ................................................................ A-54
Knowledge_Lrel_Table Table ................................................................ A-54
Location Table ............................................................................. A-55
Location_Type Table ........................................................................ A-56
Lrel_Table Table............................................................................ A-57
Contents ix
Survey_Template ........................................................................... A-95
System_Defaults Table ...................................................................... A-95
Table_Name Table .......................................................................... A-95
Task_Status Table .......................................................................... A-96
Task_Type Table ........................................................................... A-97
Ticket_Status Table ......................................................................... A-97
Timespan .................................................................................. A-98
Timezone Table ............................................................................ A-99
Transition_Points Table .................................................................... A-100
Trouble_Code Table ....................................................................... A-100
Trouble_Ticket Table ...................................................................... A-100
TT_Comment Table ........................................................................ A-101
TT_Order_By Table ........................................................................ A-101
TT_Stored_wc Table ....................................................................... A-101
TT_Template Table ........................................................................ A-101
Urgency Table ............................................................................ A-101
User_Query ............................................................................... A-102
V_Comment Table ......................................................................... A-103
Vendor_Provider Table .................................................................... A-103
Vendor_Provider_Type Table ............................................................... A-104
Workflow_Task Table ...................................................................... A-105
Workflow_Task_Template Table ............................................................ A-106
Contents xi
noturg Object .............................................................................. B-40
nr Object................................................................................... B-40
nr_com Object .............................................................................. B-42
nrf Object .................................................................................. B-43
ntfl Object ................................................................................. B-43
options Object .............................................................................. B-44
org Object ................................................................................. B-44
pcat Object ................................................................................. B-45
pri Object .................................................................................. B-46
prod_list Object ............................................................................ B-46
prp Object ................................................................................. B-47
prptpl Object ............................................................................... B-47
rescde Object ............................................................................... B-48
rptm Object ................................................................................ B-48
rrf Object .................................................................................. B-49
rss Object .................................................................................. B-49
sdsc Object ................................................................................. B-50
seq Object.................................................................................. B-50
sev Object.................................................................................. B-51
site Object ................................................................................. B-51
sla Object .................................................................................. B-52
slatpl Object................................................................................ B-53
survey Object .............................................................................. B-53
svy_ans Object ............................................................................. B-54
svy_atpl Object ............................................................................. B-54
svy_qtpl Object ............................................................................. B-55
svy_ques Object ............................................................................ B-55
svy_tpl Object .............................................................................. B-56
swex Object ................................................................................ B-56
tcat Object ................................................................................. B-57
tskstat Object ............................................................................... B-57
tskty Object ................................................................................ B-58
tspan Object................................................................................ B-59
tt Object ................................................................................... B-60
tt_act Object................................................................................ B-61
tt_com Object .............................................................................. B-62
tt_esclvl Object ............................................................................. B-63
tt_stat Object ............................................................................... B-63
tttpl Object ................................................................................. B-64
tz Object ................................................................................... B-64
urg Object ................................................................................. B-65
usq Object ................................................................................. B-65
Index
Contents xiii
Chapter
Introduction
1
This guide explains how to customize Unicenter Service Desk, the most advanced
and comprehensive service desk management tool available for the UNIX and
Windows operating systems. It is intended for the system administrator or
application developer whose job it is to change the way Unicenter Service Desk
looks and works. Some customization techniques apply to all of Unicenter
Service Desk, while other techniques are specific to each function. The types of
customization that you can perform include:
■ Generating custom reports
■ Customizing the database schema
■ Customizing the object schema
■ Customizing windows and add new windows
■ Customizing notification methods
■ Customizing queries and messages
■ Integrating with other products
Before reading this guide, you should be familiar with the information in the
Unicenter Service Desk Getting Started and Administrator Guide. This guide does
not describe any of the basic concepts that those guides discuss.
Introduction 1–1
Conventions
Conventions
When representing syntax and user input, the following conventions are used:
Convention Usage
Bold Indicates text that must be typed exactly as shown
Italic Indicates a variable name or placeholder for which you
must supply an actual value—this convention is used in
explanatory text, as well as syntax
[ ] (square brackets) Indicates an optional item
| (vertical bar) Indicates that you must choose one option or the other
… (ellipsis) In syntax, indicates that an item that can be repeated; in
examples, indicates that an irrelevant portion is omitted
Tip: UNIX is case-sensitive, so, if you are using UNIX, you must be careful to
type your login ID, UNIX commands, file names, and so forth, in the correct
case.
This chapter explains how to create your own customized notification methods.
See the chapter “Notifications” in the Administrator Guide for information about
using the standard notification methods.
Environment Variables
Two sets of environment variables are created and made available to the
notification method. The first set of environment variables is always available:
Note: If Where to Get Recipient on the Notification Rule Detail is set to Specific
Script or Action’s Script, these environment variables cannot be used because
these methods do not use contact information.
Customization Steps
Creating a customized notification method involves the following steps:
1. Create a script to process the message template and transmit it to the
recipient. The script can be any executable, depending on the platform.
Third-party or public domain interpreters can also be used. Typically,
Bourne shell scripts are used on UNIX and .bat files are used on Windows. If
your script requires a special template, you must create it.
2. Add the new notification method to Unicenter Service Desk.
Creating a Script
After you create a script, you must define the new notification method to
Unicenter Service Desk. To do so, perform these steps using the Unicenter
Service Desk client interface:
1. Choose Notification Setup, Notification Methods from the Administration
menu. The Notification Method List window appears:
2. Choose New from the File menu. The Notification Method Detail window
appears:
UNIX Example The following steps create a notification method shell script that sends the
notification message to the help desk printer, HelpPR2. In this example, the
notification message will consist of the message header and the message text
from the message template:
1. Set up the shell script to assemble the notification text and transmit it, as
shown below:
#!/bin/sh
echo "
TO: $NX_NTF_USERID
SUBJECT: $NX_NTF_SUMMARY
MESSAGE:
$NX_NTF_MESSAGE" |lp -dHelpPR2
2. Name the executable file hlp_print, and place it in any directory used for
common scripts at your site, such as /usr/local/netbin.
3. Make the shell script an executable file using chmod.
4. Using the Unicenter Service Desk client interface, choose Notification Setup,
Notification Methods from the Administration menu.
5. Choose New from the File menu.
6. Enter data in these fields:
Field Value
Symbol HelpPR2
Description Send backup notification to help desk printer HelpPR2
Notification Method /usr/local/netbin/hlp_print
7. Click Close to close the detail window, and click Close again to close the list
window.
To generate a custom report, you need to follow these basic steps, which are
discussed in more detail in this chapter:
1. Design the report:
■ Decide what data you want to include in the report
■ Create a report template that contains SQL-like queries, expressions, and
functions to manipulate data, and statements to format the data for the
printed page
2. Generate the report from:
■ The command line
■ A Unicenter Service Desk menu option
■ A script file
Note: If you have a third-party database system such as Sybase or Oracle, you
can use its report generating tools to create reports with data from the Unicenter
Service Desk database. See the documentation for your database system for
information about reporting on databases.
Designing Reports
To design a custom report, you should have a basic understanding of the
following concepts:
■ Writing SQL queries.
■ Programming, especially in C.
■ Creating special programs or script files that you may need to execute before
you execute the report template program. For example, you may want to
create a program that prompts the user to enter an argument, such as the
conditions for a WHERE clause. These programming techniques are not
described in this chapter.
To help you select data from the Unicenter Service Desk database for customized
reports, see the appendix “Data Element Dictionary” in this guide lists database
tables, fields, descriptions, and other database information.
A report template is a file that, when executed by a Unicenter Service Desk report
program, generates a report of a particular design. A report template contains
variable expressions, functions, and statements that define how the data is
fetched, calculated, and printed. For complete descriptions of the variable
expressions, functions, and statements that make up a report template, see the
Reference section at the end of this chapter. For a sample report template that
illustrates how to pass arguments into a report, see the example at the end of this
section.
To create a report template, create a file containing the following types of report
statements:
■ Block statements to define the Unicenter Service Desk database tables from
which data will be fetched and the actions that are to be performed on the
fetched data
■ Layout statements to define how the data variables and literal text will
appear on the report output
Block Statements
Block statements provide the report template with its framework. They define the
data to be manipulated and control the execution of the report. Block statements
begin with a name that must be unique throughout the report template. They
then have two sections:
■ The data query section contains SQL SELECT, WHERE, and SORT clauses to
define which data will be fetched from the database
■ The output program section defines the actions that are to be performed on
the fetched data. It contains variable declarations, functions, and other block
statements, including nested statements, which can be used to create
conditional reports. It can also contain layout statements, which format and
print the data as ASCII text.
See BLOCK in the Reference section later in this chapter for a detailed version of
the syntax, along with a description of each clause and parameter.
Layout Statements
Layout statements define how variables and literal text will appear on the report
output:
■ You can use the PAGE HEADER and PAGE FOOTER statements to place
information at the top and bottom of each report page.
■ You can nest HEADER, HEADER2, FOOTER, and PRINT statements within
the braces section of the parent BLOCK statement to create titles and
summary totals for the various reporting sections (parts of the report output).
Tip: When nesting, be careful not to confuse the braces used in layout
statements with the braces that encompass the nested statements within a
parent BLOCK statement.
■ You can include literal text to create labels and line drawing characters to
enhance the appearance of the report.
You can also use the following predefined variables in layout statements:
■ CT prints the current time
■ CD prints the current date
■ PG prints the page number
Data Fields A data field is any variable in a layout statement that results in a piece of data
when you generate the report. Use the following guidelines when placing fields
in your report template:
■ Enclose data fields in square brackets ([ ]).
■ The field’s square brackets define its print space on each line of output. This
space is the number of characters delimited by the square brackets, including
the brackets. If the output of a variable is longer than the print space, the
output is truncated. To ensure that the field has enough print space, you can
add trailing spaces between the variable name and the closing bracket. For
example, these trailing spaces allow for contacts with long names:
[contact ]
■ For output that is less than one line, the field can be closed with a greater
than right angle bracket (>). This extends the print space to the right margin.
For example, the right angle bracket used in a HEADER statement allows the
current date to print without being truncated:
[CD >
Note: When the field is more than one line and the variable is flagged as
MULTILINE, the right angle bracket (>) acts exactly the same as the right
square bracket (]). If the print statement for a MULTILINE variable is closed
with the right angle bracket (>), characters wrap on white space to stay
within the field defined by the left bracket ([) and the right angle bracket (>).
Also, if the variable is not MULTILINE, the right angle bracket (>) causes all
the data to be displayed on the current line regardless of its length.
■ A field in a layout statement can refer to a previously defined variable or a
column name.
■ To reference a variable or column name in another block statement, use the
following syntax:
blockname::column | variable-name
Literal Text Literal text allows you to include supplementary information in your report. It
will appear on the report output exactly as specified in the template. To include
literal text in a layout statement, place it on any line after the opening brace ({)
and before the closing brace (}). Do not enclose it in quotes or square brackets.
In this example, “ACME Company” and “Page: ” are interpreted as literal text by
the Unicenter Service Desk report program:
PAGE HEADER {
ACME Company Page: [PG]
}
Variable Expressions
Every value that you want to appear on the report output can be assigned to a
variable. Variable expressions let you:
■ Manipulate Unicenter Service Desk data
■ Use functions to perform calculations on fetched values
The following example creates a variable named desc to reference the contents of
the chg_desc field in the Change Order window. The MULTILINE flag allows the
variable to print in its entirety over multiple lines:
desc = chg_desc MULTILINE
The following example prints the description. The output will be as long as the
length defined in the brackets. If you want a longer description to appear,
increase the number of spaces in the brackets.
PRINT { [desc ] }
See Variable Expressions in the Reference section later in this chapter for more
information on variable expressions.
Example
The Affected Contact Report template below shows how to create a report
template. It produces a report that lists open change orders with the same
affected contact:
PAGE HEADER { As Of: [CD>
[CT>
}
PAGE FOOTER {
Page: [PG>
}
BLOCK chg ("SELECT \
chg_ref_num, description, priority, \
status, category, assignee \
FROM Change_Request",
"WHERE #Change_Request.status = ‘OP’ \
AND #Change_Request.requestor = #Contact.id \
AND #Contact.c_last_name = ? \
AND #Contact.c_first_name = ? \
AND #Contact.c_middle_name = ? " , $1, $2, $3)
{
BLOCK st ("SELECT sym FROM Change_Status",
"WHERE code = ? ", chg::status) {}
BLOCK (strlen(category)) cat ("SELECT sym FROM Change_Category",
"WHERE code = ? ", chg::category) {}
HEADER {
OPEN CHANGE ORDERS WITH SAME REQUESTOR/FROM CONTACT
CHANGE ORDER Summary Pri Status Category Assignee
}
HEADER2 {
CHANGE ORDER Summary Pri Status Category Assignee
--------------------------------------------------------------------
}
num = chg_ref_num;
desc = description MULTILINE;
pr = deref (priority);
stat = st::sym;
catgry = cat::sym;
asgn = deref (assignee);
PRINT {
[num ] [desc ] [pr] [stat] [catgry] [asgn ]
}
}
Page Header The PAGE HEADER statement tells what to print on the top of each page of the
report. CD and CT are predefined variables that give the current date and time.
They will appear in the header on the top of each page. Each of these fields ends
with an angle bracket, which allows the field to expand towards the right margin.
Because “As Of:” is outside of a field and because it is on a line after the opening
brace, it will appear as literal text on the report output.
PAGE HEADER { As Of: [CD>
[CT>
}
Page Footer PAGE FOOTER includes the page number with “Page: ” as literal text.
PAGE FOOTER {
Page: [PG>
}
Note: Since PAGE HEADER and PAGE FOOTER statements produce global
headers and footers, they are not included in a BLOCK statement.
Reporting Section The main BLOCK statement, along with its nested statements, creates a reporting
section. A reporting section is usually only part of the data in the report, but this
report has only one reporting section. The unique name of this block is chg.
The SELECT clause selects the columns to be included in the data for the report
FROM three tables, but only where conditions specified by the WHERE clause
are met.
The last three AND expressions in the WHERE clause contain question marks,
which act as argument placeholders that take the values of the $1, $2, and $3
arguments, in order. Thus $1 is for c_last_name, $2 is for c_first_name, and $3 is
for c_middle_name. The $1, $2, and $3 arguments obtain the values of command
line arguments. For a command line example, see Running the Report Program
later in this chapter.
BLOCK chg ("SELECT \
...",
"WHERE \
...\
AND #Contact.c_last_name = ? \
AND #Contact.c_first_name = ? \
AND #Contact.c_middle_name = ? ", $1, $2, $3)
Reporting Section The opening brace starts the output program part of the BLOCK statement: its
Headers statements tell what to do with the data fetched by the SELECT and WHERE
clauses. This example has nested HEADER and HEADER2 statements that will
apply to this reporting section only. HEADER2 prints only if the report output
is on multiple pages.
{
...
HEADER {
OPEN CHANGE ORDERS WITH SAME REQUESTOR/FROM CONTACT
CHANGE ORDER Summary Pri Status Category Assignee
}
HEADER2 {
CHANGE ORDER Summary Pri Status Category Assignee
--------------------------------------------------------------------
}
Variable Assignments Here are the variable expressions that act on the data specified by the SELECT
clauses. They assign variables to the values of columns and to the results of
expressions. These variables match the fields in the PRINT statement that
follows.
The MULTILINE flag on the desc variable causes them to print or display on
multiple lines rather than being truncated. The deref function is used to return
the string expression contained in the referenced columns.
num = chg_ref_num;
desc = description MULTILINE;
pr = deref (priority);
stat = st::sym;
catgry = cat::sym;
asgn = deref (assignee);
Printing The PRINT statement contains the fields to be printed. This statement could have
also included literal text of lines that could enhance the appearance of the report.
The final ending brace matches the opening brace of the output program section
of the BLOCK statement.
PRINT {
[num ] [desc ] [pr] [stat] [catgry] [asgn ]
}
}
Generating Reports
After you create the report template, you can generate the report by running the
Unicenter Service Desk report program. The program can be executed from:
■ The command line
■ A Unicenter Service Desk menu option
■ A script file
Note: If you are working on a UNIX server, you can include the report output
redirector (rptuiDsp) parameter with the report command to display a dialog
with options for sending the report to the screen, a file, or the printer. See
Displaying a Dialog (UNIX Only) later in this chapter for details.
To generate a report from the command line, on UNIX, you must use the
Unicenter Service Desk report command:
pdm_task report [-h][-e][-f][-F ffstring][-p pagelength] filename [command-line
arguments]
Note that the report command is preceded by the pdm_task command, which
sets necessary environment variables. If the report is designed to accept
command line arguments, you must enter one for each argument in the report
template.
For a complete description of each option in the report and rpt_srv commands,
see the CA Reference Guide.
UNIX Example This example includes the three command line arguments (Smith, Jane, and L)
needed for the Affected Contact Report described in the report template example
earlier in this chapter:
pdm_task report /reports/myrpt.rpt Smith Jane L
If an argument is empty, you must use a null string. For example, if Jane Smith
did not have a middle initial, the syntax would be:
pdm_task report /reports/myrpt.rpt Smith Jane ""
You can include the report output redirector (rptuiDsp) parameter with the
report command to display a dialog. The dialog displays the options to print the
report to a file, display it in an Xterm window, or send it to the printer. For
example:
pdm_task rptuiDsp report /reports/myrpt.rpt Smith Jane L
Reference
This section describes the variable expressions, functions, and statements in a
report template.
Variable Expressions
Variable expressions define the data to be printed or displayed. They are placed
in a layout or block statement.
Syntax
variable-name = expression [flags]
Flags
Flags format the result of a variable expression. Use these flags to format text
fields:
Flag Description
MULTILINE Displays on multiple lines rather than truncating
RIGHT Right justifies
Flag Description
BLANKZERO Functions as null-value fields, which do not print a zero
BOOL Converts zero to no or non-zero to yes
REAL Displays as floating point (default is integer)
ZEROFILL Shows leading or trailing zeros
Flag Description
DATE Shows only date portion of date/time
DAYS Displays durations with days
HOURS Displays durations with hours
MINUTES Displays durations with minutes
SECONDS Displays durations with seconds
TIME Shows only time portion of date/time
Example
desc = description MULTILINE
Remarks
Variable names must be unique within a BLOCK statement and must not
duplicate any column in the SELECT clause for the block. The same variable
name can be used in different BLOCK statements but it cannot be repeated
within a BLOCK statement.
Follow these syntax rules when including expressions in your report template:
■ Use any valid C expression.
■ Do not enclose variable or column names in quotes.
■ Enclose string constants in single or double quotes.
■ You can refer to a nested block, but only if it contains exactly one row.
■ To include a column name that is the same as a keyword, precede the column
name with a backslash (\). For example, ALIAS is a keyword and \alias is a
column name.
■ Use the dollar sign ($) to reference environment variables, such as $name,
and to reference command line arguments, such as $n, where n is the position
of the argument on the command line.
■ To specify the number of command line arguments, use $#. For example, the
following expression means that if the number of command line arguments is
greater than one, use the additional argument as an argument; otherwise, set
the value of the argument to an empty string. Note that the report template
itself is considered a command line argument. Therefore, the number of
arguments is at least one.
$# > 1 ? $1 : "
Functions
■ strindex (string, pattern [, start_index]) returns the index of the first pattern
match, or the next pattern match after the start_index, in the string. Returns
-1 if there is no match.
buffer = "A thirty character long string"
zero = strindex(buffer, " [A-Z] ")
two = strindex(buffer, " [a-z] ")
■ substr (string, pattern [, length]) returns the portion of the string after the first
pattern match. It length is defined, it limits the length of the output string.
Returns a string of zero length, if there is no match.
buffer = "A thirty character long string"
last_word = substr(buffer, " [a-z]*$ ")
first_capital_letter = substr(buffer, " [A-Z] ",
1)
■ substr (string, index [, length]) returns the portion of the string after the index.
Its length is defined and limits the length of the output string. Returns a
string of zero length, if there is no match.
buffer = "Summary: The network card displays a
code of ... "
summary = substr(buffer, 9)
30_char_summary = strindex(buffer, 9, 30)
■ sum (block-name, expr) executes the expression for each row of the specified
block and sums the result
BLOCK sample ("SELECT actual_cost, est_cost FROM Change_Request") {
difference = sum (sample, est_cost-actual_cost)
}
■ average (block-name, expr) executes the expression for each row of the block
and returns the average of the result
BLOCK sample ("SELECT actual_cost, est_cost FROM Change_Request"){
avg_difference = average (sample, est_cost-actual_cost)
}
■ prev (expr) returns the previous value of the expression. This function should
be used with caution so its value does not overwrite the latest value by
accident.
■ downtime (sla_schedule, expr1, expr2 [, delay-block, expr, expr]) invokes an SLA
downtime calculation. The first argument must be a string that identifies a
service level agreement that was defined on an SLA Detail window. The
other arguments are start and end times:
– expr1 is the start date/time of the event
– expr2 is the end date/time of the event
In this example, the third BLOCK statement fetches the delays and
sla_downtime uses these records to calculate the downtime.
BLOCK act ("SELECT id a_sla_id, a_start_dt, a_finish_dt FROM Action") {
BLOCK act_sla ("SELECT id, sla_sched FROM Service_Level_Agreement", "WHERE id =
? ", act::a_sla_id) {
BLOCK act_dly ("SELECT ad_start_dt, ad_end_dt FROM Action_Delay", "WHERE
ad_a_id = ? ", act::id) {}
sla_downtime (act_sla::sla_sched, act::a_start_dt, act::a_finish_dt, act_dly,
act_dly::ad_start_dt, act_dly::ad_end_dt)
}
}
BLOCK
Block statements define the Unicenter Service Desk database tables from which
data will be fetched. Can include actions to perform on the fetched data.
Syntax
BLOCK blockname (
"SELECT [ALIAS,] field_name[, field_name ...]
FROM table_name[, table_name ...] "
[,"WHERE where_clause"][, arguments,] )
[SORT "sort clause"]
[,ALIAS]
{
output program statements
}
Parameters
SELECT clause Follows the blockname and is delimited by double quotes. Lists the columns to be
fetched, followed by the keyword FROM, followed by the tables from which the
columns are to be fetched. It is required. Here is an example with three tables
specified:
"SELECT open_date, chg_ref_num\
c_last_name, c_first_name\
FROM Change_Request,\
Contact"
WHERE clause Optionally follows the SELECT clause and further qualifies the information
selected. Can be a string constant or an expression evaluating to a string. If the
WHERE clause is an empty string, all records are returned. WHERE clauses can
contain replacement arguments (which refer to variables or command line
arguments) using the syntax of a question mark (?). The following WHERE clause
could follow the previous SELECT clause:
"WHERE #change_request.open_date > = ? \
AND #change_request.active_flag = 1 \
AND #Contact.c_last_name = ? ", $1
Note: The WHERE clause must be separate from the SELECT clause because the
WHERE clause can be an expression evaluating to a string, whereas the SELECT
clause is exclusively a string constant. This gives you more flexibility and data
manipulation capabilities in producing your report.
SORT clause Optionally follows the SELECT and WHERE clauses and sorts the fetched rows
of data. The SORT clause is formatted like the SQL ORDER BY clause. Here is an
example:
SORT "open_date"
ALIAS Optionally follows the SELECT and WHERE clauses, and requires alias records
to be resolved before the fetched rows of data are examined. If a SORT clause is
present, rows of data are sorted before aliases are resolved.
Example
This BLOCK statement assumes that an argument will be passed that holds an
integer equal to the ticket priority. The WHERE clause first checks the number of
arguments passed ($#). If one is present, it is used to evaluate the expression to
produce the WHERE clause; otherwise a null WHERE clause is substituted (" ").
BLOCK chg ("SELECT priority FROM change_request"
$# > 1 ? "WHERE priority =" ##$1 : ")
Remarks
FOOTER
Syntax
FOOTER {parameters}
Parameters
column | variable-name This field can be a variable from an earlier variable expression or a reference to a
column in the SQL clause of a BLOCK statement.
literal-text Any text that is not a predefined variable or a column or variable name is
interpreted as literal text. Literal text that you include in the FOOTER statement
appears in the exact horizontal location where you enter it.
Example
FOOTER {
Summary Information:
Total Failures: [Fail_count >
Total Downtime: [Downtime >
}
Remarks
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
HEADER
Syntax
HEADER {parameters}
Parameters
See FOOTER for a list and explanation of the valid parameters for this statement.
Example
HEADER {
Contact Summary Report
Contact Name Contact Alias Organization
}
Remarks
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
Note: If the print statement for a MULTILINE variable is closed with the right
angle bracket (>), characters wrap on white space to stay within the field defined
by the left bracket ([) and the right angle bracket (>). Also, if the variable is not
MULTILINE, the right angle bracket (>) causes all the data to be displayed on the
current line regardless of its length.
HEADER2
Syntax
HEADER2 {parameters}
Parameters
See FOOTER for a list and explanation of the valid parameters for this statement.
Example
HEADER2 {
Contact Summary Report (continued)
Contact Name Contact Alias Organization
}
Remarks
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
PAGE FOOTER
This layout statement places information at the bottom of each report page.
Syntax
PAGE FOOTER {parameters}
Parameters
With the exception that you cannot use column and variable names, the
parameters for this statement are the same as those for FOOTER. See FOOTER
for a list and explanation of the valid parameters for this statement.
Example
PAGE FOOTER {
Page Number: [PG>
}
Remarks
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
PAGE HEADER
This layout statement places information at the top of each report page.
Syntax
PAGE HEADER {parameters}
Parameters
With the exception that you cannot use column and variable names, the
parameters for this statement are the same as those for FOOTER. See FOOTER
for a list and explanation of the valid parameters for this statement.
Example
PAGE HEADER {
Date of Report: [CD>
Time of Report: [CT>
}
Remarks
PAGE HEADERS are printed at the top of every report page. They can be
defined at any point within the report template file, but they cannot be included
within a BLOCK statement.
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
Syntax
PRINT {parameters}
Parameters
See FOOTER for a list and explanation of the valid parameters for this statement.
Example
PRINT {
[num ] [desc ] [pr] [stat] [catgry] [asgn ]
}
Remarks
Place PRINT where you want the data for a reporting section to appear in the
report. You can include a PRINT statement in a BLOCK statement.
A field’s content occupies the exact space delineated by the square brackets. Any
excess characters are truncated. However, you can close a field with an angle
bracket (>) to permit its content to expand in its entirety towards the right
margin.
Note: If the print statement for a MULTILINE variable is closed with the right
angle bracket (>), characters wrap on white space to stay within the field defined
by the left bracket ([) and the right angle bracket (>). Also, if the variable is not
MULTILINE, the right angle bracket (>) causes all the data to be displayed on the
current line regardless of its length.
Most tasks and examples in this chapter focus on customizing existing windows.
You can also create entirely new windows using Screen Painter.
Tip: It is easier and faster to copy and then edit an existing window that most
closely resembles the window you want than to create a new window.
Introduction
The Request Management, Change Order Management, Knowledge
Management, and the Options Manager functions of Unicenter Service Desk are
graphically based business process applications developed using an
object-oriented distributed client/server environment. You can customize these
applications, including the database schema, object schema, and windows
defined in Screen Painter to best suit your needs.
Configuration Overview
The first two tiers represent the server layer, and the last tier represents the client
layer.
Database Schema The database schema, or backstore, defines database tables, the fields (columns) in
a record (row) of each table, the relationship among these records, and how they
are sorted and indexed in the database. This backstore provides persistent (that
is, continuous and lasting) storage and access for the data contained in objects.
Object Schema Objects represent specific business knowledge and functionality. Each object
contains data (attributes) and behavior (methods and triggers) and each
associates with other objects by containment or other types of relationships.
Objects generally correspond to database schema specifications. For example, an
object attribute typically corresponds to a field in a database table.
Objects are assembled and manipulated by an object manager. The object server
(domsrvr) uses the backstore as a repository for persistent objects. Object
configuration files (Majic language files with a .maj extension) are interpreted at
object manager startup time.
Application Level The object viewer displays domain server objects in a graphical manner. The
Viewer viewer is the Unicenter Service Desk Windows client interface, in which all of
the windows are defined as Screen Painter forms.
You can modify the flexible schema to meet your needs. For example, you can
add a field to a table or add a new table.
Specific database tables, fields, and attributes are defined in schema (.sch) files.
All schema files are stored in the $NX_ROOT\site directory (UNIX) or
installation-directory\site directory (Windows). Unicenter Service Desk provides
an additional directory called $NX_ROOT/site/mods (UNIX) or
installation-directory\site\mods (Windows) in which to store product
modifications, including any changes or additions you make to the database
schema. You should copy all of your changes into this mods directory—it is
never overwritten when you install a new version of Unicenter Service Desk.
When you configure Unicenter Service Desk, all of the schema files, including the
new ones you create and copy into mods directory, are merged into ddict.sch.
This contains the definition of the provider, partition, tables, storage details, and
mappings for the backstore. See the chapter “Customizing the Database
Schema” for specific procedures for merging the schema files and for more
information on customizing the database schema, in general.
You can also modify the object schema to meet your needs. For example, you can
customize the objects or add new objects. Majic is the metalanguage that defines
the objects; therefore, objects are defined in Majic (.maj) files (see the appendix
“Object Definition Syntax” for Majic language syntax.
All Unicenter Service Desk object definition files are stored in the
$NX_ROOT/bopcfg/majic directory (UNIX) or installation-directory\bopcfg\majic
directory (Windows). Unicenter Service Desk provides an additional directory
called $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows) in which to store any changes
or additions you make to the object schema. You should copy all of your object
schema changes into the $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows). This directory is never
overwritten when you install a new version of Unicenter Service Desk.
These object configuration files are interpreted at domsrvr startup time. When
the domsrvr starts, it reads the object definition files in the
$NX_ROOT/bopcfg/majic directory (UNIX) or installation-directory\bopcfg\majic
directory (Windows) first, and then searches the $NX_ROOT/site/mods/majic
(UNIX) or installation-directory\site\mods\majic (Windows) directory for
modifications.
See the chapter “Customizing the Database Schema” for more information
about customizing objects. See the appendix “Objects and Attributes” for a list
of all objects and attributes that define Unicenter Service Desk.
You can edit most of the window definitions contained in the database to
customize the user interface using Screen Painter. You can also create a new
window to display data from an existing object or to display data from a new
database table and object you created. The sections that follow give you a brief
introduction to Screen Painter, and the remainder of this chapter goes into
greater detail about how to use Screen Painter.
Tags
The selection of a tag is very important. If the tag name is entered incorrectly, the
object, attribute, or method cannot be accessed and the field is unusable. Screen
Painter contains a Tag Helper that displays the objects, attributes, and methods
that are currently available. It also shows the relationships among objects and
builds the correct tag name for you. You can select a tag name from the Tag
Helper tree and apply it to a field on your window.
Window (form) groups are used to control which users are allowed to view
which windows. Window groups let you display specific data for a group of
users, or display data in a different way for a group of users. Most Unicenter
Service Desk windows are part of the default window group, which means that
most Unicenter Service Desk users see the same windows when they are using
the product.
When using Screen Painter, you can save a form in a new form group using the
Save As option.
To start Screen Painter click Start on the taskbar, and then choose Programs,
Unicenter Service Desk, Screen Painter. After entering your login information,
the Screen Painter main window is displayed:
Note: To start Screen Painter from the command line, use painter32.exe. See the
CA Reference Guide for details.
2. To select a form from a group other than DEFAULT, select a new group from
the Form Group drop-down list.
3. The Open Form list shows the forms that belong to the currently selected
group. If the DEFAULT group is selected, the forms initially listed are for the
windows in the Unicenter Service Desk client interface. Select the form that
you want to edit from the Open Form list, and click Open. The form is
opened.
4. If the form you open is one of the original forms in the DEFAULT form
group, it will have a Property of Default in the Open Form dialog. You
cannot modify the original forms directly. Instead, save a copy of the form
using the instructions in Copying a Window Definition, which you will be
able to modify.
Customizing a Window
Once the form for the window you want to edit is loaded in Screen Painter, you
can use the toolbar, menu commands, and shortcuts to customize the window.
The sections that follow describe how to perform some basic tasks using Screen
Painter (for more information, see the Screen Painter online help).
You can reposition items on a window by selecting and dragging the items on the
form. This changes the item’s positioning properties, which control the relative
placement of an item in a window.
Tip: You can select multiple items at once by creating a selection box by
holding down the mouse button and dragging. You can also press and hold
Ctrl to select multiple items individually.
Items have a relative front-to-back position in a window. When you add an item
to a window, it is placed in front of other items already in the window. You can
see this if you try to drag a new item behind an existing item. The front-to-back
position reflects the tabbing order of the items. See Defining the Tabbing Order
later in this chapter for more information.
To move an item:
1. On the form, select the item or items you want to move. Handles appear
around the selection as shown in the following example:
2. Drag the selected items to a new position in the window. When more than
one item is selected, all selected items move as a group.
Tip: If needed, you can choose Undo from the Edit menu to reverse the most
recent editing action or to repeatedly undo a series of actions.
You can define the order in which you can tab through items on a window using
the TabIndex property. The TabIndex property can be found within the
Properties dialog of any Screen Painter control.
1. Double-click a control on the form to open its Properties dialog.
2. Select the value for the TabIndex property, and enter a number. The value
that you enter becomes the tab order of the control.
Using Tab Index Mode Rather than define the tabbing order by setting a value for each control as
described above, you can define it by navigating directly on the form. To do this:
1. Choose Tab Index Mode from the Control menu.
2. Click the controls on the form in the correct tabbing order. When you click a
control, a number indicating the order of the tab sequence is displayed on the
control.
3. When you are finished setting the tabbing order, choose Tab Index Mode
from the Control menu to turn this mode off.
You can test the tabbing order by pressing Tab on the form within Screen Painter.
The controls will be selected using the order that you have defined.
Within Screen Painter, you have access to a collection of controls that you can
place on a window, as described below:
■ Check Box—A toggle item with values for on and off. For example:
■ Label—One line of text that is typically used as a title for a text box. For
example:
Adding Controls
Editing Controls
Tip: You can change the size of a control directly on the window. Simply click
the control to select it, and resize it using one of the handles.
Tags let you reference and display objects, attributes, and methods on your
windows. Every item on a window, including all controls, grid columns, and
menu items, has a tag. You specify the tag for an item in the Tag field, which may
be located within the Properties dialog, the Menu Editor dialog, or the Custom
Grid dialog. See Tags earlier in this chapter for more information about tags.
You can use the Tag Helper within Screen Painter to select a tag for a control on
your window. Use the following procedure to access the Tag Helper and use it to
associate a tag with a control on your window:
1. Choose Tag Helper from the Controls menu. The Tag Helper dialog appears:
2. Scroll through the tag tree on the left side of the dialog to find the object you
want to use. Because this is a tree, the tag you are looking for may be
contained within another tag. To expand any item in the tag tree, double-
click the item. Use the tag type legend on the right side of the dialog to
interpret the types of tags in the tree.
3. Select the appropriate tag, drag it to the control on your window, and drop it
there. The tag is now associated with the control. The next time you open the
Properties dialog for the control, the tag that you selected will be displayed
in the Tag field.
4. Repeat Steps 2-3 for as many control tags as you want to define.
5. Click Close to close the Tag Helper dialog.
You can use the Menu Editor within Screen Painter to add a menu bar to your
window. You can add a pull-down menu with menu commands for each item on
the menu bar, as well adding submenus and other effects, such as underlining
shortcut keys and separating groups of menu commands. For example:
To add a menu bar to a form that does not already have one:
1. Choose Menu Editor from the Controls menu. The Menu Editor dialog is
displayed:
2. The main list box at the top of the dialog shows the structure of the menu as
you define it. To add the first item, simply enter the name of the item in the
Caption field. To add subsequent items, click Add before entering the
caption.
3. Enter a value in the Tag field for each menu bar item that you add (see Tags
earlier in this chapter for an explanation). For example, you might enter
FileMenu for the File menu bar item. After adding File, Edit, and Help items,
the Menu Editor looks similar to the following:
Tip: To create a submenu, indent the submenu commands to the next level
underneath the menu command that activates the submenu.
3. Enter the name of the menu command in the Caption field. Once again, you
can use an ampersand to underline a letter in the caption, indicating how the
user can accelerate the selection. For example, if you create a New command
on the File menu by entering &New, the user can select this command by
entering Alt+F, N.
4. Enter a value in the Tag field for the menu command (see Tags earlier in this
chapter for an explanation).
5. If you want the user to be able to activate the menu command directly from
the window using a shortcut key, select a key from the Shortcut drop-down
list. The shortcut key appears next to the caption in the menu.
Tip: At any time while you are working with the Menu Editor, click Apply to
save the changes you have made without exiting the Menu Editor.
6. If you want to display a short description of the menu command when the
user points to it, enter a value in the ToolTip field.
7. If a menu command marks the first one in a new group, check Begin Group.
This will include a separator before this command when the menu is
displayed.
8. Repeats Steps 3-7 to add as many menu commands as you need for each
menu bar item. An example of a complete menu definition is shown below:
9. Click OK when you are finished with your menu and want to exit the Menu
Editor. The menu you created appears on your window, and you can click
the items on the menu bar to display the corresponding menus.
Editing a Menu
If your window already has a menu, and you want to edit it:
1. Choose Menu Editor from the Controls menu. The Menu Editor dialog is
displayed, showing the existing menu definition:
2. To delete any item displayed in the main list box, select it and click Delete.
Tip: At any time while you are working with the Menu Editor dialog, click
Apply to save the changes you have made without exiting the Menu Editor.
3. To change the level of any item, select it and click the large right or left
arrow.
4. To change any of the properties associated with an item, select it and enter or
select new values in the controls beneath the main list box.
5. Click OK when you are finished with your menu and want to exit the Menu
Editor. The menu you created appears on your window, and you can click
the items on the menu bar to display the corresponding menus.
Remote references let you click a button or select a menu item on a Request or
Change Order Management window to run another application. To do this, you
must add the remote reference to Request or Change Order Management; then
add the button or menu item to a window using Screen Painter.
Note: The application that you want to run must be executable on the same
platform on which the window is displayed.
To add the remote reference to Request or Change Order Management, start the
Unicenter Service Desk Windows client interface and follow these steps:
1. Choose Remote References from the Administration menu. The Remote
Reference List window appears.
2. Choose New from the File menu. The Remote Reference Detail window
appears:
Using Launchit You can use Launchit in remote references to execute program files and, in
Windows environments only, to run batch files and to load non-executable files
(referred to as documents). Launchit is installed in $NX_ROOT/bin (UNIX) or
installation-directory\bin (Windows). For usage notes on launchit, run launchit -h.
Using launchit to run a program or batch file for a remote reference guarantees
that Unicenter Service Desk environment variables are available to the program
or batch file.
To use launchit in a remote reference, the NT Server, Unix Server, or Unix Client
Exec Command field and the Windows Client Exec Command field on the
Remote Reference Detail window must begin with launchit and launchit.exe,
respectively. Follow this by command line options for launchit (if any), and then
the name of the file to launch (enter launchit -h from the command line if you
need more information on its usage).
For example, if you wanted to load the file Display.html in your web browser,
you would enter launchit Display.html in NT Server, Unix Server, or Unix
Client Exec Command field, and you would enter launchit.exe Display.html in
the Windows Client Exec Command field on the Remote Reference Detail
window (see Step 3 under Defining the Remote Reference).
To link the remote reference you just defined to a command button on a window,
follow these steps:
1. From within Screen Painter, open the window where you want to add the
remote reference link. If it is one of the original forms in the DEFAULT
group, save it using the same name. (See Opening an Existing Window and
Copying a Window Definition for specific instructions.)
2. When the window appears in the Screen Painter work area, click the
command button on the toolbar.
3. Place the cursor in the window where you want to put the command button,
and then click and drag until the button is the size you want it to be.
4. Double-click the new button to display its Properties dialog:
5. Enter the following for the Tag property, where code is the value you entered
as the code to identify the application (see Step 3 under Defining the Remote
Reference):
smart_hook#code
6. Enter a label for the button for the Caption property, and define any of the
other properties to suit your needs, and then close the Properties dialog.
7. The new button will be put at the end of the tabbing order on the window. If
you want to change it, you can do so now. See Defining the Tabbing Order
for instructions.
Example You can use a similar set of steps to link the remote reference to a menu
command, as shown in the following example that adds a remote reference link
to the Show menu on the Request Detail window:
1. From the Unicenter Service Desk Windows client interface, choose Remote
References from the Administration menu. The Remote Reference List
window appears.
2. Choose New from the File menu. The Remote Reference Detail window
appears.
3. Enter data in the following fields:
Symbol—Enter Screen Painter.
Code—Enter USDSP.
NT Server, Unix Server, or Unix Client Exec Command—Enter painter32.
Windows Client Exec Command—Enter painter32.exe.
4. Choose Save from the File menu, and click OK to close the Remote Reference
Detail window. The Remote Reference List window appears, with the new
remote reference now appearing in the list.
5. Click OK to close the Remote Reference List window, and exit the Unicenter
Service Desk Windows client interface.
6. From within Screen Painter, open the cr_detail window and save ii using the
same name. (See Opening an Existing Window and Copying a Window
Definition for specific instructions.)
7. Choose Menu Editor from the Control menu. The Menu Editor dialog
appears.
8. Locate the Show menu bar item in the main list box, click the menu
command just below it (Activities), and then click Insert. All items in the list
below the current position are pushed down in the list, and a blank line
opens.
9. Click the large right arrow to indent the new item, making it a command on
the Show menu. Four dots appear at the beginning of the item to indicate
that it is subordinate to the item above.
10. Enter the name of the menu command, Screen &Painter, in the Caption field.
The ampersand underlines the letter “P,” indicating how the user can
accelerate the selection. For example, the user will be able to select this
command by entering Alt+S, P.
11. Enter the following for the Tag field:
smart_hook#USDSP
12. Click OK to save the newly added menu command and close the Menu
Editor dialog.
13. Click the Show menu bar item on the window definition, and you should see
the newly added Screen Painter menu command.
Note: If you like, you can also preview the form using the Preview Form
command on the Edit menu; however, the preview version of the window will
not run the remote reference. You must start the Unicenter Service Desk
Windows client interface to test the remote reference.
When you are finished making changes to this window, you can save it and quit
Screen Painter. The next time you access the Unicenter Service Desk Windows
client interface, the Screen Painter command will be at the top of the Show menu
on the Request Detail window, and selecting it will launch Screen Painter. If the
new version of the window does not appear automatically, you need to choose
Form Group, Refresh from the Administration menu to ensure that the latest
forms are in use.
Saving Changes
From time to time while you are editing a form, you will want to save your
changes to the database. To do this, choose Save Form from the File menu.
Previewing a Window
Important! You must save the current form before you can preview it
5 Schema
You can modify the flexible database schema of Unicenter Service Desk to meet
your needs. You can make any of these changes and use them in the windows or
reports you design:
■ Increase the length of an existing field
■ Change a field from not being required to being required
■ Add fields to any table that is not used as an internal table
■ Add reference tables that can be referenced by fields in a table
CAUTION! Change field lengths and add fields carefully. You can inadvertently exceed
the record length capacity of the underlying database. Check the specifications for the
database that you are using with Unicenter Service Desk and make modifications within
the limits of that database. Never shorten string fields or delete existing fields from the
database. Data may be lost and Unicenter Service Desk may fail. Changes to the database
schema could require limited or considerable down time, depending on the changes you
make and the capabilities of your database.
Tip: If you are a new user of Unicenter Service Desk, it is easier to make all of
your changes during testing instead of waiting until you are in production.
We highly recommend that you carefully log all changes you make.
The beginning of this chapter reviews the general procedures you must perform
before and after changing the database schema. The rest of the chapter contains
specific procedures you can use to customize your schema. Most of these
procedures are followed by an example of a change you might want to make to
the standard database schema.
General Procedures
This section contains the following general procedures:
■ Making backups
■ Identifying the schema items to modify
■ Updating the database schema
■ Populating new reference tables
Making Backups
Before making any changes, make a backup copy of ddict.sch. You can then
restore that file if you need to back out your changes.
If you are changing a field or adding a field to a table, back up the data in that
table with pdm_extract:
pdm_extract -backup_file table
Note: These steps are not required if you are only adding a new reference table.
The appendix “Data Element Dictionary” in this guide describes the standard
Unicenter Service Desk schema. Before modifying the schema, study it to see if
an existing table or field meets your needs.
If you decide that you must modify the schema, you will make the changes in
your own .sch files. Then you will place these .sch files in $NX_ROOT/site/mods
(UNIX) or installation-directory\site\mods (Windows) to be merged with the
ddict.sch file, which you have already backed up (see Making Backups earlier in
this chapter).
After making changes or additions to the .sch files, you must update the database
schema and reload the data you backed up.
CAUTION! If you are still in the testing phase and have no data, you can follow the first
set of steps, which tell you to reinitialize your database. Otherwise, if you do not want to
reinitialize your database, and therefore, lose all data, use the second set of steps.
If Your Database If your database contains no production data that you want to save, follow
Contains No these steps:
Production Data...
1. Make sure all users are logged off of Unicenter Service Desk.
2. Stop the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
3. Run the configuration utility (See Changing the Configuration in the CA
Procedures Guide for if you need instructions) to merge your .sch files with the
ddict.sch file. Choose to reinitialize database, either by selecting the
appropriate field or answering Yes when prompted.
4. Restart the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
If Your Database If you have an existing database and do not want to reinitialize the database,
Contains Production follow these steps:
Data...
1. Make sure all users are logged off of Unicenter Service Desk and that you
have backed up your data (see Making Backups earlier in this chapter).
2. Stop the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
3. Run the configuration utility (See Changing the Configuration in the CA
Procedures Guide for if you need instructions) to merge your .sch files with the
ddict.sch file. Choose not to reinitialize database, either by clearing the
appropriate field or answering No when prompted.
4. Change to the $NX_ROOT/site (UNIX) or installation-directory\site
(Windows) directory.
5. Run the build command on the server to add the new or modified tables to
the database:
xxxbuild -p table database-name ddict-path
where:
■ xxx is your database (for example, sql, syb, inf, orcl, ingres).
■ -p performs a partial build.
7. Restart the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
If Your Database If your database contains no production data that you want to save and
Supports Altering supports the altering of tables dynamically, follow these steps:
Tables Dynamically…
1. Make sure all users are logged off of Unicenter Service Desk and that you
have backed up your data (see Making Backups earlier in this chapter).
2. Stop the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
3. Run the database vendor’s utilities to add or lengthen a field.
4. Run the configuration utility (See Changing the Configuration in the CA
Procedures Guide for if you need instructions) to merge your .sch files with the
ddict.sch file. Choose not to reinitialize database, either by clearing the
appropriate field or answering No when prompted.
5. If you have changed a field or added a field to a table, run pdm_replace to
reload the data file you created with pdm_extract:
pdm_replace -v -fbackup_file
6. Restart the Unicenter Service Desk daemons (UNIX) or the daemon server
(Windows) (see the chapter “System Management” in the Administrator Guide
if you need instructions).
Open any new reference table using the Unicenter Service Desk client interface
and fill them with values.
Specific Procedures
This section contains the following specific procedures:
■ Lengthening fields
■ Making a field required (recommended for a new database)
■ Making a field required without making schema changes (recommended for
an existing database)
■ Adding non-reference fields to tables
■ Adding reference fields to tables
■ Adding reference tables
■ Defining activity associations for user-defined attributes
Lengthening Fields
Follow these steps to increase the number of characters that can be entered in an
input field on a window:
1. Create an .sch file for the table that contains the field with the increased
number of characters in $NX_ROOT/site/mods (UNIX) or
installation-directory\site\mods (Windows), or use an existing .sch file if one
exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
2. Enter this statement in the file to define the increased number of characters:
TABLE table_name {field value_type size ;}
where:
■ table_name identifies the database table that contains the field you are
lengthening (for example, Change_Request).
■ field is the name of the field you are lengthening (for example,
charge_back_id).
■ value_type is the field’s data-type. This could be a macro that determines
the current length of the field.
■ size is the new length.
3. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
4. Start Screen Painter.
Example
This example increases the length of the Expense Code field in the schema, and
then lengthens the corresponding display field on the Contact Detail window to
display more of the field at once, without having to scroll:
1. Create a file named contact.sch in $NX_ROOT/site/mods (UNIX) or
installation-directory\site\mods (Windows), or modify an existing contact.sch
file if one exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
3. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
4. Start Screen Painter.
5. Using the directions under Copying a Window Definition in the chapter
“Using Screen Painter,” copy cnt_detail.
6. Open the cnt_detail form. The window definition for cnt_detail appears.
7. Click the Organization Info tab, and select the Expense Code field—be sure
to select the text box, not the label.
8. Click the square handle at the end of the field and drag it out until it is as
wide as you want it to be.
9. Save the form, and quit Screen Painter.
10. For your new form to take effect, choose Form Group, Refresh from the
Administration menu in the Unicenter Service Desk client interface.
Follow these steps to force users to enter a value in a field before they can close a
window:
1. Add a value to the field in all existing records by following these steps:
a. Run pdm_extract to copy existing records that contain this field to a file:
pdm_extract table_name > filename
where:
■ table_name identifies the database table that contains the field you are
making required.
■ filename is the name of the file that will contain the output.
b. Edit the output file to define a value for every occurrence of the field you
are making required.
Note: Windows users should use WordPad to edit the file.
c. Run pdm_userload to update the database with the new data in the
edited file, where filename is the name of the file with the edited output
from pdm_extract:
pdm_userload -ffilename -u
2. Create an .sch file for the table that contains the field that will be required at
the database level in $NX_ROOT/site/mods (UNIX) or
installation-directory\site\mods (Windows), or use an existing .sch file if one
exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
3. Enter this statement in the .sch file to define the field as being required at the
database level:
TABLE table_name {field value_type NOT_NULL;}
where:
■ table_name identifies the database table that contains the field you are
making required.
■ field is the name of the field you are making required.
■ value_type is the field’s data type.
4. Create a new .mod file to contain the statement that will define the field as
being required at the object level in $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows).
5. Enter this modification statement in the .mod file:
MODIFY obj_name att_name REQUIRED;
where:
■ obj_name identifies the object whose attribute is being modified.
■ att_name identifies the attribute being modified.
See the appendix “Object Definition Syntax” for this statement’s complete
syntax.
6. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
Example
This example makes the Priority field on the Change Order Detail window a
required field.
1. Add a value to the Priority field in all existing requests following these steps:
a. Run pdm_extract to copy all requests to a file:
pdm_extract Change_Request > workfile
b. Edit workfile to add 3 to the Priority field in every record that does not
have a defined priority.
Note: Windows users should use WordPad to edit the file.
c. Run pdm_userload to add the priority value to the database:
pdm_userload -fworkfile -u
6. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
From now on, when a new Change Order is opened, a value must be entered in
the Priority field.
Follow these steps to force users to enter a value in a field before they can close a
window:
1. Create a new .mod file to contain the statement that will define the field as
being required at the object level in $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows).
2. Enter this modification statement in the .mod file:
MODIFY obj_name att_name REQUIRED;
where:
■ obj_name identifies the object whose attribute is being modified.
■ att_name identifies the attribute being modified.
For example, to make the Category field on the Change Order Detail window
required, use the following statement:
MODIFY chg category REQUIRED;
See the appendix “Object Definition Syntax” for this statement’s complete
syntax.
3. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
You can add a field to a table, and then add a field to a window to display the
information in that new table field. Follow these steps to add a non-reference
field (a field that does not display a list of values when you double-click it):
1. Create an .sch file for the table that will contain the new field in
$NX_ROOT/site/mods (UNIX) or installation-directory\site\mods
(Windows), or use an existing .sch file if one exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
2. Enter this statement in the .sch file to describe the new field:
TABLE table_name {field value_type;}
where:
■ table_name identifies the database table that will contain the field you are
adding.
■ field is the name of the field you are adding, in the format
table_name_zfield_name, where z identifies user-defined field names. Note
that in addtion to starting user-defined field names with the letter z,
fields names must not end with the characters “_f.”
■ value_type is the field’s data type.
3. Create a new .mod file to define the attribute in the object that will
correspond to the new field in $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows).
4. Enter this OBJECT statement in the .mod file:
OBJECT obj_name {ATTRIBUTES table_name {att_name [field_name] value_type;};};
where:
■ obj_name is the object that corresponds to the database table to which the
field was added.
■ table_name is the database table to which the field was added.
■ att_name is the attribute in the object that corresponds to the field you are
adding.
■ field_name is the field you are adding, if it is different from att_name.
■ value_type is the attribute’s data type.
5. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
6. Start Screen Painter.
7. Using the directions under Copying a Window Definition in the chapter
“Using Screen Painter,” copy all the forms that will display the new field.
8. Open the form you wish to change. The window definition for the form
appears.
9. Add a text box control to display the new field and a label control to identify
it (see the chapter “Using Screen Painter” if you need instructions on this and
remaining steps).
10. Enter the following for the text box’s Tag property, where obj_name and
att_name are the same values you used in Step 4:
obj_name.att_name
11. Enter a value for the label’s Caption property, and change any other label
properties that you like.
12. Change the tabbing order of the fields on the window to include the new
field.
13. Save the form, and quit Screen Painter.
14. For your new form to take effect, choose Form Group, Refresh from the
Administration menu in the Unicenter Service Desk client interface.
Example
This example adds a field for the Internet address to the Contact table and the
Contact Detail window:
1. Create a file named contact.sch in $NX_ROOT/site/mods (UNIX) or
installation-directory\site\mods (Windows), or modify an existing contact.sch
file if one exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
5. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
6. Start Screen Painter.
7. Using the directions under Copying a Window Definition in the chapter
“Using Screen Painter,” copy the cnt_detail form to a new form.
8. Open the cnt_detail form. The window definition for cnt_detail appears.
9. Add a text box control to display the new field and a label control to identify
it (see the chapter “Using Screen Painter” if you need instructions on this and
remaining steps).
10. Enter the following for the text box’s Tag property:
cnt.intadd
11. Enter the following for the label’s Caption property, and change any other
label properties that you like:
Internet Address
12. Change the tabbing order of the fields on the window to include the new
field.
13. Save the form, and quit Screen Painter.
14. For your new forms to take effect, choose Form Group, Refresh from the
Administration menu in the Unicenter Service Desk client interface.
You can add a reference field to a table, and then add a field to a window to
display the information in the new table field. A reference field is a field followed
by an ellipsis (…) indicating you can double-click it to see a list of values. To
display this list of values, a reference field must refer to another table where that
list of values is maintained. (See Adding Reference Tables later in this chapter for
more information about reference tables.) Follow these steps to add a reference
field:
1. Create an .sch file for the table that will contain the new field in
$NX_ROOT/site/mods (UNIX) or installation-directory\site\mods
(Windows), or use an existing .sch file if one exists.
Note: You must include the schema.mac macro file in new .sch files, as
shown below:
#include "../schema.mac"
2. Enter this statement in the .sch file to describe the new field:
TABLE table_name {field value_type REF other_table_name ;}
where:
■ table_name identifies the database table that will contain the field you are
adding.
■ field is the name of the field you are adding, in the format
table_name_zfield_name, where z identifies user-defined field names. Note
that in addtion to starting user-defined field names with the letter z,
fields names must not end with the characters “_f.”
■ value_type is the field’s data type.
■ other_table_name identifies the other table the new field refers to in order
to display a list of values when you double-click.
3. Create a new .mod file to define the attribute in the object that will
correspond to the new field in $NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows).
4. Enter this OBJECT statement in the .mod file:
OBJECT obj_name {ATTRIBUTES table_name {att_name [field_name] SREL
obj2_name;};};
where:
■ obj_name is the object that corresponds to the database table to which the
field was added.
■ table_name is the database table the field was added to.
■ att_name is the attribute in the object that corresponds to the field you are
adding.
■ field_name is the field you are adding, if it is different from att_name.
■ SREL refers to the object that corresponds to the other table.
■ obj2_name is the object that corresponds to the other table.
5. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
Important! If you are using a Sybase, Oracle, or Informix database, be sure the
Reinitialize Database field is set to NO on the Configuration window.
6. Start Screen Painter.
7. Using the directions under Copying a Window Definition in the chapter
“Using Screen Painter,” copy the form that will display the new reference
field.
8. Open the form you wish to change. The window definition for the form
appears.
9. Add a text box control to display the new field and a label control to identify
it (see the chapter “Using Screen Painter” if you need instructions on this and
remaining steps).
10. Enter the following for the text box’s Tag property, where obj_name and
att_name are the same values you used in Step 4:
obj_name.att_name
11. Change the tabbing order of the fields on the window to include the new
field.
12. Save the form, and quit Screen Painter.
13. For your new form to take effect, choose Form Group, Refresh from the
Administration menu in the Unicenter Service Desk client interface.
A reference table is a list of values that can be used to fill in fields on windows. For
example, the Contact_Type table lists the kinds of people who will use requests
or change orders (like analysts, technicians, users, or vendors). The Type field on
the Contact Detail window can be filled in from the values listed in the
Contact_Type table by double-clicking the Type field. Therefore, if you add a
reference field, you must create a reference table to maintain the list of values.
4. Create a new .mod file to the new table’s object name and attributes in
$NX_ROOT/site/mods/majic (UNIX) or
installation-directory\site\mods\majic (Windows).
5. Enter this OBJECT statement in the .mod file:
OBJECT obj_name{
[ATTRIBUTES [table_name]{
att_name [field_name] value_type
[access_type[status_type]]{
|SET value|NOW ;]
[ON_NEW DEFAULT|
|SET value|NOW ;]
[ON_CI DEFAULT|
|SET value|NOW ;]} ; } ;
[ON_DB_INIT DEFAULT|
[FACTORY [fac_name]{
[REL_ATTR name ;]
[COMMON_NAME name ;]
[FUNCTION_GROUP name ;]
[STANDARD_LISTS {
SORT_BY sort-col(s);};};
where:
■ obj_name is the object that corresponds to the new database table created
in step 2.
■ table_name is the new database table.
■ att_name is the name of each attribute in the object that corresponds to
the new database table.
■ field_name is the field in the new database table that the attribute name
relates to, if it is different from the name of the attribute
■ value_type is the attribute’s data type.
See the appendix “Object Definition Syntax” for this statement’s complete
syntax.
6. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
where op is:
■ GT (greater than)
■ GE (greater than or equal to)
9. Add a command to a menu that allows you to open the new maintenance
window. Enter the following in the Tag field for the menu command you
add, where obj_name is the object that corresponds to the new database table:
obj_name_list_manager.manage_dispob
Example
b. Edit the description of the copied table to contain the new table’s name
and base name, a code field, and a date field that tracks when changes
were made. To comply with the naming convention, the new table name
will be zReason_Codes, not just Reason_Codes. The table base name will
be zrc. Changes are in italics.
TABLE zReason_Codes {
// Gives the Change Order’s reasons for close.
code STRING 30 uniq; // internal key
last_mod_dt LOCAL_TIME; // date changes were made
id INTEGER uniq KEY; // key id
del INTEGER nn; // 0=present,1=gone
sym HIER_SYM uniq S_KEY; // type symbol
b. Edit the description of the copied table index definition to change the
table name. Changes are in italics.
TABLE_INFO zReason_Codes {
INDEX SORT CLUSTER ASCENDING (ORDER_BY) UNIQUE sym;
INDEX SORT ASCENDING UNIQUE code;
}
Tip: You can copy the definition of the chgcat object (Change_Category) in
$NX_ROOT/bopcfg/majic/change.maj (UNIX) or
installation-directory\bopcfg\majic\change.maj (Windows) and modify it to
fit this example.
6. Follow the appropriate set of steps under Updating the Database Schema to
stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
Important! If you are using a Sybase, Oracle, or Informix database, be sure the
Reinitialize Database field is set to NO on the Configuration window.
7. Use Screen Painter to create the Reason Code List window, the Reason Code
Detail window, and the Reason Code Select window (see the chapter “Using
Screen Painter” if you need instructions on this and remaining steps).
8. For each field on the detail or select window, enter a value such as rc.sym
(that is, one with the prefix rc for the object name) for the Tag property. For
each search field on the list window, enter a value such as
list.@QBE.EQ.last_mod_dt for the Tag property.
9. Add a command named Reason Codes to the Administration, Change
Orders submenu. Enter the following in the Tag field for the menu command
you add:
rc_list_manager.manage_dispob
The database now has a new reference table, zReason_Codes, but it is empty.
Open it under the Unicenter Service Desk client interface and fill it with values
using the new windows. Then you can double-click the new reason code field on
Change Orders to select a reason code.
Activity associations enable you to define activity types that can be associated with
an attribute (field) of various objects (change orders, plan tasks, and so forth).
You can define activity associations for user-defined attributes. Only one activity
association per object attribute is supported. See Setting Up Activity Associations
in the CA Procedures Guide for more information about activity associations.
Use this procedure to define activity associations for user-defined attributes. This
procedure assumes that the user-defined field exists, and that an OBJECT
statement has been created in a .mod file in the $NX_ROOT/site/mods/majic
(UNIX) or installation-directory\site\mods\majic (Windows) directory:
1. Edit the function val_fieldupdate_site() for the OBJECT in the
$NX_ROOT/samples/function/object_site.mod (UNIX) or
installation-directory\samples\function\object_site.mod (Windows) directory,
where function is the Unicenter Service Desk function, such as Change
Orders, and object is the object-identifier, such as chg.
The new attribute must be added to the parameter list as follows:
OBJECT chg{
TRIGGERS {
//log field changes
POST_CI val_fieldupdate (persistent-id, audit_userid,
new_attribute) 40 ;
Example
6 Messages
Unicenter Service Desk provides a number of features that allow you to narrow
the focus of Request or Change Order Management so you can concentrate on
requests or change orders that apply to your immediate situation. One of these
functions stores queries that you can use to see relevant requests or change
orders when you open Unicenter Service Desk. Another lets you customize the
messages that notify key personnel of request or change order activities.
The first part of this chapter explains how you can provide stored queries that
focus on request or change orders related to the logged-in user and customize the
counter fields in the scoreboard area of the Unicenter Service Desk Windows
client and web interfaces. The second part explains how you can customize
activity notification messages to include attributes from the activity log object
and information on specific requests.
Each user can customize the counter fields that appear on his or her scoreboard.
(This is explained in the CA Procedures Guide.) However, the system
administrator must first define the various types of requests that can be counted
in these counter fields as stored queries. This is explained in Setting Up Stored
Queries in the Administrator Guide. Setting Up Stored Queries contains
instructions for defining new stored queries using Request and Change Order
Management.
Two of the fields that must be defined on the Stored Query Detail window are
Where Clause and Label. Both of these fields can contain stored queries that are
customized to the logged-in user. In Request and Change Order Management,
stored queries refer to objects and attributes, rather than to table names and
columns. A stored query that is customized to the logged-in user consists of two
parts:
■ The request object (cr). This is usually specified on the left of the equal (=)
sign. The syntax for this part of the stored query is:
att_name[.att_name...].SREL_att_name
■ The logged-in user (the instance of the cnt object for this user). This must be
specified on the right of the equal (=) sign if the requests are to be selected
based on an attribute of the logged-in user. The syntax for this part of the
stored query is:
@obj_name.att_name[.att_name...].SREL_att_name
This example identifies the location of the person assigned to handle a request (In
this example, the object name is omitted, which implies the cr object.):
assignee.location.id
where:
assignee The attribute in the cr object that maps to the assignee field in the Call_Req table.
The assignee attribute is defined in the cr object with SREL agt, which means it
refers to the agt factory. The agt factory is part of the cnt object definition.
location The attribute in the cnt object that maps to the c_l_id field in the Contact table.
The location attribute is defined in the cnt object with SREL loc, which means it
refers to the loc object.
id An attribute in the loc object. Note that the id attribute is not defined explicitly
but is always part of an object definition.
where:
cnt The object name, which is specified because the reference is to an object other
than cr.
location The attribute in the cnt object that maps to the c_l_id field in the Contact table.
The location attribute is defined in the cnt object with SREL loc, which means it
refers to the loc object.
id An attribute in the loc object. Note that the id attribute is not defined explicitly
but is always part of an object definition.
WHERE Clause
The following example demonstrates a value you can code in a WHERE clause:
assignee.location.id = @cnt.location.id AND active=1
This query selects all active requests where the assignee’s location is the same as
the location of the logged-in user.
Label
Attributes in the cnt object can be included in labels the same way they are
included in WHERE clauses. Here is an example of the use of an attribute in the
cnt object in a label:
@cnt.location.name Calls
This label will include the name of a location, for example, Phoenix, where
Phoenix is substituted for @cnt.location.name when the label is displayed on a
window. The label will be displayed as Phoenix Calls.
The IN Keyword
The IN keyword allows a stored query to reference two (or more) tables without
creating a join. This can result in significant efficiencies in executing the query. It
is coded as follows:
SREL_att_name IN ( value1 [, value2 [,…]] )
One use of IN is to avoid Cartesian products. For example, the following query
results in a Cartesian product and is very inefficient:
assignee.last_name LIKE ’MIS%’ OR group.last_name LIKE ’MIS%’
This query does not create a Cartesian product; in fact, it creates no joins at all.
Note that the parentheses that normally enclose the list of values on the right side
of IN can be omitted if there is only one value in the list.
Similarly, you should avoid joins in data partitions by converting a data partition
such as:
assignee.last_name LIKE ’Smith’
to:
assignee = 12345
This avoids the join with some loss in clarity. Using IN, the same partition can be
written as, which has the clarity of the first version, with almost the same
efficiency as the second version:
assignee.last_name IN ’Smith’
Time-Based Queries
Time spans can be used to create time-based stored queries. A time span specifies
a period of time, which can be relative to the current date. For example, a time
span could refer to today, yesterday, last week, or last month. A time span has a
name, such as TODAY or YESTERDAY. You refer to a time span in a stored
query by using either of two built-in functions:
■ StartAtTime (timespan-name) refers to the beginning of the period described
by the time span.
■ EndAtTime (timespan-name) refers to the end of the period described by the
time span.
The syntax rules for stored queries require that the time span name be enclosed
in single quotes, with each single quote preceded by a backslash. For example, to
refer to the beginning of last week, you would specify:
StartAtTime(\’LAST WEEK\’)
Start Time
Start Time specifies the beginning of the time span in absolute or relative terms.
There are five fields within the Start Time section of the Timespan Detail
window:
■ Year
■ Month
■ Day
■ Hour
■ Minute
The following table describes the Start Time fields of the Timespan Detail
window.
Field Description
Year An explicit year, such as 2000, or a relative year such as +1 (next
year) or –1 (last year)
Month An explicit month from 1 (January) to 12 (December), or a relative
month such as +1 (next month) or –1 (last month)
Day An explicit day from 1 to 31, or a relative day such as +1
(tomorrow) or –1 (yesterday)
Hour An explicit hour from 0 to 24, or a relative hour such as +1 (next
hour) or –1 (last hour)
Minute An explicit minute from 0 to 59, or a relative minute such as +1 or
–1
End Time
End Time specifies the end of the time span in absolute or relative terms. The
End Time fields of the Timespan Detail window are the same as the Start Time
fields of the Timespan Detail window (see Start Time earlier in this chapter).
Trigger Time
The Trigger Time field specifies when the WHERE clause of a stored query
containing a reference to the time span is recreated and the stored query
refreshed. Trigger Time must be relative to the current time as described in the
following table:
Field Description
Year Must a relative year from –1 (last year) to +36 (36 years from now)
Month Must a relative month from –1 (last month) to +11 (11 months from
now)
Day Must a relative day from –1 (yesterday) to +31 (31 days from now)
Hour Must a relative hour from –1 (last hour) to +23 (23 hours from
now)
Minute Must a relative minutes from +9 (9 minutes from now) to +59 (59
minutes from now)
Two of the fields that must be defined on the Activity Notifications Detail
window are Notification Message Title and Notification Message Body. Both of
these fields can contain attributes from the activity log object (alg) and can
identify the specific request related to the activity.
To include an attribute from the activity log object, include this in the
Notification Message Title or Notification Message Body field:
att_name
Note that the name of the object, alg, is the default and need not be specified. For
example, to include the type of activity in the message title, enter this in the
Notification Message Title field (along with the rest of what you want in the title):
type
To include the description of the activity in the message body, enter this in the
Notification Message Body field (along with the rest of what you want in the
body):
description
For messages to provide information on the specific request that triggered the
notification, the Notification Message Title or Notification Message Body fields
must contain an attribute in the activity log object that references the request
object. Enter this reference in this format:
@{call_req_id.cr_att_name}
where:
call_req_id The attribute in the activity log object that links it to a specific instantiation of the
request object (cr).
For example, to include the impact of the request in the message title, enter this in
the Notification Message Title field (along with the rest of what you want in the
title):
@{call_req_id.impact.sym}
To identify the affected resource in the message body, enter this in the
Notification Message Body field (along with the rest of what you want in the
body):
@{call_req_id.affected_resource.name}
Integration between Unicenter Service Desk and the Asset Management Option
is done automatically and activated when the Asset Management Option and the
Unicenter NSM clients are installed on the Unicenter Service Desk client
machine. Integration between ServiceIT and AimIT is done automatically and
activated when AimIT and the Unicenter NSM Framework clients are installed
on the ServiceIT client machine. (Unicenter NSM or Unicenter NSM Framework
must be installed on each client.)
When the Unicenter Service Desk or ServiceIT client is started, it looks to see if
the Asset Management Option and Unicenter NSM clients or AimIT and the
Unicenter NSM Framework clients are installed on the machine. If installed, the
Asset Management Option or AimIT button is selectable (active) on the Asset
Detail window. Clicking this button with an Asset Detail window populated
starts the Asset Management Option or AimIT and displays additional
information about that asset. This button is dimmed (inactive) if the Asset
Management Option and Unicenter NSM clients or AimIT and Unicenter NSM
Framework clients are not installed on the Unicenter Service Desk client.
FAXServe
The FAXServe notification method lets you send notification messages by fax to
recipients. Fax notification is supported for Windows only.
To use FAXServe, the Unicenter Service Desk Windows server must also be a
FAXServe client, meaning the FAXServe client must be installed on the same
machine as the Unicenter Service Desk server. In addition to being a FAXServe
client, the Unicenter Service Desk server can also act as the FAXServe server.
To set up fax notification, the Unicenter Service Desk administrator must perform
the following steps. We recommend that any non-essential applications be closed,
as the machine must be rebooted at the end of these procedures.
1. Change the Unicenter Service Desk daemons to run as a real user that also
appears in the FAXServe list of approved users. The Paradigm user is
recommended:
a. Open Services on the Unicenter Service Desk server.
b. Double-click a Unicenter Service Desk service.
c. Change the Log On As section from System Account to This Account,
and enter the Paradigm user name and password information.
d. Click OK.
e. Repeat for remaining Unicenter Service Desk services.
2. Add the Paradigm user to the FAXServe user list:
a. Verify that a FAXServe client is installed on your Unicenter Service Desk
server. The default directory of C:\FAXclnt is recommended.
b. Open the FAXServe Administrator by clicking Start on the taskbar, and
then choosing Programs, FAXserve Client.
c. Choose Default Server from the Tools menu to open your server window
and to set up your default server if you have not already done so. See the
FAXServe documentation for more information.
d. Right-click User List and choose New.
e. To add the user to the valid FAXServe User list, select the Paradigm user
from the Domain User(s) and click Add.
f. Click OK.
g. To add personal information to the user record, right-click the user in the
User List and choose Properties.
h. Click the Personal tab, enter the desired information and click OK. This is
where Unicenter Service Desk obtains information about the sender of
Unicenter Service Desk fax notifications.
3. Verify that you have the updated sendfax.exe in your FAXclnt install
directory. We recommend backing up the original. Contact Unicenter Service
Desk Technical Support if you do not have this executable.
4. Verify that the path to sendfax.exe is in the system PATH variable for your
Unicenter Service Desk server by checking the value and modifying if
necessary.
5. Add new System environment variable(s) to the Unicenter Service Desk
server.
a. Click Start on the taskbar, and then choose Settings, Control Panel.
b. Double-click System.
c. Click the Environment tab.
d. Click any System Variable.
e. Overwrite the Variable name with NX_FS_SERVER.
f. Overwrite the Value with the machine name of your FAXServe server.
g. Click Set.
h. To use an RTF template other than the default sample, repeat steps d-g,
creating a variable called NX_FS_TEMPLATE set to the fully qualified
file name of the RTF template desired.
i. Click OK to accept changes, and close the Control Panel.
A sample rich text format (RTF) template is provided in
%NX_ROOT%\samples\FAXserve. This is the default. The samples can be
used as models for other RTF templates that can be edited with almost any
word processing application.
6. Reboot the Unicenter Service Desk server.
Information about the recipient of the notification is obtained from the recipient’s
Unicenter Service Desk contact record. If the recipient’s fax number is not on the
internal phone network, any pre-dial numbers to reach an outside line must be
included in the Fax Number field on the Contact Detail. If the fax is going to an
internal extension, the extension alone is sufficient.
When the Unicenter Service Desk client is started, it looks to see if the Remote
Control Option or ControlIT is installed on the machine. If the Unicenter Service
Desk client finds the Remote Control Option or ControlIT installed on the
machine, then the Remote Control button is active on the Request Detail window.
When you click the Remote Control button, a Remote Control Option or
ControlIT login window is displayed and you must provide information that
identifies you to the remote computer. If the remote computer is identified in the
Asset field on the Request Detail window and its IP address is provided in the
System ID/IP Addr field on the Properties page of its Asset Detail record, the IP
address is filled in on this login window. Otherwise, you must provide the IP
address.
If the Unicenter Service Desk client does not see the Remote Control Option or
ControlIT installed on the machine, then the Remote Control button on the
Request Detail window is dimmed (inactive).
Version Control
8
Unicenter Service Desk version control helps you manage system customizations
affecting clients and secondary servers. This chapter describes how to use version
control on client and secondary server installations. Note that in this chapter,
most references to “client” apply to either a client or a secondary server.
When a client connects to the server, it sends a list of its controlled components to
the server. The server compares the list to its own master list. If it finds any
differences, it can notify the client, fail the connection attempt, or upgrade the
client to the correct version of the controlled components. Note that version
control is not a software delivery system; the upgrade feature simply provides a
way to correct minor synchronization problems between client and server.
There are two sets of version control files maintained. One set is for secondary
servers and the other is for all clients. The client components under version
control are defined in two files on the server.
The server_default.ver file is part of the standard installation package, and you
should not modify it. You can create the server_custom.ver file to control your
site’s own customizations.
Version control automatically creates and maintains similar files on each client.
On UNIX clients, these files are:
■ $NX_ROOT/site/default.ver
■ $NX_ROOT/site/mods/custom.ver
These files describe the components and versions currently installed on the client
or secondary server.
Requirements
This section describes the server and client requirements for using version
control.
Primary Server
Version control on the Unicenter Service Desk server consists of one executable,
pdm_ver_nxd, and two version control files, server_default.ver and
server_secondary.ver. If you want, you can create and maintain two custom
version control files, server_secondary_custom.ver and server_custom.ver, to
manage customizations. The default setting of the NX.env variable
NX_VER_CTL is UPGRADE, causing version control to upgrade the when a
discrepancy is detected (see Version Control Server Modes later in this chapter
for more information).
Secondary Server
Pdm_ver validates version request messages from clients by comparing the data
in the request with the secondary.ver and secondary_custom.ver files. If it detects
a component version discrepancy, it logs a message about the problem and, since
UPGRADE is enabled, the secondary server is upgraded. The contents of the
client notification message depend on the setting of the ver ctl option (see the
chapter “Options Manager” in the Administrator Guide for more information).
Client
The client software includes one executable, pdm_ver, and a default version file,
default.ver. Version control automatically creates a second version file
(custom.ver) on the client if a server_custom.ver file exists on the server. The two
client version files track the versions of standard and customized components
installed on the client.
Version checking is performed only for remote clients (there is no need for
version control on clients running on the server machine, since the server
contains the master copies of all components). When a client starts up, it reads its
version files and sends a message to the server listing all installed components
and their versions. If there is a component version discrepancy, the server
determines its response by checking the NX_VER_CTL environment variable (see
Version Control Server Modes later in this chapter for more information). The
server response tells the client whether to continue, terminate, or upgrade
components.
Note: Most clients will receive a download of files and option variables upon
initial startup.
Regardless of the method you use, you must update the version number in
server_custom.ver whenever you make a change to a customized component.
This allows version control to recognize clients that have a different version.
FAIL A version discrepancy causes the client to terminate. The user is prevented from
using Unicenter Service Desk until the client is manually updated.
UPGRADE When the server finds a version discrepancy, it asks the client to upgrade the
affected components to the correct version. If this upgrade is successful, the client
connection continues. Otherwise, the client terminates. The method of upgrade
depends on the version control type of the component. Valid settings are:
Setting Description
dir_ctl The client adds, updates, or deletes files in the directory from
copies provided by the server. The directory itself is never deleted.
file_ctl The client adds, updates, or deletes the file from a copy provided
by the server.
nxenv_ctl The client updates its NX.env file.
ver_ctl A ver_ctl component cannot be upgraded. A discrepancy in this
type of component causes the client to terminate without
connecting to the server.
DISABLE The server ignores version discrepancies. All clients are allowed to connect.
Tip: For more information about the structure and syntax of version control
files, look at the .ver files that are installed on your system in the site
subdirectory of the main Unicenter Service Desk installation directory. These
files have useful comments and example settings that may help you.
Use the following syntax to define each component. Items in italic represent data
that you supply, and are further described below. All other items represent
keywords that you must enter exactly as shown:
[ component-name ]
version = "x.x, yyyymmdd"
control-type
filename = "filename"
directory = "directory"
link = "link-directory"
source = "source-directory"
effectivity = "effect-spec"
checksum
min_release = "release"
max_release = "release"
component_type = "file-type"
o_mode = "owner-mode"
g_mode = "group-mode"
w_mode = "world-mode"
Parameters
[ component-name ] Specifies the name of an item under version control. The name must be unique
and enclosed in square brackets. component-name is not case-sensitive. This
parameter is required to begin a component definition.
version=“x.x, yyyymmd”
Specifies a version number (x.x) and a date (yyyymmdd) that define the version of
the component. This parameter is required, and must be enclosed in double
quotes. Version control verifies the version of a component by comparing the
version number and date on the server with the version number and date on the
client. Both version number and date must match for the component to be
considered in sync between client and server.
control-type Specifies the type of version control for this component. Valid settings are:
Setting Description
dir_ctl Specifies that the component represents a directory. You must
provide the directory parameter to specify the path to the
directory. On a Windows server, you can also provide the filename
parameter to specify a mask for files in the directory to upgrade
when an upgrade is required. The filename parameter is ignored
for dir_ctl components on a UNIX server. Subdirectories are not
upgraded on either UNIX or Windows.
file_ctl Specifies that the component represents a file. You must provide
the directory and filename parameters to specify the path to the
file.
nxenv_ctl Specifies that this component represents the client_nx.env file,
which is used to store client environment variables. Unicenter
Service Desk version control and the Options Manager
automatically maintain this file (see the chapter “Options
Manager” in the Administrator Guide for more information). There
is exactly one nxenv_ctl component, and its component name must
be CLIENT_NXENV.
ver_ctl This is the default control type. It specifies that the component is
generic; that is, not associated with any specific external object.
You can use a generic component to provide version control for
the client as a whole, or for a file or directory too large for an
automatic upgrade. Components with a control type of ver_ctl
cannot be upgraded; a version mismatch on a ver_ctl component
when the server is in UPGRADE mode causes the client connection
to fail.
filename=“filename” Specifies the name of a file under version control. This parameter is required for
file_ctl components, and is optional for direct control components. You can use
the filename parameter as a mask to control upgrades from directories associated
with dir_ctl components. For example, if the filename for a dir_ctl component is
*.README, then an upgrade from that directory would include only files ending
with “.README.”
directory=“directory” Specifies the path to the directory for dir_ctl components, or to the directory
containing the file for file_ctl components. This parameter is ignored for ver_ctl
and nxenv_ctl components. The directory path must be enclosed in quotes, and
can contain references to environment variables preceded with a $.
link=“link-directory” Specifies a link directory on the client in the same format described previously
for directory parameter. This parameter is optional for file_ctl and dir_ctl
components, and ignored for ver_ctl and nxenv_ctl components.
source=“source-directory”
Specifies a different directory where the server will retrieve files in the same
format described previously for the directory parameter. This parameter is used
to tell the server to retrieve the file from source-directory and deliver it to the
location specified by the directory parameter.
effectivity=“effect-spec” Specifies whether the client should get this component. It allows you to exclude
download to some clients. If a client is not included in the effectivity
specification, then the client will not get the component. This parameter is
optional. If it is omitted, all clients will receive the component. The effectivity
specification uses the following symbols:
Setting Description
+ Indicates to add a client type or group.
- Indicates to exclude a client type group.
WINNT
WIN95
WIN98
ME
WIN2000K
PC_CLIENTS
UNIX_CLIENTS
For example, the following specification indicates that WIN95 and WINNT
clients will get the component; however, UNIX will not:
effectivity = "+ WIN95 WINNT – UNIX_CLIENTS"
checksum This parameter indicates that the component will be upgraded if the checksum of
the component on the client does not match that the corresponding checksum on
the server. If it is applied to a directory, then checksum is applied to each file.
min_release=“release” Specifies the oldest and latest client this component will be distributed to.
max_release="release" Statements in the server_default.ver file define releases. These parameters are in
the following form:
Where Gaxx indicates the release, and the values following that are genlevels
associated with the release. The order indicates that GA50 is newer than GA45.
component_type=“file-type”
Specifies whether the file is an executable that is dependent upon the client’s
operating system. This parameter is used only during an upgrade operation. It
has two possible settings:
Setting Description
file This is the default component type. It specifies that files copied to
the client be obtained directly from the location on the server
indicated by the directory parameter.
exe_file Specifies that files copied to the client are obtained from a location
on the server that is dependent o the client’s operating system, as
shown below:
■ win95—Windows 95 and 98
■ winNT—Windows NT
■ sun4Sol—Solaris
■ hp—HP-UX
■ aix—AIX
Where these subdirectories are located depends on the setting of
the directory parameter. If this parameter is set, then they are
located under the indicated directory. Otherwise, they are located
under the bin directory of the main Unicenter Service Desk
installation directory.
g_mode=“group-mode” Specifies file access permissions for users in the file owner’s group (used for
UNIX clients only).
w_mode=“world-mode” Specifies file access permissions for users not in the file owner’s group (used for
UNIX clients only).
The three mode parameters allow different versions of the same executable to be
maintained on the server. They specify access controls on the file when copied to
the client. These parameters are used only during an upgrade operation. They
consist of one to three characters, with the following significance:
Setting Description
R Read
W Write
X Execute
You can specify any combination of one or more file access modes. On UNIX
clients, the file is given the access mode specified. On PC clients, the file is made
writeable or read-only, depending on whether w_mode was specified.
The Unicenter Service Desk objects supported by the API have a full set of
attributes associated with them. Each attribute corresponds to a column in a table
in the Unicenter Service Desk database. Therefore, you must know which
attributes are associated with which objects (see the appendix “Objects and
Attributes” for details).
This chapter discusses the requirements for using the API, as well as its
components and usage.
Requirements
The API runs on a Unicenter Service Desk server or client and is supported on all
platforms that support Unicenter Service Desk.
Before starting a process that uses the API, ensure the following:
■ The current release of the Unicenter Service Desk server is installed
■ You are operating on the Unicenter Service Desk server or a properly
installed Unicenter Service Desk client
■ On UNIX, NX_ROOT is properly set in the environment to point to the
directory in which Unicenter Service Desk is installed (for example, on
Solaris installations, this is typically /opt/CApdm)
■ ON UNIX, $NX_ROOT/bin is in your path
■ The user ID of the process that uses the API appears as a user ID in the
Unicenter Service Desk Contact table
Components
The API consists of three parts:
■ The API server
■ A gateway process called Specified Application Protocol Input/Output
(SAPIO)
■ The API library
API Server
On UNIX, the API server, api_svr_nxd, is a daemon that is part of the Unicenter
Service Desk installation. It resides in the $NX_ROOT/bin directory on the
Unicenter Service Desk server. It starts automatically during pdm_init and shuts
down when Unicenter Service Desk is shut down.
The API server handles all requests from the API library by accessing different
parts of the Unicenter Service Desk system. Upon initialization, the API server
makes a connection with the Unicenter Service Desk interprocess
message-passing facility. The API server uses this TCP/IP socket-based facility to
communicate with its slaves and other Unicenter Service Desk processes, such as
database agents. As the figure illustrates, the API server receives requests from
SAPIO and distributes them to its slaves. Under normal circumstances, the slaves
reply directly to SAPIO, bypassing the API server.
The default number of slaves is three. This number gives optimum performance
for most users, but increasing it may improve performance on multiprocessor
servers if the API is used heavily. The number can be changed by editing
$NX_ROOT/NX.env (UNIX) or installation-directory\NX.env (Windows),
changing NX_API_NUM_SLAVES, and then stopping and restarting Unicenter
Service Desk.
Note that a Unicenter Service Desk system can have only one API server, but
multiple user applications can connect to it. As the figure illustrates, each user
application has its own SAPIO process to connect it to the API server.
The SAPIO process provides a gateway between the API server and the API
library. This gateway insulates the user from changes in the underlying
Unicenter Service Desk implementation.
SAPIO is started from the parent process (the user application) when the user
sends a request. Messages are passed to and from SAPIO through pipes. SAPIO
connects with the API server process via the Unicenter Service Desk
message-passing facility.
API Library
The API library is the collection of available functions, written in ANSI C, that
you can use to access Unicenter Service Desk via SAPIO. These functions, which
are called from the user application, are used to create and send requests and to
receive and parse responses (the data returned from a request).
You use either high-level or low-level functions to create a request message. All
of the requests are encoded ASCII strings. After having properly built and
formatted the API message, the send_request function is called to send the
message to SAPIO. SAPIO forwards the message to the API server. SAPIO may
reject the request if licensing is violated or the user does not have access
privileges.
After extracting the data and the information needed, you must free up any
memory allocated from the library calls.
API functions are declared in nx_capi.h and stored in the nx_capi.a. library. See
Compiling API Programs at the end of this chapter for more information.
High-Level Functions
The following high-level functions are available. Most of them return an API
error indicating success or failure (see Attribute Lists for a description of all
attributes).
query_object The query_object function sends a QUERY request message. The user defines the
WHERE clause and sets the query flags.
api_err query_object (char *obj, char *where_clause,
int deref, int full_desc, int max_to_get,
pv_NXPV **response);
fetch_by_id The fetch_by_id function sends a QUERY request message. The user supplies the
integer internal ID of the object to be retrieved. Since various queries generally
return the internal ID of objects, this function allows the user to save some effort
fetching objects by their IDs directly.
api_err fetch_by_id (int id, char *obj, pv_NXPV **response);
Low-Level Functions
send_request The send_request function sends an API request to the API server. The request
must be properly built before calling this function. The request is a formatted API
message that contains request and data information necessary to complete the
request.
api_err send_request (pv_NXPV **request);
receive_response The receive_response function receives an API response from the API server. The
results are returned in an API-formatted message and must be parsed to obtain
log and data information.
api_err receive_response (pv_NXPV **result);
add_to_message The add_to_message function adds new label and value string fields to an
existing ASCII message.
api_err add_to_message (char *msg, int size,
char *label, char *value);
get_log_msg The get_log_msg function retrieves the log message from a pv_NXPV response.
char *get_log_msg (pv_NXPV *results);
set_err_handler The set_err_handler function allows you to change the current error handler to a
new error handling routing.
void set_err_handler (int (*err_handler) ( ));
handle_err The handle_err function is the default error handler. This routine writes to
standard error output. See set_err_handler above to see how to handle this
output.
void handle_err (char *location, char *err_code);
validate_enum The validate_enum function validates a parameter as a valid value. Use this
function to verify that values for impact, priority, and severity are between zero
and five.
char *validate_enum (int enum_value);
Parsing Tools
Parsing tools are also provided in the API library. They can be used to create
messages in the strict format required for strings in API messages. An
attribute-value node syntax is used to create both API request and response
messages. The format of responses and requests is similar. Therefore, the same
parsing tools are used to both create the requests and parse the replies.
The API syntax creates a tree for each part of the API message. The basis of the
syntax is that of a property value list data structure. Each node on the tree may
be one of the following:
■ A property name and value, such as:
label = value
Attribute-value lists are stored as nested linked lists. The parsing tools provide
functions to create, modify, search, and delete the attribute-value lists. The
parsing tools also provide functions to convert attribute-value lists to and from a
character string.
The API syntax creates a pv_NXPV node with the following definition:
typedef struct plist_nxpv {
char *name;
char *value;
struct plist_nxpv *first_child;
struct plist_nxpv *parent;
struct plist_nxpv *next_sib;
struct plist_nxpv *prev_sib;
} pv_NXPV;
You can use the following parsing functions with the pv_NXPV node
attribute-value lists:
■ To create and delete lists:
pv_NXPV *create_nxpv( );
void delete_nxpv( pv_NXPV *);
Tip: Parsing tools are unnecessary if strings are constructed correctly, as are
the sample queries in Sample Query Messages. Syntactically correct strings
can be constructed directly and converted to a nxpv tree with str_to_nxpv.
The reply can be converted to a string with nxpv_to_str. This is illustrated in
the sample test program under Processing Requests from a File.
Usage
You can use the functions in the API library to send requests, get responses, and
perform queries.
Sending Requests
Before you send a request to an API server, you must create an API message to
send. A request includes the following parameters:
Parameter Description
req_id A message request ID, which you assign to each request. This
request ID is most useful if it is a unique string. (You can
generate one from, for example, a combination of the client host
name, process ID, and a sequence number, or you can use the
generate_req_id function.)
obj The type of object. Each request specifies a valid object code for
each object. See the table below for object codes.
oper The type of operation to be performed. Each request specifies a
valid operation for the object. See the table below for operations.
Parameter Description
msg The data needed for the request. The data appears in a message
consisting of attribute-value pairs. The content of the message
depends on the object, its attributes, and the type of operation to
be performed. The message may contain attributes of the object
and other non-attribute parameters necessary to process the
request. The user ID of the person sending the request is
attached to the end of this section. (This user ID must be listed
in the Unicenter Service Desk Contact table in order to process
the request.)
The following table lists valid objects with their associated object codes and the
operations that you can perform on each object:
Similarly, you must use the escape character if you are entering braces or a
backslash as part of the string. The following example shows proper use of the
escape character:
log = "You can add another pair \{parameter=value\}"
You do not have to use the escape character with a single quote ( ' ), so an entry
such as this is valid:
log = "These are Dave's instructions."
However, single quotes and double quotes are handled differently if they are
part of the WHERE clause in an API query. In a WHERE clause, the escape
characters used depend on the SQL engine.
Getting Responses
The data returned from a request is in a format similar to that of a request and is
called a response. A response consists of these four parameters in this order:
Parameter Description
req_id The number assigned to the request.
req_status The status of the request. See the table below.
req_log Additional details about request processing appear here. This
string contains error messages or parsing warnings generated
during processing of the request.
msg The data that results from the operation. For example, for
response for a query, this section contains the data for matching
records. Some error responses will not have this section if the
complete content of the error appears in the req_log parameter.
The following table lists the possible values of the parameter req_status in a
response:
req_status Description
DATA_ERROR Error in attribute or attribute value
DOMAIN_VIOLATION Requested operation violated one or more data
partitioning restrictions
OK Requests was processed successfully
req_status Description
PROCESSING Response is an intermediate one from a query. See
Note below.
RETRY Record in request is locked. Try request again.
SYSTEM_FAILURE System failure prevented processing request.
WARNING Parsing error on attribute name or processing
warning.
Note: Intermediate responses for queries that return multiple responses have a
req_status of PROCESSING. The final response for such a query has a req_status
of OK. All responses other than those with a req_status of PROCESSING are the
final responses for the original request.
In the following sections, the examples that accompany the descriptions of the
attribute lists apply to one specific database, and index values of foreign key
fields shown in the examples are specific to that database.
Performing Queries
You can use the API library to query the following tables in the Unicenter Service
Desk database:
■ Contact (CT)
■ Network_Resource (NR)
The SQL WHERE clause forms the basis for your query. The WHERE clause is
the only required data field. The other data fields are optional.
The WHERE clause is not parsed by the API server, nor is it validated before
being sent to the database server. Therefore, you must specify a valid WHERE
clause or the response to your request produces a SYSTEM_FAILURE status. Use
the query reference tags in the tables earlier in this chapter (see Attribute Lists) to
create a valid WHERE clause. These tables list the attributes for each object and
provide any pertinent information about the field for each attribute.
The WHERE clause data must be in a format readable by the database and must
be input properly, following these rules:
■ The keyword WHERE must be entirely uppercase or entirely lowercase.
Mixed case (Where) is not allowed.
■ The entire WHERE clause must be enclosed in quotes.
■ The wildcard character (%) may be used with the LIKE feature when you are
searching for string fields.
Tip: You can use pdm_extract to dump a database table and obtain the
internal values.
Along with a valid WHERE clause, you must specify the following:
■ A request ID
■ The type of object to be queried: CT or NR
■ That the operation to be performed is QUERY
The WHERE clauses shown in this section are valid for all the supported
databases. SQL keywords are indicated by capital letters.
The following clause searches for contacts whose last name is Smith:
"WHERE c_last_name LIKE 'Smith'"
The following clause searches for a charge back value of 1, which means the
charge back is set:
"WHERE a_charge_back=1"
These are examples of complete API query messages. They apply to one specific
database; values of foreign key fields shown in the samples are specific to that
database.
The following query message returns all matching contact records whose last
name is Smith and whose user type is enumerated type 111. The returned records
are returned in full description format and contain dereferenced data:
req_id=15
obj="CT"
oper="QUERY"
msg={where="WHERE c_last_name LIKE 'Smith' AND
c_ctp_id = 111"
deref="yes"
full_desc="yes"}
Handling Errors
This section describes how to resolve problems and how the API server operates
under adverse conditions. To track down errors, follow these steps:
1. Check the status of the response. Errors or warnings are reported in the log
of the response.
2. Check the system log on Unicenter Service Desk. API errors are reported
there.
The following questions and answers describe common problems and the
system’s behavior:
What if the client Unicenter Service Desk notifies the client that a valid license is required to run
node is not licensed? Unicenter Service Desk.
What if the user ID is The API server returns an error to SAPIO, and SAPIO returns an error to you.
not valid? An error is logged in the system log. The user ID of the person sending the
requests must be in the Unicenter Service Desk Contact table.
What if the API server The API library function is not able to send requests. SAPIO fails when
is down? connecting to the API server. The API request appears to hang waiting for a
response. Run pdm_status to check if the API server is running.
What if Unicenter SAPIO fails when connecting to the interprocess message-passing facility. An
Service Desk is down? error is returned to you. The pipe is broken between SAPIO and the user
application.
What if the message An error is returned to you, with the maximum buffer size returned.
data exceeds the
maximum buffer size?
What if the data The API library function returns an error. The returned message states that
requested is locked another user has locked the current object. This is logged in the system log.
by another user? Locked records may cause long delays in the processing of API requests.
What if the data The API library functions return an error. The returned message states that the
requested is not part user does not have the proper privileges to perform the requested operation or
of the user’s access that certain attributes are read-only. This is logged in the response log.
privileges?
Error Format
Errors returned from the API server are packaged as part of the response data
like this:
req_id = 123
req_status = "DATA_ERROR" | "OK" | "PROCESSING" |
"RETRY" | "SYSTEM_FAILURE" | "WARNING"
req_log = "Error or warning message returned"
msg = {
return data
or list of data
or parameter= "value"
...
}
Attribute Lists
This section contains tables listing the attributes of each object and special
classifications of these attributes used in API message requests. Following the
tables are sample valid messages for that object.
Each table contains, for each attribute, a description, qualifications, a user code
(used to refer to an attribute in an API message unless the message is a QUERY
operation), a label, and a query reference tag (used for QUERY operations).
The following table lists attributes of assets. Use the user code for CREATE and
MODIFY operations and the query reference tag for QUERY operations.
Additional information about query parameters follows the table.
Asset objects have additional search attributes for MODIFY requests. You specify
a value for one of these search attributes, and if a record matches your search
specification, the values of additionally specified attributes are changed to the
new ones you specify. If more than one resource matches the search criteria, the
MODIFY request fails. The following table lists the search attributes and their
user codes.
When you create an asset, you are required to use only the resource name
(resource) and general resource class (grc) attributes. However, it is
recommended that you also use the MAC address (mac_addr) and system name
(sys_name) fields. The fields that you specify in the CREATE request are used to
create an asset record. These fields are also used to uniquely identify the asset
when you submit a MODIFY request. If you use the recommended fields as well
as the required fields, the asset record is uniquely identified more easily.
When you submit a CREATE request, the API determines if a resource with the
same attributes already exists by searching for an existing resource that has the
same resource name, system name, IP address (system ID), and MAC address.
Depending on whether the API finds a matching asset, one of the following
occurs:
■ If there is no match, a new asset is created.
■ If there is a single match, the existing resource is updated and the API
returns a message stating that the existing resource was updated instead of a
new resource being created.
■ If there is more than one match, the API returns a message stating that more
than one asset was identified and that the CREATE request failed. This
prevents you from creating more than one asset with the same resource
name, system name, IP address, and MAC address.
When you submit a MODIFY request, the API determines if the asset exists in
this way:
■ If you specified search fields in the request, the API searches for a resource
whose attribute values match all the search field attributes values you
included in the request.
■ If you did not specify search fields in the request, the API searches for a
resource whose attribute values match the attribute values you included in
the request. It tries to identify the resource using these fields: resource name
(resource), general resource class (grc), MAC address (mac_addr), and
system name (sys_name).
Depending on whether the API finds a matching asset, one of the following
occurs:
■ If there is no match, the MODIFY request becomes a CREATE request and a
new asset is created.
■ If there is a single match, the MODIFY request is executed.
■ If there is more than one match, the API returns a message indicating that
more than one asset was identified and the MODIFY request failed.
Note that if you want to modify the values in or add values to the identifying
fields (resource name, IP address, system name, and MAC address) in an existing
asset, you must use the search attributes to locate the record to be updated, and
then indicate the new attribute value. For example, the following request uses the
search attributes to locate the asset record where the system name is “penguin”
and the serial number is 17JQ5. It then modifies the expense code to be 32T:
Req_id = 3
obj = "NR"
oper = "MODIFY"
msg = {
SearchSysName = "penguin"
SearchSerialNum = "17JQ5"
expense_code = "32T"
user_id = "anne"
}
If you do not use the search attributes to locate the record you want to modify,
the API will create a new record instead of modifying an existing one.
The following table lists attributes of contacts. Use the user code for CREATE and
MODIFY operations and the query reference tag for QUERY operations.
Additional information about query parameters follows the table:
1 If one or more of the Search Fields are not used, one of these attributes is
required for MODIFY operations. These attributes are not required for
CREATE operations, but it is recommended that you use them.
2 The default value of this attribute is the user ID.
3 This attribute is required for CREATE and MODIFY operations.
Contact objects have additional search attributes for MODIFY requests. You
specify a value for one of these search attributes, and if a record matches your
search specification, the values of additionally specified attributes are changed to
the new ones you specify. If more than one contact matches the search criteria,
the MODIFY request fails. The following table lists the search attributes and their
user codes:
When you submit a CREATE request, the API determines if a contact with the
same attributes already exists by searching for an existing resource that has the
same last name, first name, middle name, user ID, and alias. Depending on
whether the API finds a matching contact, one of the following occurs:
■ If there is no match, a new contact is created.
■ If there is a single match, the existing contact is updated and the API returns
a message stating that the existing contact was updated instead of a new
contact being created.
■ If there is more than one match, the API returns a message stating that more
than one contact was identified and that the CREATE request failed. This
prevents you from creating more than one contact with the same identifying
fields.
When you submit a MODIFY request, the API determines if the contact exists in
this way:
■ If you specified search attributes in the request, the API searches for a contact
whose attribute values match all the search field attributes values you
included in the request.
■ If you did not specify search attributes in the request, the API searches for a
contact whose attribute values match the attribute values you included in the
request. It tries to identify the contact using the last name, first name, middle
name, user ID, and alias fields.
Depending on whether the API finds a matching contact, one of the following
occurs:
■ If there is no match, the MODIFY request becomes a CREATE request and a
new contact is created.
■ If there is a single match, the MODIFY request is executed.
■ If there is more than one match, the API returns a message indicating that
more than one contact was identified and the MODIFY request failed.
Note that if you want to modify the values in or add values to the identifying
fields (last name, first name, middle name, user ID, and alias) in an existing
contact, you must use the search attributes to locate the record to be updated,
and then indicate the new attribute value. For example, the following request
uses the search attributes to locate the contact record where the last name is
Reese and the first name is Anne. It then modifies the alias to be annie and the
user ID to be anne:
req_id = 1
obj = "CT"
oper = "MODIFY"
msg = {
SearchFName = "Anne"
SearchLName = "Reese"
alt_name = "annie"
user_id = "anne"
}
If you do not use the search attributes to locate the record you want to modify,
the API will create a new record instead of modifying an existing one.
Note: The examples here are provided as illustrations, not production code. They
have been compiled and tested as illustrations, but they have not been subjected
to the rigor of production testing.
This section provides a sample program for processing requests from a file:
/* process request from file */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "nx_capi.h"
if (!fName)
{
printf("Null file name.\n");
return;
}
/* send request */
if (FAILURE == send_request(req))
{
printf("Request error.\n");
delete_nxpv (req);
}
else
{
/* receive response -- could be a series of responses
from a query */
char statusStr[20];
do
{
pv_NXPV * resp = 0;
pv_NXPV * status = 0;
else
{
/* convert response tree to string */
nxpv_to_str(resp, buff, sizeof(buff));
printf("Reponse:\n%s\n", buff);
status = find_child_nxpv(resp, stat_label);
if (!status)
{
printf("No status.\n");
break;
}
strcpy(statusStr, status->value);
delete_nxpv(resp);
resp = 0;
}
} while(!strcmp(statusStr, "PROCESSING"));
}
/* clean up heap */ delete_nxpv (req);
}
} /* end of processFile */
exit(0);
} /* end of main */
Sample Files
Creating a Query
This section provides a sample program for creating a query using query_object:
/* Use query_object */
#include <stdio.h>
#include "nx_capi.h"
if (argc < 6)
{
printf("5 parameters required.\n");
exit(0);
}
/* send query */
if (FAILURE == query_object(argv[1], /* obj */
argv[2], /* where clause */
strtol(argv[3], 0, 10), /* deref flag */
strtol(argv[4], 0, 10), /* full desc flag */
strtol(argv[5], 0, 10), /* max to get */
&resp
))
{
printf("Error querying object.\n");
exit(0);
}
else
{
/* step through individual responses packed in
sibling-linked list, deleting nodes as they are read */
char buff[MAX_FILE_SIZE];
pv_NXPV * oneToDelete = 0;
while (resp)
{
nxpv_to_str(resp, buff, sizeof(buff));
printf("Reponse\n%s\n", buff);
oneToDelete = resp;
resp = resp->next_sib;
delete_nxpv (oneToDelete);
}
}
exit(0);
} /* end of main */
Compile the Unicenter Service Desk C language API with any ANSI-compliant C
compiler. Since Unicenter Service Desk is a networked client/server application,
the nx_capi library uses several network functions that may require special
linking. In particular, gethostbyname, inet_addr, inet_ntoa, and gethostname.
The first example was compiled with the following command using the Sun
Solaris Sparcworks 3.0.1 C compiler:
cc -Xc procfile.c nx_capi.a -lnsl -o procfile
Note the -Xc flag for ANSI compliance and the -lnsl parameter to link in libnsl,
the library that contains the network functions on Solaris platforms. Other
platforms and compilers will require variations on this compile line. Consult
your compiler and operating system manuals for further information.
In addition to the library, nx_capi.a, four header files are required: nx_capi.h,
nx_defs.h, nx_err.h, and nx_parser.h. These files can be found in
$NX_ROOT/sdk/lib and $NX_ROOT/sdk/include (UNIX) or
installation-directory\sdk\lib and installation-directory\sdk\include (Windows) on
the Unicenter Service Desk server. The files can be copied to any convenient
location for development, although on some systems ranlib may have to be run
against nx_capi.a. Sample programs can be found in
$NX_ROOT/samples/sdk/api_comm (UNIX) or
installation-directory\samples\sdk\api_comm (Windows).
Important! Although several of the tables in this appendix are obsolete, for backward
compatibility, or reserved for future use, it is important that you not delete these—or any
other table—from the database schema. You can add tables and modify the existing tables,
but never delete any of the tables documented in this appendix.
A_Comment Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Act_Log Table
History of activities associated with a request. Types of activities are listed in the
Act_Type table.
■ SQL Name—act_log
■ Object—alg
Act_Tpl Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Act_Tpl_Ent Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Act_Type Table
Request and change order activity types. Identifies the activities that can be used
to create, update, and resolve requests and change orders. Controls whether the
creation of the activity automatically generates a notification to those contacts
specified in the activity notification and what the notification level and message
are.
■ SQL Name—act_type
■ Object—aty
Act_Type_Assoc Table
Used for activity associations.
■ SQL Name—atyp_asc
■ Object—act_type_assoc
Action Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Action_Delay Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Action_Delay_Code Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Action_Status Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Active_Boolean_Table Table
Table to translate 0 and 1 to whatever the user wants to see.
■ SQL Name—actbool
■ Object—actbool
Active_Reverse_Boolean_Table Table
Table to translate 0 and 1 to whatever the user wants to see.
■ SQL Name—acrtbool
■ Object—actrbool
AD_Comment Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Animator Table
Internal table used to manage event firing.
■ SQL Name—anima
■ Object—ANI
Asset_Assignment Table
Table of hierarchical relationships between assets.
■ SQL Name—hier
■ Object—hier
Atomic_Condition
Stores conditional statements.
■ SQL Name—atomic_cond
■ Object—atomic_cond
Attached_Events Table
Table of events attached to requests and change orders.
■ SQL Name—att_evt
■ Object—atev
Attachment Table
Records stored attachments.
■ SQL Name—attmnt
■ Object—attmnt
Attachment_Lrel
Connects stored attachments to change orders and requests in many-to-many
relationships
■ SQL Name—attmnt_lrel
■ Object—attmnt_lrel
Attribute_Name Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Audit_Log Table
Contains all audit log entries.
■ SQL Name—audit_log
■ Object—audlog
Behavior_Template Table
Template for behaviors associated with workflows.
■ SQL Name—bhvtpl
■ Object—bhvtpl
Boolean_Table Table
Table to translate 0 and 1 to whatever the user wants to see.
■ SQL Name—bool_tab
■ Object—bool
Bop_Workshift Table
Business hours, or workshifts, for events.
■ SQL Name—bpwshft
■ Object—wrkshft
Call_Req Table
Request Management analyst’s recording of a user issue. Users are of type
customer. A user’s system configuration or environment consists of network
assets associated with the user.
■ SQL Name—call_req
■ Object—cr
Call_Req_Type Table
Request type. This table is not currently used but is intended for future use.
■ SQL Name—crt
■ Object—crt
Call_Solution Table
This table exists in the schema for backward compatibility only. Althoug there is
an interface to it, you should not use this table at all; however, it is important that
you not delete it from the schema.
■ SQL Name—crsol
■ Object—crsol
Cause Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Change_Act_Log
Change order activity log.
■ SQL Name—chgalg
■ Object—chgalg
Change_Category Table
Change order categories.
■ SQL Name—chgcat
■ Object—chgcat
Change_Request Table
Recording of a user service or change order.
■ SQL Name—chg
■ Object—chg
Change_Status Table
Change order status. Valid values are created, approved, implemented, verified,
closed.
■ SQL Name—chgstat
■ Object—chgstat
CL_Comment Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Close_Entry Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Column_Name Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Computer_Extension Table
Asset extensions for assets.
■ SQL Name—cpex
■ Object—cpex
Contact Table
Lists pertinent information about individuals or organizations who are
responsible for some network resource. A contact can be part of the organization
managing the network or external to the managing organization.
■ SQL Name—ctct
■ Object—cnt
Contact_Method Table
Defines contact method types. The cm_template field is a command string that
gets executed as a script (with environment variables set) by the notify
subsystem.
■ SQL Name—ct_mth
■ Object—cmth
Contact_Type Table
This is an OSI Forum-defined table. OSI Forum set specific contents for this table.
■ SQL Name—ct_ty
■ Object—ctp
Controlled_Table Table
Lists the tables for which you can use data partitions to control access to.
■ SQL Name—ctab
■ Object—ctab
Cr_Call_Timers Table
Controls behavior of automatic request timer. A request timer acts like a stop
watch with various thresholds that give the help desk analyst a visual or auditory
indication of elapsed time.
■ SQL Name—crctmr
■ Object—ctimer
Cr_Status Table
Request status. Lists the status of the request. You can add to this as desired. Lets
the user control whether the request is active or inactive when it is changed to
this status.
■ SQL Name—cr_stat
■ Object—crs
CR_Stored_Queries Table
Request stored queries. System administrators can add to this table as desired.
Determines which queries can be used by help desk analysts to customize their
scoreboards.
■ SQL Name—crsq
■ Object—crsq
CT_Comment Table
Contact comment table.This table is not currently used but is intended for future
use.
■ SQL Name—ctct_com
■ Object—ct
D_PAINTER Table
Forms table.
■ SQL Name—D_PAINTER
Delegation_Server Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Delegation_Status Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Delegation_Transport Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Document_Repository Table
Contains Information on document repositories, which are used to store
attachments.
■ SQL Name—doc_rep
■ Object—doc_rep
Domain Table
Lists the names and descriptions of the data partitions themselves.
■ SQL Name—dmn
■ Object—dmn
Domain_Constraint Table
Lists the constraints associated with a particular data partition and controlled
table.
■ SQL Name—dcon
■ Object—dcon
Domain_Constraint_Type Table
Lists the types of constaints that can be associated with a particular data partition
and controlled table.
■ SQL Name—dcon_typ
■ Object—dcon_typ
Escalation_Control Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Escalation_Entry_Log Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Escalation_Level Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Event_Delay Table
Contains service type event delays.
■ SQL Name—evt_dly
■ Object—evtdly
Event_Delay_Type Table
Contains service type event delay types.
■ SQL Name—evtdlytp
■ Object—evtdlytp
Events Table
Events available for attachment to requests, change orders, and service types.
■ SQL Name—evt
■ Object—evt
Expense_Code_Opt Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Failure Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
General_Resource_Class Table
Look up table. Controls classification of network assets. Provides default priority
for assets. Chronic thresholds are incorporated here. Chronic thresholds designate
a threshold of problem frequency, which is used to help default problem priority.
Default chronic priorities are set based on the general asset class of the problem
asset:
■ If an asset is not chronic, the default priority of a problem on the asset comes
from the record of the asset itself, that is, network elements or services
■ If the asset is chronic, the default priority comes from the ct_priority column
of this table. The operator can typically override the default based on other
circumstances.
■ SQL Name—gen_res
■ Object—grc
Geo_Coord_Type Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
GRC_Comment Table
Asset class comment table. This table is not currently used but is intended for
future use.
■ SQL Name—gr_com
Group_Member Table
Identifies contacts in a group.
■ SQL Name—grpmem
■ Object—grpmem
Impact Table
Contains the measure of the significance of an event by the user. Incident reports
use this measure.
■ SQL Name—impact
■ Object—imp
Initial_Report Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Interface
Interface used for creating requests and change orders.
■ SQL Name—interface
■ Object—intfc
Internal_Organization Table
An organization within the network management organization. Typically, this is
an organization prepared to take responsibility for a ticket.
■ SQL Name—int_org
■ Object—orf
IR_Order_By Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
IR_Stored_wc Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Key_Control Table
Table of sequence numbers for requests, change orders, tickets, and foreign keys.
■ SQL Name—kc
Knowledge_Keywords Table
This table exists in the schema for backward compatibility only. Althoug there is
an interface to it, you should not use this table at all; however, it is important that
you not delete it from the schema.
■ SQL Name—km_word
■ Object—kwrd
Knowledge_Lrel_Table Table
This table exists in the schema for backward compatibility only. Althoug there is
an interface to it, you should not use this table at all; however, it is important that
you not delete it from the schema.
■ SQL Name—km_lrel
■ Object—kmlrel
Location Table
Records location information.
■ SQL Name—loc
■ Object—loc
Location_Type Table
This is an OSI Forum-defined table. OSI Forum set specific contents for this table.
■ SQL Name—loc_ty
Lrel_Table Table
Contains relationships among notifications and macros.
■ SQL Name—lrel
■ Object—lrel1
Manufacturer Table
Look up table. Controls manufacturer references.
■ SQL Name—man
■ Object—mfr
Manufacturer_Model Table
Look up table. Manufacturer and model are combined key and unique in
combination. Controls manufacturer-model combinations.
■ SQL Name—man_mod
■ Object—mfrmod
Mdl_Comment Table
Manufacturer Model comment table. This table is not currently used but is
intended for future use.
■ SQL Name—mdl_com
Network_Resource Table
Network assets consist of three types: devices (elements), services, and software.
Any one of these types can be the subject of a request and each is a recognizable
entity in the managed system.
■ SQL Name—net_res
■ Object—nr
Some of the attributes of the asset attributes are more appropriate to one type
than another. Locations probably do not generally apply to services. Providers,
following the OSI-Forum definition, are only for services. Vendors are only for
devices and software. Although attributing a provider to an element or assigning
a location to a service probably is nonstandard, it is not an error.
■ Network Element Family—Combination of INMS network element and OSI
equipment.
■ Service Family—Telecommunications or data network capabilities that you
buy or leases from a service provider or provide yourself. Identical services
can be implemented by different network elements or the same network
element can implement several distinct services.
■ Software Family—Software used or identified in some way by the system.
Note_Board Table
Message board (announcements) on the main menu.
■ SQL Name—cnote
■ Object—cnote
Notification_Urgency Table
Maps internal enums to strings that represent levels of notification urgency for
contacts.
■ SQL Name—noturg
■ Object—noturg
Notify_Log_Header Table
Tracks each notification.
■ SQL Name—not_log
■ Object—lr
Notify_Msg Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Notify_Object_Attr Table
Lists object attributes that can receive notifications.
■ SQL Name—ntfl
■ Object—ntfl
Notify_Rule Table
Indicates which Notification_Attempt_Seq to use for a particular ticket
notification. The table is effectively keyed on priority and reason.
■ SQL Name—not_rle
NR_Comment Table
Notify rule comment table. This table is not currently used but is intended for
future use.
■ SQL Name—nr_com
■ Object—nr_com
Options Table
One row for every option added to Request Management, Change Order
Management, any other BOP-related information, Problem Management, and
Unicenter Service Desk delegation.
■ SQL Name—options
■ Object—options
Priority Table
Look up table. The priority reflects the timeframe in which a ticket must be
resolved. For the ticket, it represents the highest priority of any problem attached
to the ticket. Problem priorities are derived from the scope (impact) and severity
of the problem.
■ SQL Name—pri
■ Object—pri
Prob_Category Table
Request areas. Category of the user’s issue.
■ SQL Name—prob_ctg
■ Object—pcat
Property Table
Contains change order properties.
■ SQL Name—prp
■ Object—prp
Property_Template Table
Contains change order property templates.
■ SQL Name—prptpl
■ Object—prptpl
Recipient_Type Table
Maps internal enums to strings that locate recipient name for messages handled
by the notification system.
■ SQL Name—notrty
Remote_Ref
Remote references. Used for smart hooks. Determines what command to execute.
There are different commands for UNIX or Windows servers and PC clients
using the same smart hook. Can apply security to smart hook.
■ SQL Name—rem_ref
■ Object—rrf
Req_Property Table
Contains request properties.
■ SQL Name—cr_prp
■ Object—cr_prp
Req_Property_Template Table
Request property template.
■ SQL Name—cr_prptpl
■ Object—cr_prptpl
Resolution_Code Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Resource_Family Table
Look up table. Assigns a network asset to an asset family. Valid families are
device, service, software, personnel.
■ SQL Name—resfam
■ Object—nrf
Resource_Service_Status Table
Look up table. Controls service status. Appropriate values are Spare, In repair.
■ SQL Name—ressst
■ Object—rss
Reverse_Boolean_Table Table
Table to show 0 as TRUE and 1 as FALSE. This table is not currently used but is
intended for future use.
■ SQL Name—rbooltab
Rpt_Meth Table
Output method for reports.
■ SQL Name—rptmth
■ Object—rptm
Sequence_Control Table
Used to determine what to use for a prefix and suffix when generating request
and change order numbers. Users cannot create new records or delete records in
this table.
■ SQL Name—seqctl
■ Object—seq
Service_Desc Table
Request and change order service types. Used as service level agreements in
requests and change orders. Can be used to associate the type of service a request
and change order receive.
■ SQL Name—srv_desc
■ Object—sdsc
Service_Level_Agreement Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Severity Table
Represents the measure of the effect of a problem on the network.
■ SQL Name—sevrty
■ Object—sev
Site Table
Sites are groupings of locations. Sites do not have locations as such, since they
contain many locations. If a site must have a location, it is the location of the site
contact.
■ SQL Name—site
■ Object—site
SLA_Progress_Level Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
SLA_Progress_Notification_Log Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
SLA_Template Table
Service level agreement templates.
■ SQL Name—slatpl
■ Object—slatpl
Software_Extension Table
Asset extensions for software.
■ SQL Name—swex
■ Object—swex
Spell_Macro Table
Macro code table.
■ SQL Name—splmac
■ Object—macro
Spell_Macro_Type Table
Macro code types.
■ SQL Name—splmactp
■ Object—macro_type
SQL_Script Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Survey
Stores survey information.
■ SQL Name—survey
■ Object—survey
Survey_Answer
Stores survey responses.
■ SQL Name—survey_answer
■ Object—svy_ans
Survey_Answer_Template
Template for survey responses.
■ SQL Name—survey_atpl
■ Object—svy_atpl
Survey_Question
Stores survey questions.
■ SQL Name—survey_question
■ Object—svy_ques
Survey_Question_Template
Template for survey questions.
■ SQL Name—survey_qtpl
■ Object—svy_qtpl
Survey_Template
Template for surveys.
■ SQL Name—survey_tpl
■ Object—svy_tpl
System_Defaults Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Table_Name Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Task_Status Table
Contains change order workflow task status.
■ SQL Name—tskstat
■ Object—tskstat
Task_Type Table
Contains change order workflow task types.
■ SQL Name—tskty
■ Object—tskty
Ticket_Status Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Timespan
Lists timespans.
■ SQL Name—tspan
■ Object—tspan
Timezone Table
Lists time zones.
■ SQL Name—tz
■ Object—tz
Transition_Points Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Trouble_Code Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Trouble_Ticket Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
TT_Comment Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
TT_Order_By Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
TT_Stored_wc Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
TT_Template Table
This table is obsolete, and there is no interface to it. You should not use this table
at all; however, it is important that you not delete it from the schema.
Urgency Table
Urgency measures the importance of the user task supported by the ticket.
■ SQL Name—urgncy
■ Object—urg
User_Query
Stores user queries.
■ SQL Name—usq
■ Object—usq
V_Comment Table
Standard comment table. This table is not currently used but is intended for
future use.
■ SQL Name—v_com
Vendor_Provider Table
A vendor is the seller of a piece of hardware, software, or maintenance for
software or hardware. A provider supplies network service which is used
internally or passed along to a customer.
■ SQL Name—vnd_prov
■ Object—vp
Vendor_Provider_Type Table
OSI/NM Forum defines types for providers. These are reflected here. Additional
types for vendors will also appear here. The OSI string can be stored to maintain
the correspondence when necessary.
■ SQL Name—vndpty
■ Object—vpt
Workflow_Task Table
Contains change order workflow tasks.
■ SQL Name—wf
■ Object—wf
Workflow_Task_Template Table
Contains change order workflow task templates.
■ SQL Name—wftpl
■ Object—wftpl
ANI Object
This object is associated with the Animator table in the database schema.
act_com Object
This object is associated with the A_Comment table in the database schema.
act_stat Object
This object is associated with the Action_Status table in the database schema.
act_type_assoc Object
This object is associated with the Act_Type_Assoc table in the database schema.
actbool Object
This object is associated with the Active_Boolean_Table table in the database
schema.
actrbool Object
This object is associated with the Active_Reverse_Boolean_Table table in the
database schema.
alg Object
This object is associated with the Act_Log table in the database schema.
atev Object
This object is associated with the Attached_Events table in the database schema.
atomic_cond Object
This object is associated with the Atomic_Condition table in the database schema.
attmnt Object
This object is associated with the Attachment table in the database schema.
attmnt_lrel Object
This object is associated with the Attachment_Lrel table in the database schema.
aty Object
This object is associated with the Act_Type table in the database schema.
audlog Object
This object is associated with the Audit_Log table in the database schema.
bhvtpl Object
This object is associated with the Behavior_Template table in the database
schema.
bool Object
This object is associated with the Boolean_Table table in the database schema.
chg Object
This object is associated with the Change_Request table in the database schema.
chgalg Object
This object is associated with the Change_Act_Log table in the database schema.
chgcat Object
This object is associated with the Change_Category table in the database schema.
chgstat Object
This object is associated with the Change_Status table in the database schema.
close_entry Object
This object is associated with the Close_Entry table in the database schema.
cmth Object
This object is associated with the Contact_Method table in the database schema.
cnote Object
This object is associated with the Note_Board table in the database schema.
cnt Object
This object is associated with the Contact table in the database schema.
cpex Object
This object is associated with the Computer_Extension table in the database
schema.
cr Object
This object is associated with the Call_Req table in the database schema.
cr_prp Object
This object is associated with the Req_Property table in the database schema.
cr_prptpl Object
This object is associated with the Req_Property_Template table in the database
schema.
crs Object
This object is associated with the Cr_Status table in the database schema.
crsol Object
This object is associated with the Call_Solution table in the database schema.
crsq Object
This object is associated with the Cr_Stored_Queries table in the database
schema.
crt Object
This object is associated with the Call_Req_Type table in the database schema.
ctab Object
This object is associated with the Controlled_Table table in the database schema.
ctimer Object
This object is associated with the Cr_Call_Timers table in the database schema.
ctp Object
This object is associated with the Contact_Type table in the database schema.
dcon Object
This object is associated with the Domain_Constraint table in the database
schema.
dcon_typ Object
This object is associated with the Domain_Constraint_Type table in the database
schema.
dlgsrvr Object
This object is associated with the Delegation_Server table in the database schema.
dmn Object
This object is associated with the Domain table in the database schema.
doc_rep Object
This object is associated with the Document_Repository table in the database
schema.
evt Object
This object is associated with the Events table in the database schema.
evtdly Object
This object is associated with the Event_Delay table in the database schema.
evtdlytp Object
This object is associated with the Event_Delay_Type table in the database
schema.
fail_t Object
This object is associated with the Failure table in the database schema.
grc Object
This object is associated with the General_Resource_Class table in the database
schema.
grpmem Object
This object is associated with the Group_Member table in the database schema.
hier Object
This object is associated with the Asset_Assignment table in the database schema.
imp Object
This object is associated with the Impact table in the database schema.
intfc Object
This object is associated with the Interface table in the database schema.
ir Object
This object is associated with the Initial_Report table in the database schema.
kmlrel Object
This object is associated with the Knowledge_Lrel_Table table in the database
schema.
kwrd Object
This object is associated with the Knowledge_Keywords table in the database
schema.
loc Object
This object is associated with the Location table in the database schema.
lr Object
This object is associated with the Notify_Log_Header table in the database
schema.
lrel1 Object
This object is associated with the Lrel_Table table in the database schema.
macro Object
This object is associated with the Spell_Macro table in the database schema.
macro_type Object
This object is associated with the Spell_Macro_Type table in the database schema.
mfr Object
This object is associated with the Manufacturer table in the database schema.
mfrmod Object
This object is associated with the Manufacturer_Model table in the database
schema.
noturg Object
This object is associated with the Notification_Urgency table in the database
schema.
nr Object
This object is associated with the Network_Resource table in the database
schema.
nr_com Object
This object is associated with the NR_Comment table in the database schema.
nrf Object
This object is associated with the Resource_Family table in the database schema.
ntfl Object
This object is associated with the Notify_Object_Attr table in the database
schema.
options Object
This object is associated with the Options table in the database schema.
org Object
This object is associated with the Internal_Organization table in the database
schema.
pcat Object
This object is associated with the Prob_Category table in the database schema.
pri Object
This object is associated with the Priority table in the database schema.
prod_list Object
This object is associated with the Prod_List table in the database schema.
prp Object
This object is associated with the Property table in the database schema.
prptpl Object
This object is associated with the Property_Template table in the database
schema.
rescde Object
This object is associated with the Resolution_Code table in the database schema.
rptm Object
This object is associated with the Rpt_Meth table in the database schema.
rrf Object
This object is associated with the Remote_Ref table in the database schema.
rss Object
This object is associated with the Resource_Service_Status table in the database
schema.
sdsc Object
This object is associated with the Service_Desc table in the database schema.
seq Object
This object is associated with the Sequence_Control table in the database schema.
sev Object
This object is associated with the Severity table in the database schema.
site Object
This object is associated with the Site table in the database schema.
sla Object
This object is associated with the Service_Level_Agreement table in the database
schema.
slatpl Object
This object is associated with the SLA_Template table in the database schema.
survey Object
This object is associated with the Survey table in the database schema.
svy_ans Object
This object is associated with the Survey_Answer table in the database schema.
svy_atpl Object
This object is associated with the Survey_Answer_Template table in the database
schema.
svy_qtpl Object
This object is associated with the Survey_Question_Template table in the
database schema.
svy_ques Object
This object is associated with the Survey_Question table in the database schema.
svy_tpl Object
This object is associated with the Survey_Template table in the database schema.
swex Object
This object is associated with the Software_Extension table in the database
schema.
tcat Object
This object is associated with the Trouble_Code table in the database schema.
tskstat Object
This object is associated with the Task_Status table in the database schema.
tskty Object
This object is associated with the Task_Type table in the database schema.
tspan Object
This object is associated with the Timespan table in the database schema.
tt Object
This object is associated with the Trouble_Ticket table in the database schema.
tt_act Object
This object is associated with the Action table in the database schema.
tt_com Object
This object is associated with the TT_Comment table in the database schema.
tt_esclvl Object
This object is associated with the Escalation_Level table in the database schema.
tt_stat Object
This object is associated with the Ticket_Status table in the database schema.
tttpl Object
This object is associated with the TT_Template table in the database schema.
tz Object
This object is associated with the Timezone table in the database schema.
urg Object
This object is associated with the Urgency table in the database schema.
usq Object
This object is associated with the User_Query table in the database schema.
vp Object
This object is associated with the Vendor_Provider table in the database schema.
vpt Object
This object is associated with the Vendor_Provider_Type table in the database
schema.
wf Object
This object is associated with the Workflow_Task table in the database schema.
wftpl Object
This object is associated with the Workflow_Task_Template table in the database
schema.
wrkshft Object
This object is associated with the Bop_Workshift table in the database schema.
C References
This appendix provides several tables that allow you to easily cross-reference
table names, SQL names, and object names. See the appendix “Data Element
Dictionary” for a complete definition of the tables in the schema. See the
appendix “Objects and Attributes” for the object definitions.
TABLE Statement
Defines the logical tables in the Unicenter Service Desk database schema and the
logical columns (fields) in those tables. These logical tables and columns are then
mapped to the physical tables and columns used by your database management
system in a mapping statement that follows the TABLE statement.
Note: If you define a new table, you must define a mapping statement for that
table. This is illustrated at the end of this appendix (see Mapping Statement),
followed by an example that combines the TABLE, TABLE_INFO, and mapping
statements.
Syntax
TABLE table_name {field value_type field_attributes; [...]}
Arguments
TABLE Introduces the TABLE statement. Must be uppercase. You must have one TABLE
statement for each logical table in the schema.
table_name The name of the database table, for example, Call_Req. If adding a database
table, you can specify any name beginning with a lowercase letter z. (This avoids
possible conflict with existing and future Unicenter Service Desk table names.) If
changing an existing table, find the table in schema.sch and use the same name.
field The name of a logical column in the table, for example, id or desc. You must
identify each column by name. If adding a table or adding a column to an
existing table, you can specify any name beginning with a lowercase letter z;
however, field names must not end with the characters “_f.” (This avoids
possible conflict with existing and future Unicenter Service Desk column names.)
If changing an existing column, find the column in schema.sch and use the same
name.
Value Description
DURATION A period of time, measured in seconds.
INTEGER A 32-bit number.
LOCAL_TIME The number of seconds since January 1, 1970. Unicenter
Service Desk automatically reformats this data type to the
designated date format, for example mm/dd/yy hh:mm:ss.
STRING nn A string that is nn characters long.
You can also use one of these alternate data types. These are macros that have
been defined to Unicenter Service Desk for general use:
Value Description
KEY Identifies this field as the primary key to be used for
identifying records to be updated with pdm_load. This is
used if the default primary key, id, is not specified. Must
be specified if the field is the primary key in the table.
NOT_NULL Indicates that the field must contain a value. Must be
specified if the field is the primary key in the table.
Optional if the field is not the primary key.
REF other_table_name Indicates that the field references another table. Optional
whether the field is the primary key or not.
S_KEY Optionally identifies this field as the secondary key to be
used for identifying records to be updated with pdm_load.
UNIQUE Indicates that the values in the field must be unique. Must
be specified if the field is the primary key in the table.
Optional if the field is not the primary key.
Examples
This TABLE statement in the database schema defines contact types. The macro
nn indicates that a value is required in the del field. The macro uniq indicates
that values are required and must be unique:
TABLE Contact_Type {
id INTEGER uniq KEY; // key id
del INTEGER nn; // 0=present,1=gone
sym HIER_SYM uniq S_KEY; // type symbol
desc ENT_DESC; // non-OSI specified column
}
This modified TABLE statement makes the Priority field on the Request Detail
window required:
TABLE Call_Req {priority INTEGER NOT_NULL;}
This new TABLE statement adds a resolution code field to the Call_Req table.
The contents of the field is numeric and references the Resolution_Code table.
This reference allows users to double-click the Resolution Code field on the
Request Detail window to display the values in the Resolution_Code table:
TABLE Call_Req {call_req_zrc INTEGER REF Resolution_Code;}
TABLE_INFO Statement
Tells your database management system how to store and index data in the
logical tables. The extent to which these instructions are followed depends on the
database management system. If no instructions are provided, the database
management system follows its own storage and indexing instructions.
Syntax
TABLE_INFO table_name {
[STORAGE storage_mtd Field ;]
[INDEX ndx_props field1 [field2 ...];] ...}
Arguments
STORAGE storage_mtd Identifies the storage method. Valid values are listed below, but note that some
database management systems ignore these values:
Value Description
BTREE Indicates to use the balanced tree storage method.
HASH Indicates to use the hash table storage method. This is
valid only if the field is the primary key.
HEAP Indicates to use the heap storage method.
field Identifies the column that is to be stored according to the specified storage
method (STORAGE storage_mtd). Must be specified the same way as the name of
the column in the TABLE statement.
INDEX ndx_props Identifies one or more properties for an index that consists of the fields specified.
Valid values are:
Value Description
SORT ASCENDING Indicates whether to sort the data in the fields in ascending
| DESCENDING or descending order. Data is sorted in ascending order by
default; therefore, only SORT DESCENDING need be
specified.
PRIMARY Indicates to use this index as the default sort order for the
table.
CLUSTER Identifies this as a clustering index.
UNIQUE Indicates that values in the index must be unique.
field1 [field2 . . .] Identifies the column or columns that are to be indexed according to the specified
index properties (INDEX ndx_props). Must be specified the same way as the name
of the columns in the TABLE statement.
Examples
Mapping Statement
Defines the correspondence between the logical tables and columns in the
Unicenter Service Desk database schema and the physical tables and columns
used by your database management system. This statement follows each TABLE
statement in schema.sch. You must define it when you define a new table.
Syntax
p1 logical_table_name -> CURR_PROV physical_table_name
[{logical_field -> physical_field ...] ;
[}]
Arguments
logical_table_name The name of the database table in the TABLE statement, for example,
Manufacturer.
physical_table_name The name of the table used by your database management system, for example,
man. Short names improve performance and are required by some database
management systems.
logical_field The name of the column in the Unicenter Service Desk database schema, for
example, desc. Must be the same as field in the TABLE statement. Omit this when
the logical columns and physical columns have identical names. When omitted,
the semicolon follows physical_table_name.
physical_field The name of the column used by your database management system, for
example, nx_desc. Omit this when the logical columns and physical columns
have identical names. When omitted, the semicolon follows physical_table_name.
Examples
TABLE_INFO Manufacturer {
STORAGE HASH id;
INDEX SORT ASCENDING PRIMARY UNIQUE sym;
}
Directories
The Majic files are organized in two directories:
Directory Description
bopcfg/majic (UNIX) or Contains the .maj files that have been used to create
bopcfg\majic windows defined in the database. These files should
(Windows) not be changed because changes will be overwritten
by new releases of Unicenter Service Desk.
site/mods/majic (UNIX) Contains the .mod files you use to customize
or site\mods\majic windows.
(Windows)
Types of Statements
The following Majic statements have been used in the procedures in the “Using
Screen Painter” and “Customizing the Database Schema” chapters:
Statement Description
OBJECT Defines a business object
MODIFY Changes existing object attributes
MODIFY FACTORY Changes existing factories
OBJECT Statement
Defines a business object.
Syntax
OBJECT obj_name {
[ATTRIBUTES [table_name]{
att_name [field_name] value_type [access_type[status_type]][{
[ON_NEW DEFAULT|SET value|NOW ;]
[ON_CI DEFAULT|SET value|NOW ;]
[ON_DB_INIT DEFAULT|SET value|NOW ;]} ;]};]
[FACTORY [fac_name]{
[REL_ATTR name ;]
[COMMON_NAME name ;]
[FUNCTION_GROUP name ;]
[STANDARD_LISTS {
[SORT_BY index_att ;]
[FETCH fetch_att ;]
[WHERE string ;]
[MLIST ON|OFF;]
[RLIST ON|OFF;] } ;]};]
};
Arguments
obj_name The object’s name (for example, cnt for contact or cr for request).
Optional Statements
ATTRIBUTES [table_name] { }
Defines the properties of the object. Most attributes map to a field (column) in a
database table. See ATTRIBUTES Optional Statement for a description of its
syntax.
FACTORY [fac_name] { }
Defines access to the object, like its relation attribute, a common name, the
security group that can access it, the type of lists produced, and how those lists
can be sorted. See FACTORY Optional Statement for a description of its syntax.
Example
This example defines an object named ctp. The ATTRIBUTES statement defines
attributes named sym, delete_flag, and description whose values are stored in the
Contact_Type table in the database. The FACTORY statement creates a master
list of objects, sorted by values in the field that corresponds to the sym attribute,
and specifies that the id attribute will represent ctp when it is referenced by an
SREL:
OBJECT ctp {
ATTRIBUTES Contact_Type {
sym STRING REQUIRED ;
delete_flag del INTEGER {
ON_NEW DEFAULT 0 ;
} ;
description desc STRING ;
} ;
FACTORY {
STANDARD_LISTS {SORT_BY "sym"} ;
REL_ATTR id ;
};
};
The optional statement on the OBJECT statement that defines the properties of
the object.
Syntax
ATTRIBUTES [table_name]{
att_name [field_name] value_type [access_type[status_type]]{
[ON_NEW DEFAULT|SET value|NOW ;]
[ON_CI DEFAULT|SET value|NOW ;]
[ON_DB_INIT DEFAULT|SET value|NOW ;]} ;
Arguments
table_name The name of the table in the database that stores the values associated with the
attributes in the object. If the table name is not specified, the obj_name in the
OBJECT statement is used.
att_name The name of the attribute. Each attribute usually maps to a field (column) in the
database table.
field_name The name of the field in the database table or LOCAL if the attribute does not
map to a field. If neither LOCAL nor a field name is specified, the name of the
field is assumed to be the same as the name of the attribute.
SREL refers the attribute to another object. If SREL is specified, obj2_name must
be specified to identify the object that the attribute refers to.
Value Description
CONST Cannot be changed
PRIVATE Read-only
PUBLIC Read/write access (the default)
WRITE_NEW Can be written only when the object is created, before the
object is saved
ON Statements
Use one of these only when value_type is INTEGER, STRING, DATE, or SREL.
Value Description
DEFAULT Changes a null current value to value or NOW.
SET Changes any current value to value or NOW.
Value Description
value Specifies a numeric value or a string value, depending on
the data type of the attribute.
NOW Specify this if the attribute is of type DATE; it sets the
attribute to the current date and time.
In the following example, 90 is the value set as a default when the object is
created:
ON_NEW DEFAULT 90 ;
Example
This example defines attributes with names like start_date whose values are
stored in fields like nlh_start in the Notify_Log_Header table in the database. The
field names are followed by each attribute’s data type. Optional parameters
define access to some of the attributes, indicate that the attribute is required, and
tell when to set the value of some of the attributes to the current date and time.
For example, an attribute named last_mod is defined; its value is set to the
current date and time when the attribute is checked into the database. An
attribute named contact is also defined; its value is a single relation stored in
database field nlh_c_addressee. The object referred to is cnt:
ATTRIBUTES Notify_Log_Header {
start_date nlh_start DATE WRITE_NEW {ON_NEW DEFAULT NOW;} ;
last_mod DATE {ON_CI SET NOW ;} ;
msg_hdr nlh_hdr STRING 20 WRITE_NEW ;
msg_text nlh_msg STRING WRITE_NEW ;
msg_ack nlh_user_ack STRING ;
contact nlh_c_addressee SREL cnt WRITE_NEW ;
notify_method nlh_cm_method INTEGER WRITE_NEW ;
activity_notify nlh_transition INTEGER WRITE_NEW ;
pri_event nlh_pri INTEGER WRITE_NEW ;
notify_type nlh_type INTEGER WRITE_NEW ;
ack_time nlh_ack_time DURATION ;
status nlh_status INTEGER REQUIRED ;
end_date nlh_end DATE {ON_NEW DEFAULT NOW ;} ;
};
Defines access to the object, like its relation attribute, a common name, the
security group that can access it, the type of lists produced, and how those lists
can be sorted. If omitted, the object is treated according to default specifications.
Syntax
FACTORY [fac_name]{
[REL_ATTR name ;]
[COMMON_NAME name ;]
[FUNCTION_GROUP name ;]
[STANDARD_LISTS {
[SORT_BY index_att ;]
[FETCH fetch_att ;]
[WHERE string ;]
[MLIST ON|OFF;]
[RLIST ON|OFF;] } ;]
};
Arguments
fac_name The name of the factory that initiates the object. Specify this only if it is different
from the name of the object. For example, the cnt object has four factories: cnt, cst,
agt, grp.
Optional Statements
REL_ATTR name Identifies the attribute that will represent this object when it is referenced (used
as an SREL) by another object. Here is an example:
REL_ATTR id ;
COMMON_NAME name
Defines the attribute to be displayed in drop-down lists or when the user
double-clicks a field, as well as when the tag does not specify a complete
attribute. In the first example, the value for sym appears on the window instead
of the value for the REL_ATTR. The second example allows you to specify a tag
as cr.customer instead of cr.customer.combo_name.
COMMON_NAME sym ;
COMMON_NAME combo_name ;
FUNCTION_GROUP name
Indicates which security access group is permitted to access the object. For
example:
FUNCTION_GROUP "admin" ;
STANDARD_LISTS { } Creates lists of objects that are kept in a cache and can be displayed on list or
select windows. The parameters determine whether the lists are master lists or
restricted lists, whether the objects included in the list must meet specified
conditions, how the lists can be sorted, and what additional attributes are stored.
See STANDARD_LISTS Optional Statement for a description of the syntax.
Example
This example defines access to the object. A master list is produced. It can be
sorted according to the values in the object’s sym and code attributes. When first
displayed, it is sorted according to the values in the sym attribute by default.
When referenced by another object, this object is represented by the code
attribute. When displayed in a window, the value for sym appears instead of the
value for code. Only users in the admin security group can accessed it:
FACTORY {
STANDARD_LISTS {SORT_BY "sym,code"} ;
REL_ATTR code ;
COMMON_NAME sym ;
FUNCTION_GROUP "admin" ;
};
The optional statement on the FACTORY statement that defines the object’s
standard lists.
Syntax
STANDARD_LISTS {
[SORT_BY index_att ;]
[FETCH fetch_att ;]
[WHERE string ;]
[MLIST ON|OFF;]
[RLIST ON|OFF;] } ;
Optional Statements
SORT_BY index_att Defines the attributes that can be used to sort the standard lists. If specified, a
master list is produced. Attributes must be enclosed in quotes and separated by
commas. When displayed in a list or select window, the list is sorted by the first
attribute, by default. For example:
SORT_BY "sym, code" ;
FETCH fetch_att Specifies additional attributes to keep in the cache, besides those used to sort the
list. They must be enclosed in quotes and separated by commas. For example:
FETCH "description" ;
WHERE string Specifies a condition, in SQL format and surrounded by quotes, that must be met
for an object to be included in a restricted list. If specified, a restricted list is
produced. This example specifies that the restricted list contain only records that
were not deleted:
WHERE "delete_flag = 0" ;
MLIST ON|OFF Indicates whether to produce a master list, which includes all objects, using one
of the following values:
Value Description
ON Produces a master list (default if SORT_BY is specified)
OFF Does not produce a master list (default if SORT_BY is not specified
or has no value defined)
RLIST ON|OFF Indicates whether to also produce a restricted list, which includes only the objects
that meet the criteria in the WHERE clause, using one of the following values:
Value Description
ON Produces a restricted list (default if WHERE is specified)
OFF Does not produce a restricted list (default if WHERE is not
specified or has no value defined.)
Note: RLISTs can speed up access and display but they use memory. They are
usually used in select windows.
Example
This example provides both a master list and a restricted list. Both lists contain
the values defined for the sym, code, and description attributes. The records in
the list can be sorted according to the values in the sym and code attributes. The
restricted list contains only records that were not deleted:
STANDARD_LISTS {
SORT_BY "sym,code" ;
FETCH "description" ;
WHERE "delete_flag = 0" ;
};
MODIFY Statement
Changes the way attributes are defined on OBJECT statements. MODIFY
statements are read after OBJECT statements.
Syntax
MODIFY obj_name att_name [status_type;]
[ON_NEW DEFAULT|SET value|NOW ;]|
[ON_CI DEFAULT|SET value|NOW ;]|
[ON_DB_INIT DEFAULT|SET value|NOW ;]
Arguments
status_type Indicates whether the attribute is required. Attributes that were not originally
required can be changed to REQUIRED, but not the other way around. Therefore,
the only valid value is REQUIRED. Specify REQUIRED or one of the ON
statements.
Example
This example changes the salary attribute in the emp object so that it is now a
required attribute:
MODIFY emp salary REQUIRED ;
Syntax
MODIFY FACTORY fac_name {
[FUNCTION_GROUP name ;]
[STANDARD_LISTS {
[SORT_BY index_att ;]
[FETCH fetch_att ;]
[WHERE string ;]
[MLIST ON|OFF;]
[RLIST ON|OFF;] } ;] };
Arguments
Optional Statements
FUNCTION_GROUP name
Indicates which security access groups are permitted to access the object. For
example:
FUNCTION_GROUP "admin" ;
STANDARD_LISTS Creates lists of objects that are kept in a cache. The parameters determine
whether the lists are master lists or restricted lists, whether the objects included
in the list must meet specified conditions, and how the lists can be sorted. See
STANDARD_LISTS Optional Statement for a description of the syntax.
Index–1
attribute lists, 9-14 Audit Log
compiling programs, 9-28 table, A-15
components, 9-2
Audit_Log table, A-15
error handling, 9-12
high-level functions, 9-4
labels, 9-14
library, 9-3 B
low-level functions, 9-4
multiple connections, 9-2
node definition, 9-6 Beeper notification, 2-2
object codes, 9-8 Behavior_Template table, A-16
objects, 9-1
operations, 9-8 Block statements
overview, 9-1 BLOCK, 3-15
parsing tools, 9-3, 9-5 detailed description, 3-15
queries, 9-10 overview, 3-3
query reference tags, 9-14
Boolean_Table table, A-17
requests, 9-3, 9-4, 9-7
requirements, 9-1 Bop_Workshift table, A-18
responses, 9-3, 9-4, 9-9
bopcfg directory, 4-3, E-1
sample test programs, 9-24
SAPIO component, 9-3 BTREE storage, D-5
Server component, 9-2
Buffer size exceeded, 9-13
slaves, 9-2
special characters, 9-8 build command, 5-3
startup, 9-1
syntax, 9-5 build_template function, 9-4
usage, 9-7 button
api_svr_nxd, 9-2 command, 4-10
option, 4-11
Arranging items on a window, 4-9 radio, 4-11
ASCENDING sort order, D-5
Asset Management integration, 7-1
C
Assets
asset family table, A-79
class comment table, A-48 C language API, 9-1
class table, A-46 Call_Req table, A-18
failure table, A-46
status table, A-80 Call_Req_Type table, A-21
table for defining, A-60 Call_Solution table, A-22
Assets, attribute list, 9-15 Cause table, A-23
Attached_Events table, A-12 Change Order Management
Attribute lists for API change order activity log table, A-23
asset, 9-15 change order category table, A-24
contacts, 9-20 change order status table, A-27
overview, 9-14 Property table, A-73
Property_Template table, A-74
Attribute_Name table, A-14 task behavior templates table, A-16
Attributes workflow task status table, A-96
statement, E-3 workflow task type table, A-97
Workflow_Task table, A-105
Index–3
controlled tables table, A-33 Environment variables in notification script, 2-2
table for defining, A-40
Error
table for defining constaints, A-41
format, 9-13
table for defining constraint types, A-42
handling in API, 9-12
Database return in API, 9-4
relating to schema, D-6
Escalation
schema customization, 4-3
controlling table, A-42
tables, E-3
recording table, A-42, A-43
Database element dictionary, A-1
Escalation_Control table, A-42
Dates
Escalation_Entry_Log table, A-42
in WHERE clause, 9-11
Escalation_Level table, A-43
ddict.sch file, 4-3, 5-2
Event_Delay table, A-43
Default
form group, 4-6 Event_Delay_Type table, A-44
parameter, E-4
window group, 4-5 Events table, A-45
Defining Examples
activity associations for user-defined attributes, adding
5-19 fields to tables and windows, 5-11
changing attributes, E-9
Delay creating a new table, 5-16
code control table, A-6 customizing
record table, A-6 notification messages, 6-8
notification methods, 2-5
Delegation_Server table, A-38
customizing reports, 3-6
Delegation_Status table, A-38 defining
activity associations for user-defined
Delegation_Transport table, A-39
attributes, 5-20
delete_nxpv parsing function, 9-6 attributes, E-5
objects, E-3, E-7
Deref flag, 9-11 scoreboard queries, 6-2
DESCENDING sort order, D-5 generating lists of objects, E-8
lengthening fields, 5-6
Dialog, displaying, 3-10 making fields
Dictionary of database elements, A-1 required, 5-8
of mapping statements, D-7
Domain table, A-40 of queries
Domain_Constraint table, A-41, A-42 in labels, 6-3
in WHERE clauses, 6-3
DURATION fields, D-2 of TABLE statements, D-4
of TABLE_INFO statements, D-5
Expense_Code_Opt table, A-46
E
External access, 9-1
extname.dat file, 9-14
editing
controls, 4-12
Email notification, 2-2
Enumerated data types, 9-11
Index–5
Include file for API, 9-3 L
index card, 4-11
INDEX methods, D-5 label, 4-11
Index.sch file, D-1 Labels, customizing, 6-3
Initial_Report table, A-50 launchit utility, 4-19
Integer fields, D-2 Layout
statement
Integration
creating data fields, 3-4
AimIT, 7-1
including literal text, 3-5
Asset Management, 7-1
statements
ControlIT, 7-4
detailed description, 3-3
FAXserve, 7-2
FOOTER, 3-17
Remote Control Option, 7-4
HEADER, 3-18
Interface table, A-51 HEADER2, 3-19
overview, 3-4
Internal database ID PAGE FOOTER, 3-20
assets, 9-19 PAGE HEADER, 3-21
contacts, 9-23 PRINT, 3-22
Internal_Organization table, A-52 Lengthening fields, 5-5
Invalid user ID, 9-13 Library file for API, 9-3
IR_Order_By table, A-53 Lists
IR_Stored_WC table, A-53 creating, E-7
master, E-8
Issue Management restricted, E-8
architecture, 4-2
viewer, 4-2 Literal text in reports, 3-5
window definitions, 4-4 LOCAL parameter, E-3
LOCAL_TIME fields, D-2
K Location table, A-55
Location_Type table, A-56
KEY fields, D-3 Locked records, 9-13
Key_Control table, A-53 Logged-in users, 6-2
Knowledge Management Logical tables, D-1
architecture, 4-2
keywords table, A-54 Low-level functions, 9-4
table for relating keywords to solutions, A-54 Lrel_Table table, A-57
table for request solutions, A-22
viewere, 4-2
window definitions, 4-4
M
Knowledge_Keywords table, A-54
Knowledge_Lrel_Table table, A-54
Macros for TABLE statements, D-2
Main menu, 6-1
Majic
files, 4-3, E-1
Index–7
contact, 6-3 prev_sib_nxpv parsing function, 9-7
customizing the schema, 4-4
PRIMARY sort order, D-5
defining, E-1, E-2
listing, E-7 Print layout statement, 3-22
request, 6-2
print_children parsing function, 9-6
ON parameters, E-4
Priority table, A-71
Opening an existing form, 4-7
PRIVATE parameter, E-4
option button, 4-11
Prob_Category table, A-72
Options Manager
architecture, 4-2 Problem Management
viewer, 4-2 reports, 3-1
System_Defaults table, A-95
Options table, A-70
Property table, A-73
Organizations
table, A-52 Property_Template table, A-74
P Query
assets, 9-19
P1 statements, D-6 contacts, 9-23
on scoreboard, 6-1
Page reference tags, 9-14
footer layout statement, 3-20 sample
header layout statement, 3-21 messages, 9-12
program, 9-27
painter32 command, 4-7
with API, 9-10
Parameters
query_object
for version control files, 8-6
function, 9-4
parent_nxpv parsing function, 9-7 sample program, 9-27
Parsing Screen Painter, 4-23
functions, 9-6
Quitting Screen Painter, 4-23
tools, 9-3, 9-5
Passing arguments into reports, 3-1
pdm_extract utility, 5-2, 5-4, 5-7 R
pdm_replace utility, 5-2, 5-4
pdm_task utility, 3-9 radio button, 4-11
Index–9
set_value_nxpv parsing function, 9-6 Survey_Answer table, A-91
Setting Survey_Answer_Template table, A-92
values of attributes, E-4
Survey_Question table, A-93
Severity table, A-84
Survey_Question_Template table, A-94
Single action entry, action template, A-3
Survey_Template table, A-95
Site
Syntax
directory, 4-3, 5-2
conventions, 1-2
mods
for API, 9-5
directory, 4-3, E-1
majic directory, 4-3 System_Defaults table, A-95
Site table, A-85
SLA_Progress_Level table, A-85
T
SLA_Progress_Notification_Log table, A-86
SLA_Template table, A-86 Tab
Slave processes, 9-2 order on a window, 4-10
Index–11
determining, 4-12 pdm_userload, 5-7
overview, 4-4
smart_hook, 4-21, 4-22
Task_Status table, A-96 V
Task_Type table, A-97
Telephone notification, 2-2 V_Comment table, A-103