Microsoft KB Archive/289244

= Description of the Proper Syntax for Parsing Multiple-Valued Attributes in MMS =

Article ID: 289244

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1
 * Microsoft Metadirectory Services 2.2 Service Pack 1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



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 &quot;multivalued&quot; keyword
 * The &quot;add&quot; 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:   Use the following syntax for multiple-valued attributes: +attribname: $I_READ_ATTRIBUTE(&quot;&quot;, &quot;multivalued:attribute:$cd.attributename;add&quot;)  Ensure the attribute is defined as multiple-valued in the MMS schema (in the example that is used in this article, the attribute is attributename). Ensure that the following text is set in the template definition in the Template Definitions object:

c_syntax        ;

To view the Template Definitions object, click Design MA, and then click Control MA Operations.

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(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.personalTitle&quot;) FirstName: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.givenname&quot;) MiddleInitial: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.initials&quot;) LastName: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.sn&quot;) Suffix: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.generationQualifier&quot;) +ShortName: $i_read_attribute(&quot;&quot;,&quot;multivalued:attribute:$cd.zcNotesShortName;add&quot;) PhoneNumber: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.homePhone&quot;) HomeFAXPhoneNumber: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.homeFax&quot;) StreetAddress: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.homePostalAddress&quot;) CellPhoneNumber: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.mobile&quot;) PhoneNumber_6: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.pager&quot;) CompanyName: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.company&quot;) Location: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.physicalDeliveryOfficeName&quot;) OfficePhoneNumber: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.telephoneNumber&quot;) OfficeFAXPhoneNumber: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.facsimileTelephoneNumber&quot;) OfficeStreetAddress: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.street&quot;) OfficeCity: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.l&quot;) OfficeState: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.st&quot;) OfficeZIP: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.postalCode&quot;) OfficeCountry: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.co&quot;) MailSystem: $v_mailSystem MailDomain: $v_mailDomain MailServer: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.zcNotesOUMailserver&quot;) DisplayMailAddress: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$v_displayMailAddress&quot;) MailAddress: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$v_mailAddress&quot;) InternetAddress: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.mail&quot;) Comment: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.description&quot;) ccMailUserName: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$v_ccMailUserName&quot;) ccMailLocation: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$v_ccMailLocation&quot;) JobTitle: $cd.title Manager: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.manager&quot;) Assistant: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.secretary&quot;) AvailableForDirSync: $v_dummy HTTPPassword: $v_dummy Rfc822: $cd.zcNotesRfc822 SearchKey: $cd.zcNotesSearchKey ListName: $v_listname(%$v_pab) ListDescription: $i_read_attribute(&quot;$v_zvalue&quot;,&quot;multilines:attribute:$cd.description&quot;) +Members: $i_member(&quot;+Members: -$AT.zcNotesDn&quot;)

How to Configure the Parsing Template
To configure the parsing template, perform the following tasks:
 * 1) Verify that the attribute definition is set to multiple-value.
 * 2) Verify that the semicolon  is defined as a syntax character.
 * 3) 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 &quot;Multiple-Value&quot;

 * 1) Log on to the folder as an administrator.
 * 2) Click Bookmarks on the Action menu.
 * 3) Click Management Agents.
 * 4) Click the affected MA, and then click Design MA on the Action menu.
 * 5) Click the Control Metadirectory tab.
 * 6) Click the Parsing Templates tab.
 * 7) Click the Add tab, and then edit the line that describes the parsing scheme for the shortName attribute.
 * 8) Click OK.

How to Define the Semicolon As a Syntax Character
 Log on to the folder as an administrator.</li> Click Bookmarks on the Action menu.</li> Click Management Agents.</li> Click the affected MA, and then click Design MA on the Action menu.</li> Click the Control MA Operations tab.</li> Click the Template Definitions tab.</li>  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        ; </li> Click OK.</li></ol>

How to Set the Parsing Definition to &quot;Multiple-Value&quot; for the Appropriate Attribute

 * 1) Log on to the folder as an administrator.
 * 2) Click Search on the Action menu.
 * 3) Type the name of the attribute that you want to search for. In this example, type zcnotesshortname.
 * 4) Click the shortName entry in the search response data.
 * 5) Double-click the ShortName icon in the metaverse in the right pane.
 * 6) Click the Definition tab.
 * 7) Click Multi in the Values section (if this option has not already been selected).
 * 8) Click OK.

Additional query words: zoomit

Keywords: kbinfo KB289244

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.