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:
  • Use the following syntax for multiple-valued attributes:
    +attribname: $I_READ_ATTRIBUTE("", 
    "multivalued:attribute:$cd.attributename;add")
    					
  • 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("$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:
  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 "Multiple-Value"

  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

  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 MA Operations tab.
  6. Click the Template Definitions tab.
  7. 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         ;
  8. Click OK.

How to Set the Parsing Definition to "Multiple-Value" 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.

Modification Type:MajorLast Reviewed:6/6/2003
Keywords:kbinfo KB289244