Sample Address Syntax Program

This example demonstrates converting data entered in a PROFS address entry template into a proxy address string. The PR_NODE and PR_USER values are user-defined. Error1 and Slash represent addresses within the address syntax program. The PROFS proxy addresses are in the form PROFS:node/user, where node and user represent information entered in the address entry template dialog box. The prefix “PROFS:” is generated automatically by the Microsoft Exchange Server address book from the Address Type attribute. You must supply the slash (/) character within the address syntax program.

Using the sample PROFS address template described in Address Entry Template Binary Data, a symbolic address syntax program might look like:

EQU      PR_NODE         0x6800001E
              EQU      PR_USER         0x6801001E
              JNX      PR_NODE         Error1
              JNX      PR_USER         Error1
              EMIT     PR_NODE
              EMIT     Slash
              EMIT     PR_USER
              HALT
Error1:       ERROR
Slash:        "/"

Note that EQU in this example is a pseudo-operation that is not supported directly by the Microsoft Exchange Server address book. It has the same effect as a #define statement in C, which means that it allows numeric constants to be referred to by symbolic names that are only meaningful at compile time.

This program first checks if the Host Node ID and Host User ID fields of the template have been filled in. If not, program execution jumps to the label Error1 and executes the ERROR instruction. If the data is valid, execution continues and builds the PROFS proxy address by generating the data in the text fields and additional data.

The above example program must be converted to the following binary data so it can be used by the Microsoft Exchange Server address book. In the following table, the Address column is for reference only; the address numbers are not part of the program. You can do this conversion by hand (which is not unreasonably difficult because address syntax programs tend to be short), or you can write a program in some other language to create the binary file for you. There is presently no assembler utility provided to convert an address syntax program from a symbolic format to the required binary format.

Program Code for PROFS File

Address Program code Comment
00 0x00000004 JNX
0x6800001E Property tag for PR_NODE
0x00000034 Program address of Error1
0C 0x00000004 JNX
0x6801001E Property tag for PR_USER
0x00000034 Program address of Error1
18 0x00000002 EMIT edit control data
0x6800001E Property tag for PR_NODE
20 0x80000002 EMIT data from program
0x00000038 Address of data string “/”
28 0x00000002 EMIT edit control data
0x6801001E Property tag for PR_USER
30 0x00000000 HALT
34 0x00000001 ERROR
38 0x2F000000 ASCII of “/”, null terminated

The hexadecimal numbers in the Program code column of this table are saved in a binary file. You can create an address template syntax program using a simple C program like the ones listed here.

CCMAIL.C Generates a ccMail address template syntax program.
MACSCR.C Generates a MacMail address template syntax program.
PCMSCR.C Generates a PC-Mail address template syntax program.
X400SCR.C Generates a X.400 address template syntax program.
SDUMP.C “Disassembles” an existing binary address template syntax program into symbolic format.

These sample programs are located in the \BKOFFICE\SAMPLES\EXCHANGE\SYNTGEN directory. To compile one of these files, type CL <filename>.