Description of the Proper Syntax for Parsing Multiple-Valued Attributes in MMS (289244)
The information in this article applies to:
- Microsoft Metadirectory Services 2.1
- Microsoft Metadirectory Services 2.2
- Microsoft Metadirectory Services 2.2 SP1
This article was previously published under Q289244 SUMMARY
A Microsoft Metadirectory Services (MMS) management agent (MA) parsing statement must contain the following three components to successfully parse multiple-valued variables in MMS:
- The label definition
- The "multivalued" keyword
- The "add" keyword
This article describes the syntax to use to parse multiple-valued attributes in MMS.
MORE INFORMATION
In MMS, you can use the label-value-pair format to successfully parse multiple-valued attributes. Both the column format and the comma- and tab-delimited formats require that the number of values is fixed and known beforehand. These restrictions generally preclude these formats from being used; therefore, the label-value-pair format is the only viable format.
To configure an MA parsing template, perform the following tasks:
Sample Problem
The following example is based on the Lotus Notes MA and deals with the multiple-valued shortName attribute. The parsing template is the default template.
Multiple values for the shortName attribute are displayed in the import record. The MA's parsing template specifies only a single-value format. The import file is not completely processed and the Zscript.log file reports multiple problems with each input record.
The following text is an example of a record from an IMPORTT file record that contains a multiple-valued shortName attribute:
Notes: USER
FullName: CN=Jeff Smith
FirstName: Smith
LastName: Jeff
ShortName: jsmith
ShortName: Jeff Smith
PhoneNumber: 444-555-1212
HomeFAXPhoneNumber: None
StreetAddress: 2512 Main Street
CellPhoneNumber: 444-555-1213
CompanyName: Microsoft
Location: Premier Support
OfficePhoneNumber: 444-555-1214
OfficeFAXPhoneNumber: 444-555-1215
MailSystem: 1
MailDomain: Redmond
MailServer: MS_MAILSERVER_01
Comment: Likes to cook
JobTitle: Project Manager
Manager: Patricia Doyle
Assistant: John Evans
SearchKey: Smith Jeff
The following text is an example of the log file that is created after the preceding IMPORTT data is processed:
8690-META ADDED[00]: CN=Jeff Smith,O=MMMSTest,O=msnames.nsf,o=pss,dc=microsoft,dc=com
SKIP UNKNOWN LINE: ShortName: Jeff Smith
SKIP UNKNOWN LINE: PhoneNumber: 444-555-1212
SKIP UNKNOWN LINE: HomeFAXPhoneNumber: None
SKIP UNKNOWN LINE: StreetAddress: 2512 Main Street
SKIP UNKNOWN LINE: CellPhoneNumber: 444-555-1213
SKIP UNKNOWN LINE: CompanyName: Microsoft
SKIP UNKNOWN LINE: Location: Premier Support
SKIP UNKNOWN LINE: OfficePhoneNumber: 444-555-1214
SKIP UNKNOWN LINE: OfficeFAXPhoneNumber: 444-555-1215
SKIP UNKNOWN LINE: MailSystem: 1
SKIP UNKNOWN LINE: MailDomain: Redmond
SKIP UNKNOWN LINE: MailServer: MS_MAILSERVER_01
SKIP UNKNOWN LINE: Comment: Likes to cook
SKIP UNKNOWN LINE: JobTitle: Project Manager
SKIP UNKNOWN LINE: Manager: Patricia Doyle
SKIP UNKNOWN LINE: Assistant: John Evans
SKIP UNKNOWN LINE: SearchKey: Smith Jeff
If a single section of an input record is unrecognized by the parser, the section is rejected and the rest of the record is ignored. In this example, most of the import record (from the shortName attribute to the end of the record) has been ignored. The parser encounters a pair of lines that begin with the shortName label. However, the parser expects to find this label only one time in any given record.
To resolve this problem, modify the parsing template. Specifically, change the parsing rules for the shortName attribute so that multiple values are accepted. The following text describes the proper input format for records of this type:
Notes: $v_notesObjectClass
FullName: $v_Name(,C=$cd.zcNotesCountry)(%$v_pab)
Domain: $cd.zcNotesMainDomain
ServerName: $v_Name(,C=$cd.zcNotesCountry)(%$v_pab)
Title: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.personalTitle")
FirstName: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.givenname")
MiddleInitial: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.initials")
LastName: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.sn")
Suffix: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.generationQualifier")
+ShortName: $i_read_attribute("","multivalued:attribute:$cd.zcNotesShortName;add")
PhoneNumber: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.homePhone")
HomeFAXPhoneNumber: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.homeFax")
StreetAddress: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.homePostalAddress")
CellPhoneNumber: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.mobile")
PhoneNumber_6: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.pager")
CompanyName: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.company")
Location: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.physicalDeliveryOfficeName")
OfficePhoneNumber: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.telephoneNumber")
OfficeFAXPhoneNumber: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.facsimileTelephoneNumber")
OfficeStreetAddress: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.street")
OfficeCity: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.l")
OfficeState: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.st")
OfficeZIP: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.postalCode")
OfficeCountry: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.co")
MailSystem: $v_mailSystem
MailDomain: $v_mailDomain
MailServer: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.zcNotesOUMailserver")
DisplayMailAddress: $i_read_attribute("$v_zvalue","multilines:attribute:$v_displayMailAddress")
MailAddress: $i_read_attribute("$v_zvalue","multilines:attribute:$v_mailAddress")
InternetAddress: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.mail")
Comment: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.description")
ccMailUserName: $i_read_attribute("$v_zvalue","multilines:attribute:$v_ccMailUserName")
ccMailLocation: $i_read_attribute("$v_zvalue","multilines:attribute:$v_ccMailLocation")
JobTitle: $cd.title
Manager: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.manager")
Assistant: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.secretary")
AvailableForDirSync: $v_dummy
HTTPPassword: $v_dummy
Rfc822: $cd.zcNotesRfc822
SearchKey: $cd.zcNotesSearchKey
ListName: $v_listname(%$v_pab)
ListDescription: $i_read_attribute("$v_zvalue","multilines:attribute:$cd.description")
+Members: $i_member("+Members: -$AT.zcNotesDn")
How to Configure the Parsing Template
To configure the parsing template, perform the following tasks:
- Verify that the attribute definition is set to multiple-value.
- Verify that the semicolon (;) is defined as a syntax character.
- Verify that the parsing definition is set to multiple-value for the appropriate attribute.
The following sections describe these tasks in greater detail.
How to Set the Attribute Definition to "Multiple-Value"- Log on to the folder as an administrator.
- Click Bookmarks on the Action menu.
- Click Management Agents.
- Click the affected MA, and then click Design MA on the Action menu.
- Click the Control Metadirectory tab.
- Click the Parsing Templates tab.
- Click the Add tab, and then edit the line that describes the parsing scheme for the shortName attribute.
- Click OK.
How to Define the Semicolon As a Syntax Character- Log on to the folder as an administrator.
- Click Bookmarks on the Action menu.
- Click Management Agents.
- Click the affected MA, and then click Design MA on the Action menu.
- Click the Control MA Operations tab.
- Click the Template Definitions tab.
- Add the following new line to the others section to define the semicolon as a syntax character (if this line is not already present):
c_syntax ; - Click OK.
How to Set the Parsing Definition to "Multiple-Value" for the Appropriate Attribute- Log on to the folder as an administrator.
- Click Search on the Action menu.
- Type the name of the attribute that you want to search for.
In this example, type zcnotesshortname.
- Click the shortName entry in the search response data.
- Double-click the ShortName icon in the metaverse in the right pane.
- Click the Definition tab.
- Click Multi in the Values section (if this option has not already been selected).
- Click OK.
Modification Type: | Major | Last Reviewed: | 6/6/2003 |
---|
Keywords: | kbinfo KB289244 |
---|
|