Appendices

Appendix A - Reserved Colors

Appendix B - Reserved Key Names

Appendix C - Reserved Network Names

Appendix D - Reserved Error Names

Appendix E - Reserved Edit Field Keys

Appendix F- Reserved File I/O

Appendix G - Partial Listing of NCP Calls

Appendix H - Sample Code

Appendix I - BTX Constant Names

Appendix J - NDS Attribute Syntax Definitions

Appendix A - Reserved Colors

Colors to be used in a command can be specified by a reserved color name. The parameter passed to the command is the sum of the foreground and background attributes. Using reserved color constant names insures cross-platform compatibility

NOTE The statement '#include "WIN.H"' must be included in your program to use the reserved color constant names

Color_Color Constant_NameInteger Value
Forground Colors:
BLACKWIN_FG_BLACK0
BLUEWIN_FG_BLUE1
CYANWIN_FG_CYAN3
GREENWIN_FG_GREEN2
LIGHTWIN_FG_LIGHT8
MAGENTAWIN_FG_MAGENTA 5
REDWIN_FG_RED4
WHITEWIN_FG_WHITE7
YELLOWWIN_FG_YELLOW 6
Background Colors:
BLINKWIN_BG_BLINK128
BLUEWIN_BG_BLUE16
CYANWIN_BG_CYAN48
GREENWIN_BG_GREEN32
MAGENTAWIN_BG_MAGENTA 80
REDWIN_BG_RED64
WHITEWIN_BG_WHITE112
YELLOWWIN_BG_YELLOW 96

Appendix B - Reserved Key Names

Commands that determine users' key or key combination should reflect the following reserved key constant names. Using reserved key constant names insures cross-platform compatibility.

NOTEThe statement '#include "KEY.H"' must be included in your program to use the reserved key constant names

Key/Key Combo Key Constant NameInteger Value
Alt F10KEY_ALT_F1028928
Alt F3KEY_ALT_F327136
Alt F4KEY_ALT_F427392
Alt F6KEY_ALT_F627904
Alt F7KEY_ALT_F728160
Alt F8KEY_ALT_F828416
Alt F9KEY_ALT_F928672
AltF5KEY_ALT_F527648
BackspaceKEY_TAB9
Ctrl AKEY_CTRL_A1
Ctrl BKEY_CTRL_B2
Ctrl CKEY_CTRL_C3
Ctrl DKEY_CTRL_D4
Ctrl EKEY_CTRL_E5
Ctrl EndKEY_CTRL_END 29952
Ctrl FKEY_CTRL_F6
Ctrl F1KEY_CTRL_F124064
Ctrl F2KEY_CTRL_F224320
Ctrl F3KEY_CTRL_F324576
Ctrl F4KEY_CTRL_F424832

Ctrl F5KEY_CTRL_F525088
Ctrl GKEY_CTRL_G7
Ctrl HKEY_CTRL_H8
Ctrl HomeKEY_CTRL_HOME 30464
Ctrl IKEY_CTRL_I9
Ctrl JKEY_CTRL_J10
Ctrl KKEY_CTRL_K11
Ctrl LKEY_CTRL_L12
Ctrl Left ArrowKEY_CTRL_LEFT 29440
Ctrl MKEY_CTRL_M13
Ctrl NKEY_CTRL_N14
Ctrl OKEY_CTRL_O15
Ctrl PKEY_CTRL_P16
Ctrl Page DownKEY_CTRL_PGDN 30208
Ctrl Page UpKEY_CTRL_PGUP 33792
Ctrl QKEY_CTRL_Q17
Ctrl RKEY_CTRL_R18
Ctrl Right ArrowKEY_CTRL_RIGHT 29696
Ctrl SKEY_CTRL_S19
Ctrl TKEY_CTRL_T20
Ctrl UKEY_CTRL_U21
Ctrl VKEY_CTRL_V22
Ctrl WKEY_CTRL_W23
Ctrl XKEY_CTRL_X24
Ctrl YKEY_CTRL_Y25
Ctrl ZKEY_CTRL_Z26
DeleteKEY_DEL21248
Down ArrowKEY_DOWN20480
EndKEY_END20224
Enter or ReturnKEY_ENTER 13
EscapeKEY_ESC27
F1KEY_F115104
F10KEY_F1017408
F2KEY_F215360
F3KEY_F315616
F4KEY_F415872
F5KEY_F516128
F6KEY_F616384
F7KEY_F716640
F8KEY_F816896
F9KEY_F917152
HomeKEY_HOME18176
InsertKEY_INS20992
Left ArrowKEY_LEFT19200
Page DownKEY_PGDN20736
Page UpKEY_PGUP18688
Right ArrowKEY_RIGHT 19712
Shift F1KEY_SHIFT_F1 21504
Shift F10KEY_SHIFT_F10 23808
Shift F2KEY_SHIFT_F2 21760
Shift F3KEY_SHIFT_F3 22016
Shift F4KEY_SHIFT_F4 22272
Shift F5KEY_SHIFT_F5 22528
Shift F6KEY_SHIFT_F6 22784
Shift F7KEY_SHIFT_F7 23040
Shift F8KEY_SHIFT_F8 23296
Shift F9KEY_SHIFT_F9 23552
Shift TabKEY_SHIFT_TAB 3840
Up ArrowKEY_UP18432

Appendix C - Reserved Network Names

Network commands should reflect the following reserved network constant names. Using reserved network constant names insures cross-platform compatibility

NOTE: The statement '#include "NET.H"' must be included in your program to use the reserved network constant names

Reserved Words Values
NET_ADMINISTRATION11
NET_ADVERTISING_PRINT_SERVER71
NET_ARCHIVE_SERVER_DYNAMIC_SAP46
NET_BF_DYNAMIC1
NET_BF_ITEM0
NET_BF_SET2
NET_BF_STATIC0
NET_BTRIEVE_VAP80
NET_FILE_SERVER4
NET_GROUP2
NET_JOB_QUEUE10
NET_NAS_SNA_GATEWAY33
NET_PRINT_QUEUE_USER83
NET_PRINT_QUEUE3
NET_READ_ANYONE0
NET_READ_LOGGED_CLIENT1
NET_READ_NETWARE4
NET_READ_SAME_CLIENT2
NET_READ_SUPERVISOR3
NET_REMOTE_BRIDGE_SERVER36
NET_TA_ALL255
NET_TA_CREATE8
NET_TA_DELETE16
NET_TA_MODIFY128
NET_TA_NONE0
NET_TA_OPEN4
NET_TA_OWNERSHIP32
NET_TA_READ1
NET_TA_SEARCH64
NET_TA_WRITE2
NET_TIME_SYNC_SERVER45
NET_UNKNOWN0
NET_USER_GROUP2
NET_USER1
NET_WILD-1
NET_WRITE_ANYONE0
NET_WRITE_LOGGED_CLIENT1
NET_WRITE_NETWARE4
NET_WRITE_SAME_CLIENT2
NET_WRITE_SUPERVISOR3
NET_ARCHIVE_QUEUE8
NET_ARCHIVE_SERVER9
NET_GATEWAY6
NET_JOB_SERVER5
NET_PRINT_SERVER7

Appendix D - Reserved Error Names

Use the reserved error constant names to determine the error number set by a command. Using reserved error constant names insures cross-platform compatibility

NOTE: The statement '#include "ERROR.H"' must be included in your program to use the reserved error constant names.

Error Constant Names Values
ACCOUNT_DISABLED-220
ALREADY_ATTACHED_TO_SERVER-248
BAD_STATION_NUMBER-253
BINDERY_FAILURE-255
BINDERY_LOCKED-254
CREDIT_LIMIT_EXCEEDED-194
ERR_ADDING_TRUSTEE-10029
ERR_ADVERTISE_FAILED-10019
ERR_BAD_LPT_PORT-10018
ERR_BAD_PARAM-10000
ERR_CHANGE_DIR-10005
ERR_CHANGING_PASSWORD-10026
ERR_CHANGING_QUEUE_JOB-10037
ERR_CHANGING_SECURITY-10025
ERR_COM_INUSE-10001
ERR_CREATING_BINDERY-10023
ERR_CREATING_DIR-10009
ERR_CREATING_FILE-10009
ERR_CREATING_PROPERTY-10027
ERR_CREATING_QUEUE_JOB-10034
ERR_CREATING_QUEUE-10033
ERR_DATE_NOT_SET-10020
ERR_DELETING_BINDERY-10022
ERR_DISCONNECTED-2
ERR_ENV_SET_FAILED-10017
ERR_ENV_VAR_NOT_FOUND-10015
ERR_FILE_ACCESS-10002
ERR_FILE_IO-10014
ERR_GETTING_SERVER_INFO-10032
ERR_NO_DATA-1
ERR_NO_ENV_NAME-10016
ERR_NO_MORE_FILES-10006
ERR_NO_MORE_SAP_HANDLE-10040
ERR_NO_PATH-10004
ERR_NO_SUCH_VOLUME-10008
ERR_OPEN_DIR-10007
ERR_READING_BINDERY-10022
ERR_READING_CONNETION-10030
ERR_READING_INTERNET-10031
ERR_READING_QUEUE_JOB_LIST-10038
ERR_READING_QUEUE_JOB-10036
ERR_REMOVING_DIR-10010
ERR_REMOVING_FILE-10011
ERR_RENAMING_BINDERY-10024
ERR_RENAMING_DIR-10012
ERR_RENAMING_FILE-10013
ERR_SERVER_FILES_OPEN-255
ERR_SERVER_NOT_ATTACHED-10039
ERR_SERVICE_QUEUE_JOB-10035
ERR_TIME_NOT_SET-10021
ERR_TRANSFER_ABORT-10003
ERR_WRITING_PROPERTY-10028
FILE_EXTENSION_ERROR-255
FILE_NAME_ERROR-255
INVALID_BINDERY_SECURITY-241
LOGIN_DENIED_NO_CONNECTION-217
LOGIN_DENIED_NO_CREDIT-194
MAX_QUEUE_SERVERS-219
MEMBER_ALREADY_EXISTS-233
NO_ACCOUNT_BALANCE-193
NO_ACCOUNT_PRIVILEGES-192
NO_CONSOLE_OPERATOR-198
NO_CONSOLE_RIGHTS-198
NO_DELETE_PRIVILEGES-138
NO_DISK_SPACE_FOR_SPOOL_FILE-151
NO_FREE_CONNECTION_SLOTS-249
NO_JOB_RIGHTS-214
NO_LOCAL_TARGET_IDENTIFIED-250
NO_MODIFY_PRIVILEGES-140
NO_MORE_SERVER_SLOTS-250
NO_OBJECT_CREATE_PRIVILEGE-245
NO_OBJECT_DELETE_PRIVILEGE-244
NO_OBJECT_READ_PRIVILEGE-242
NO_OBJECT_RENAME_PRIVILEGE-243
NO_PROPERTY_CREATE_PRIVILEGE-247
NO_PROPERTY_DELETE_PRIVILEGE-246
NO_PROPERTY_READ_PRIVILEGE-249
NO_PROPERTY_WRITE_PRIVILEGE-248
NO_QUEUE_JOB-213
NO_QUEUE_RIGHTS-211
NO_QUEUE_SERVER-210
NO_QUEUE-209
NO_READ_PRIVILEGES-147
NO_RENAME_PRIVILEGES-139
NO_SEARCH_PRIVILEGES-137
NO_SUCH_MEMBER-234
NO_SUCH_OBJECT_OR_BAD_PASSWORD-255
NO_SUCH_OBJECT-252
NO_SUCH_PROPERTY-251
NO_SUCH_SEGMENT-236
NO_WRITE_PRIVILEGES_OR_READONLY-148
NOT_ATTACHED_TO_SERVER-248
NOT_GROUP_PROPERTY-235
NOT_ITEM_PROPERTY-232
OBJECT_ALREADY_EXISTS-238
PASSWORD_HAS_EXPIRED_NO_GRACE-222
PASSWORD_HAS_EXPIRED-223
PASSWORD_TOO_SHORT-216
PATH_ALREADY_EXISTS-255
PROPERTY_ALREADY_EXISTS-237
QUEUE_ERROR-208
QUEUE_FULL_ERROR-255
QUEUE_FULL-212
QUEUE_HALTED-218
QUEUE_SERVICING-215
SERVER_BINDERY_LOCKED-254
SERVER_OUT_OF_MEMORY-150
SPOOL_DIRECTORY_ERROR-254
SUPERVISOR_HAS_DISABLED_LOGIN-254
UNAUTHORIZED_LOGIN_STATION-219
UNAUTHORIZED_LOGIN_TIME-218
UNKNOWN_FILE_SERVER-252
WILD_CARD_NOT_ALLOWED-240
WRITE_PROPERTY_TO_GROUP-232

Appendix E - Edit Field Keys

Edit field keys are used to move the cursor within user input regions.

Key NameAction
Enter or ReturnMoves the cursor to the next input region.
Tab Moves the cursor to the next input region.
Shift TabMoves the cursor to the previous input region.
Left ArrowMoves the cursor one character to the left.
Right ArrowMoves the cursor one character to the right.
InsertToggles between replace and insert modes.
DeleteDeletes the character at the cursor.
BackspaceDeletes the character to the left of the cursor.
EscapeAborts the input.
HomeMoves the cursor to the first input region.
End Moves the cursor to the last input region.
Ctrl W Terminates the input.
Ctrl Q Terminates the input.
Ctrl Left ArrowTerminates the input.
Ctrl Right Arrow Terminates the input.
Page UpTerminates the input.
Page Down Terminates the input.

Appendix F- Reserved File I/O

Low level file access commands should reflect the following reserved file I/O constant names. Using reserved file I/O constant names insures cross-platform compatibility.

NOTE: The statement '#include "FIO.H"' must be included in your program to use the reserved file I/O constant names.

Reserved Words Values
FIO_BINARY"b"
FIO_CREATE_APPEND_UPDATE"a+"
FIO_CREATE_APPEND_WRITE"a"
FIO_CREATE_UPDATE"w+"
FIO_CREATE_WRITE"w"
FIO_READ_ONLY"r"
FIO_TEXT"t"
FIO_UPDATE"r+"

Appendix G - Partial Listing of NCP Calls

Following is a partial listing of NCP function calls. For more detailed information on NCP calls, obtain NetWare Client API For Assembly, Volumes 1 and 2, from Novell, Inc. at 1-800-REDWORD. Information on NCP calls is also available from Novell on CD-Rom.

NCP Function Name Entry CodeSub. Code
Abort Servicing Queue Job And File0x17 0x73
Add Audit Property0x58 0x02
Add Bindery Object to Set0x17 0x41
Add Trustee to Directory0x16 0x0D
Allocate Permanent Directory Handle0x16 0x12
Attach Queue Server To Queue0x17 0x6F
Broadcast to Console0x15 0x09
Change Bindery Object Password0x17 0x40
Change Bindery Object Password Encrypted 0x170x4B
Change Bindery Object Security0x17 0x38
Change Property Security0x17 0x3B
Check Console Privileges0x17 0xC8
Clear File0x07None
Clear File Set0x08None
Close And Queue Capture File0x11 0x01
Close Bindery0x170x44
Close File And Start Job Queue0x17 0x69

Function and Variable NamesEx#1 Ex#2Ex#3 Ex#4Ex#5Ex#6 Ex#7
BTX:Call
X
DATA:Ascii
X
DATA:Char
X
X
X
DATA:Integer
X
DATA:String
X
X
DATE:Utf
X
DEBUG:Number
X
DIR:File:Copy
X
DIR:File:First
DIR:File:Get
X
DIR:File:Next
X
DIR:Object
X
DIR:Path:Get
X
DIR:Path:Set
X
False
X
X
FIO:Close
X
FIO:Eof
X
FIO:Open
X
FIO:Read:String
X
KEY:Last
X
KEY:Read
X
X
KEY:Ready
X
X
Local
X
X
X
X
X
MATH:Mod
X
X
NET:Bindery:First
X
NET:Bindery:Get
X
X
NET:Bindery:Next
X
NET:Bindery:Property:Exist
X
NET:Broadcast:Send
X
NET:Connection:Get
X
NET:Connection:Info
X
NET:Connection:Set
X
NET:Ncp:Call
X
NET:Queue:Job:Submit
X
NET:Server:Attach
X
NET:Server:Name
X
NET:STAT:Bytes:Received
X
NET:STAT:Bytes:Transmitted
X
NET:STAT:Directory:Searches
X
NET:STAT:Disk:Bytes:Read
X
NET:STAT:Disk:Bytes:Written
X
NET:STAT:Disk:Reads
X
NET:STAT:Disk:Writes
X
NET:STAT:FAT:Sectors:Dirty
X
NET:STAT:FAT:Sectors:Written
X
NET:STAT:File:Bytes:Read
X
NET:STAT:File:Bytes:Written
X
NET:STAT:File:Creates
X
NET:STAT:File:Deletes
X
NET:STAT:File:Opens
X
NET:STAT:File:Reads
X
NET:STAT:File:Renames
X
NET:STAT:File:Writes
X
NET:STAT:Packets:Received
X
NET:STAT:Packets:Routed
X
NET:STAT:Packets:Transmitted
X
NET:STAT:Record:Locks
X
NET:STAT:Server:Requests
X
NET:STAT:Server:Utilization
X
NET:STAT:Transactions
X
NewLine
X
X
X
NMX:Lib:Load
X
OBJECT:Make
X
Print
X
X
Quit
X
X
RPC:Call
X
STR:Length
X
X
X
STR:Pad:Right
X
STR:Repeat
X
X
STR:Sub
X
STR:Trim:All
X
SYS:Date:Get
X
SYS:Delay
X
X
SYS:Error:Number
X
X
X
SYS:Param
X
SYS:Param:Count
X
True
X
X
X
WIN:At
X
X
X
X
WIN:Clear
X
X
X
X
WIN:Close
X
X
WIN:Color
X
WIN:Cursor:Hide
X
X
WIN:Cursor:Show
X
X
WIN:Define
X
WIN:Menu:Define
X
WIN:Menu:Item:Add
X
WIN:Menu:Item:Name
X
WIN:Menu:Start
X
WIN:Popup
X
WIN:Say
X
X
X
WIN:Show
X
WIN:Title
X
X


Appendix H - Sample Code

The following are several NetBasic sample scripts:

BROADCST.BAS

BTRIEVE.BAS

NETBACK.BAS

NETSTAT.BAS

QUEUEJOB.BAS

SERVINFO.BAS

TYPE.BAS

BROADCST.BAS

Definition: List all existing groups on server. Select a group. Send a predefined message to all connected members of the group. Press the <ESCAPE> key to exit the application.

#include "KEY.H"

#include "NET.H"

#include "WIN.H"

Sub Main

' Declare local variables. Note: Global variables are not pre-declared

Local("Obj1","Obj2")

Local("Flag")

Local("Choice","I","J")

Local("Group","Message","Szbuf")

#define MAX_CONNECTIONS 250

WIN:Cursor:Hide

' Create a windowed menu with top left corner at Row 6, Column 5.

Window = WIN:MenuDefine(6,5)

WIN:Title(" Group Bindery List ")

' Initialize search for all user groups. Get first group found.

Obj1 = NET:Bindery:First ("*",NET_USER_GROUP)

Do While (Obj1.Error = 0)

' Expand Group Name to a length of 30 characters.

' Add Group Name to the menu list.

WIN:Menu:Item:Add(STR:Pad:Right(Obj1.Name,30))

' Get next group found in search initialized by NET:BINDERY:FIRST

Obj1 = NET:Bindery:Next(Obj1)

EndDo

Flag = 0

Choice = 1

Do While (True)

Do While (True)

' Initiate menu, highlight menu item at position (Choice) in the menu list.

Choice = WIN:Menu:Start(Choice)

' Retrieve the numeric value of the last keyboard input.

If (KEY:Last() = KEY_ENTER)

Exit

EndIf

If (KEY:Last() = KEY_ESC)

Flag = 1

Exit

EndIf

EndDo

If (Flag = 1)

Exit

EndIf

' Get the menu item at position (Choice) in the menu list.

' Trim off all blank characters.

Group = STR:Trim:All(WIN:Menu:Item:Name(Choice))

' Retrieve object defining the characteristics of the selected group.

Obj1 = NET:Bindery:Get(Group,NET_USER_GROUP)

Message = STR:Pad:Right("Testing BROADCAST.BAS",55)

I = 1

J = 0

Do While (I <= MAX_CONNECTIONS)

' Retrieve object defining the characteristics of server connection (I).

Obj2 = NET:Connection:Info(I)

If (Obj2.Error = 0)

' Is Obj2 a GROUP_MEMBERS property of Obj1?

If (NET:Bindery:Property:Exist (Obj1,"GROUP_MEMBERS",Obj2))

' Send (Message) to server connection (I).

NET:Broadcast:Send (Message,I)

EndIf

EndIf

I = I + 1

EndDo

Szbuf = "Delivered to all Connected Members of Group"

' Popup a window and display the provided message(s).

' Press any key to close popup window.

WIN:Popup("Message",Message,"",Szbuf,Group)

EndDo

' Close the menu list window.

WIN:Close(Window)

WIN:Cursor:Show

Return

BTRIEVE.BAS

Definition: Create a Btrieve database. Loop through the ASCII character set, while creating a Btrieve record representative of each character. When complete, display the first database record. Close the database and quit.

#include"basic.H"

#include "btrieve.H"

Sub main

' Declare local variables. Note: Global variables are not predeclared

Local("FileSpec")

Local("Handle","Keybuf","Data")

Local("i","j")

' Attempt to locate BTX.NLM. If it can not be found, quit the application, or load the app. and continue.

If (!NMX:Lib:Load("BTX"))

' Position cursor at Row 10, Column 20 and display error message.

WIN:At(10,20); WIN:Say("Error: Could not locate BTX NLM")

Quit

EndIf

WIN:Clear

WIN:At(2,3); WIN:Say("Creating Example BTrieve Database...")

' Create a BTrieve record.

FileSpec = BTX:Record:Make(30,1024,2)

' Create a Btrieve index.

FileSpec = FileSpec + BTX:Index:Make(1,10,BTX_DUP)

FileSpec = FileSpec + BTX:Index:Make(11,1,BTX_DUP)

' Create a Btrieve database.

' If using Btrieve Data Manager for DOS without BTX.NLM loaded, the file paths must include ' drive letters (A:...Z:), not volume names (SYS:)

Handle = BTX:Call ("",BTX_CREATE,FileSpec, STR:Length(FileSpec),"SYS:\DELME.BTV",0)

' Check status of BTX:Call. If the call failed, print error message and quit.

CheckError(Err,DEBUG:Number - 1,Handle)

' Open the Btrieve database.

Handle = BTX:Call("",BTX_OPEN,FileSpec,STR:Length(FileSpec),"SYS:\DELME.BTV",0)

CheckError(Err,DEBUG:Number - 1,Handle)

WIN:At(4,3); WIN:Say("Adding Records...")

' A variable must be passed for the key buffer on every Btrieve call. Depending on the operation, an ' application may set the key buffer to a particular value, or Btrieve may return a value to the key ' buffer. The variable you specified for the key buffer must be long enough to hold the entire value ' required by the operation.

Keybuf = STR:Repeat(" ",15)

i = 1; j = 6

Do While (i < 255)

If (i = 10)

i = i + 1

Loop

EndIf

Data = STR:Repeat(DATA:Char(i),30)

' Insert a record in the database.

Handle = BTX:Call (Handle,BTX_INSERT,Data,STR:Length(Data),Keybuf,0)

WIN:At(j,10); WIN:Say(Data)

CheckError(Err,DEBUG:Number - 1,Handle)

i = i + 1

j = j + 1

If (j = 18)

j = 6

EndIf

EndDo

' Get a handle to the first record in the database.

Handle = BTX:Call (Handle,BTX_GET_FIRST,FileSpec, STR:Length(FileSpec),Keybuf,0)

CheckError(Err,DEBUG:Number - 1,Handle)

WIN:At(20,3); WIN:Say("Printing First Btrieve Record ...")

WIN:At(22,3); WIN:Say(BTX:Data:Buffer(Handle))

' Close the database.

Handle = BTX:Call (Handle,BTX_CLOSE,FileSpec,STR:Length(FileSpec),"SYS:\DELME.BTV",0)

Return

NETBACK.BAS

Definition: Backup a predefined directory once a day to a predefined backup directory. Between backups check the time every five seconds. Relinquish control to the file server in the interim.

Sub Main

Local("Szbuf")

Local("OldDObj","NewDObj","DirObj1","DirObj2","FileObj")

Local("NewDay","DispRow","FileName","FileCnt")

#define BACKUP_DIR "SYS:TEMP\BACKUP"

#define DIR "SYS:TEMP"

#define TIME "02:00:00"

WIN:Clear

WIN:At(2,3); WIN:Say("NETBACK.NLM is active")

Szbuf = "At time " + TIME + " (HH:MM:SS) " + "each day"

WIN:At(4,5); WIN:Say(Szbuf)

Szbuf = "the contents of " + DIR + " will be backed up to " + BACKUP_DIR

WIN:At(5,5); WIN:Say(Szbuf)

WIN:At(7,5); WIN:Say("Press any key to deactivate NETBACK.NLM")

NewDay = True; DispRow = 9; FileCnt = 0; OldDObj = SYS:Date:Get

Do While (True)

' Get default file server date and time information.

NewDObj = SYS:Date:Get

' Should we check for a new day?

If (NewDay = False)

' Is it a new day?

If (DATE:Utf(NewDObj.Date,NewDObj.Time) >
DATE:Utf(OldDObj.Date,NewDObj.Time))

NewDay = True

OldDObj = NewDObj

EndIf

EndIf

' If it is a new day, is it past time to backup, and have we backed up already?

If ((DATE:Utf(NewDObj.Date,NewDObj.Time) > DATE:Utf(NewDObj.Date,TIME)) & (NewDay = True))

' Does the backup directory exist? If not create it.

DirObj1 = DIR:Object(DIR)

DirObj2 = DIR:Path:Get

DirObj2.Volume.Name = DirObj1.Volume.Name

DirObj2.Path = DirObj1.Path + DirObj1.File.Name

DIR:Path:Set(DirObj2)

DirObj1 = DIR:Object(BACKUP_DIR)

DirObj2 = DIR:File:Get("")

DirObj2.Name = DirObj1.File.Name

DIR:File:Set(DirObj2)

FileObj = DIR:File:First(DIR + "\*.*")

' Copy all files from the target directory to the backup directory.

Do While (FileObj.Error = 0)

If (FileObj.Type = "FILE")

FileName = FileObj.Name

If (STR:Length(FileObj.Extension) > 0)

FileName = FileName + "." + FileObj.Extension

EndIf

If (DIR:File:Copy(DIR + "\" + FileName,BACKUP_DIR + "\" + FileName) = True)

FileCnt = FileCnt + 1

If (DispRow = 20)

DispRow = 9

EndIf

Szbuf = (STR:Repeat" ",70)

WIN:At(DispRow,7); WIN:Say(Szbuf)

Szbuf = "File: " + FileName + " copied to " + BACKUP_DIR

WIN:At(DispRow,7); WIN:Say(Szbuf)

DispRow = DispRow + 1

EndIf

EndIf

FileObj = DIR:File:Next(FileObj)

EndDo

' Report the results of the backup.

Szbuf = STR:Repeat(" ",70)

WIN:At(22,5); WIN:Say(Szbuf)

Szbuf = "Backup completed for " + NewDObj.Date + " " + NewDObj.Time

WIN:At(22,5); WIN:Say(Szbuf)

Szbuf = STR:Repeat(" ",70)

WIN:At(23,5); WIN:Say(Szbuf)

WIN:At(23,5); WIN:Say(DATA:String(FileCnt) + " Files Copied")

NewDay = False; FileCnt = 0

EndIf

If (KEY:Ready)

Exit

EndIf

' Relinquish server control for 5 seconds.

SYS:Delay(5000)

EndDo

Return

NETSTAT.BAS

Definition: Display current network statistics. Relinquish server control for one second. Then clear server display, and present an updated version of the network statistics. Press any key to break out of the display loop.

Sub Main

Do While (True)

' Clear topmost window.

WIN:Clear

' Position cursor at Row 1, Column 1.

WIN:At(1,1)

' Print contents to server display at the current cursor position.

Print ("Server Utilization ",NET:STAT:Server:Utilization()," "); NewLine

Print("File Opens ",NET:STAT:File:Opens()); NewLine

Print("File Creates ",NET:STAT:File:Creates()); NewLine

Print("File Renames ",NET:STAT:File:Renames()); NewLine

Print("File Deletes ",NET:STAT:File:Deletes()); NewLine

Print("Directory Searches ",NET:STAT:Directory:Searches()); NewLine

Print("File Reads ",NET:STAT:File:Reads()); NewLine

Print("File Writes ",NET:STAT:File:Writes()); NewLine

Print("File Bytes Read ",NET:STAT:File:Bytes:Read()); NewLine

Print("File Bytes Written ",NET:STAT:File:Bytes:Written()); NewLine

Print("Disk Reads ",NET:STAT:Disk:Reads()); NewLine

Print("Disk Writes ",NET:STAT:Disk:Writes()); NewLine

Print("Disk Bytes Read ",NET:STAT:Disk:Bytes:Read()); NewLine

Print("Disk Bytes Written ",NET:STAT:Disk:Bytes:Written()); NewLine

Print("FAT Sectors Dirty ",NET:STAT:FAT:Sectors:Dirty()); NewLine

Print("FAT Sectors Written ",NET:STAT:FAT:Sectors:Written()); NewLine

Print("Packets Received ",NET:STAT:Packets:Received()); NewLine

Print("Packets Transmitted ",NET:STAT:Packets:Transmitted()); NewLine

Print("Bytes Received ",NET:STAT:Bytes:Received()); NewLine

Print("Bytes Transmitted ",NET:STAT:Bytes:Transmitted()); NewLine

Print("Packets Routed ",NET:STAT:Packets:Routed()); NewLine

Print("Server Requests ",NET:STAT:Server:Requests()); NewLine

Print("Record Locks ",NET:STAT:Record:Locks()); NewLine

Print("Transactions ",NET:STAT:Transactions()); NewLine

' Check for keyboard input in the keyboard buffer.

If (KEY:Ready())

Exit

EndIf

' Provide the number of milliseconds to relinquish server control.

SYS:Delay(1000)

EndDo

Return

SERVINFO.BAS

Definition: Retrieve an object containing information on the current server. Display the information in a defined window. Wait for a keyboard entry before exiting.

#include "NET.H"

#include "WIN.H"

Sub Main

' Declare local variables. Note: Global variables are not predeclared

Local( "ServObj")

Local ( "TT")

' Call Remote Procedure GETSINF1.BAS.

' See next page for a listing of GETSINF1.BAS code.

ServObj = RPC:Call( "", "GETSINF1.BAS")

' All object members are strings. DATA:Integer converts strings to integers.

If (DATA:Integer( ServObj.Server.TTSLevel) != 0)

TT = "Yes"

Else

TT = "No"

EndIf

' Create a window with top left corner at Row 6, Column 5, &

' bottom right corner at Row 16, Column 64.

WIN:Define(8,16,18,64)

WIN:Cursor:Hide

' Define foreground and background colors for the new window.

WIN:Color((WIN_FG_YELLOW + WIN_FG_LIGHT) + WIN_BG_BLUE)

WIN:Title( " File Server Information ")

' Make the new window visible.

WIN:Show

' Clear any text in the new window

WIN:Clear

' Position cursor at Row 1, Column 1 and display text "Server Name".

WIN:At( 2,2); WIN:Say( "Server Name:")

WIN:At ( 3,2); WIN:Say ( "NetWare Version:")

WIN:At ( 4,2); WIN:Say ( "OS Revision:")

WIN:At ( 5,2); WIN:Say ( "System Fault Tolerance:")

WIN:At ( 6,2); WIN:Say ( "Transaction Tracking:")

WIN:At ( 7,2); WIN:Say ( "Connections Supported:")

WIN:At ( 8,2); WIN:Say ( "Connections In Use:")

WIN:At ( 9,2); WIN:Say ( "Volumes Supported:")

WIN:Color ((WIN_FG_WHITE + WIN_FG_LIGHT) + WIN_BG_BLUE)

WIN:At ( 2,27); WIN:Say ( ServObj.Server.Name)

WIN:At ( 3,27); WIN:Say ( "Novell Netware v" + DATA:String (ServObj.Server.Version) + "." + DATA:String (ServObj.Server.SubVersion))

WIN:At ( 4,27); WIN:Say ( ServObj.Server.Revision)

WIN:At ( 5,27); WIN:Say ( "Level ", ServObj.Server.SFTLevel)

WIN:At ( 6,27); WIN:Say ( TT)

WIN:At ( 7,27); WIN:Say ( ServObj.Server.Connection.Max)

WIN:At ( 8,27); WIN:Say ( ServObj.Server.Connection.Used)

WIN:At ( 9,27); WIN:Say ( ServObj.Server.Volume.Max)

' Wait for keyboard input. Then retrieve the first character input.

KEY:Read

WIN:Cursor:Show

' Close the top most window.

WIN:Close

Return

Remote Procedure: GETSINF1.BAS

Local("ReqP","RepP")

Local("ServObj")

' Build request packet for NCP call - Get File Server Information.

ReqP = ""

' Append character with ASCII value 17 to end of string ReqP.

ReqP = ReqP + DATA:Char(17)

' Attach string length of ReqP to the front of string ReqP.

' Length is represented by ASCII characters.

Reqp = DATA:Char(STR:Length(Reqp) / 256) +

DATA:Char(MATH:Mod(STR:Length (Reqp),256)) + ReqP

' Request NCP call - Get File Server Information.

RepP = NET:Ncp:Call( 23,ReqP,256)

' If NetWare reported an error make an error object and return it in place of a server object.

If (Err != 0)

ServObj = Object:Make("ERROR",-101)

Return ( ServObj)

EndIf

' Extract subset strings from string RepP, and use them to make a server object.

ServObj = OBJECT:Make ( "ERROR", 0)

ServObj = ServObj + OBJECT:Make ( "SERVER.NAME", STR:Sub( RepP, 1, 48))

ServObj = ServObj + OBJECT:Make ( "SERVER.VERSION", DATA:Ascii( STR:SUB ( RepP,49,1)))

ServObj = ServObj + OBJECT:Make ( "SERVER.SUBVERSION",

DATA:Ascii( STR:SUB ( RepP,50,1)))

ServObj = ServObj + OBJECT:Make ( "SERVER.CONNECTION.MAX",

( DATA:Ascii ( STR:SUB ( RepP,52,1)) +

( DATA:Ascii ( STR:SUB ( RepP,51,1)) * 256)))

ServObj = ServObj + OBJECT:Make ( "SERVER.CONNECTION.USED",

( DATA:Ascii ( STR:SUB ( RepP,54,1)) +

( DATA:Ascii ( STR:SUB ( RepP,53,1)) * 256)))

ServObj = ServObj + OBJECT:Make ( "SERVER.CONNECTION.PEAK",

( DATA:Ascii ( STR:SUB ( RepP,61,1)) +

( DATA:Ascii ( STR:SUB ( RepP,60,1)) * 256)))

ServObj = ServObj + OBJECT:Make ( "SERVER.VOLUME.MAX",

( DATA:Ascii ( STR:SUB ( RepP,56,1)) +

( DATA:Ascii ( STR:SUB ( RepP,55,1)) * 256)))

ServObj = ServObj + OBJECT:Make ( "SERVER.REVISION",

DATA:Ascii( STR:SUB ( RepP,57,1)))

ServObj = ServObj + OBJECT:Make ( "SERVER.SFTLEVEL",

DATA:Ascii( STR:SUB ( RepP,58,1)))

ServObj = ServObj + OBJECT:Make ( "SERVER.TTSLEVEL",

DATA:Ascii( STR:SUB ( RepP,59,1)))

Return ( ServObj)

QUEUEJOB.BAS

Definition:Submit a file to a queue on an unattached server. QueueJob handles attaching to the remote server, and reattaching to the current server after the queue job is submitted.

#include "NET.H"

#include "WIN.H"

Sub Main

Local("OldServerName","NewServerName")

Local("ConObj","BindObj","QueueJob")

Local("QueueName","Type")

Local("Error")

' Get a server name. When zero is provided the default file server name is returned.

OldServerName = NET:Server:Name(0)

NewServerName = "HITECSOFT2"

' Return the connection ID used to communicate with the default file server.

ConObj = NET:Connection:Get

' Attach to the file server referenced on the provided file server name.

ConObj.ID = NET:Server:Attach(NewServerName)

' Set the connection ID to communicate with the file server just attached to.

ConObj = NET:Connection:Set(ConObj)

QueueName = "QLASERJETIII"

Type = NET_PRINT_QUEUE

' Retrieve object defining the characteristics of the selected group.

BindObj = NET:Bindery:Get(QueueName,Type)

If (BindObj.Error != 0)

NewLine

Print("Bindery object could not be found")

EndIf

' Submit file to queue defined by the bindery object BindObj.

Error = NET:Queue:Job:Submit(BindObj,"C:\AUTOEXEC.BAT")

If (Error = False)

NewLine

Print("Queue job send failed")

EndIf

ConObj = NET:Connection:Get

ConObj.ID = NET:Server:Attach(OldServerName)

ConObj = NET:Connection:Set(ConObj)

End sub

TYPE.BAS

Definition: Print file contents to screen. A file name must be provided as a command line argument.

#include "FIO.H"

#include "Key.H"

Sub main

Local("Source","SourceFile")

Local("DirObj")

Local("i","Szbuf")

' Check the number of command line arguments.

' Param 1 = App. Name, Param 2 = 1st argument, etc.

If (SYS:Param:Count < 2)

NewLine; Print("Usage: ",SYS:Param(1)," File_Name")

End sub

EndIf

' Retrieve the name of the file to be printed to screen.

Source = SYS:Param(2)

' Create an object describing the file characteristics ( Path, etc..)

DirObj = DIR:File:Get(Source)

If (DirObj.Error != 0)

Print("File not found!"); NewLine

Quit

EndIf

' Open file in Read Only, and Text mode.

SourceFile = FIO:Open(Source,FIO_READ_ONLY + FIO_TEXT)

If (Err != 0)

Print("Error Opening File"); NewLine

Quit

EndIf

i = 1

' Check for End of File.

Do While (!FIO:Eof(SourceFile))

Szbuf = FIO:Read:String(SourceFile)

Print(Szbuf); NewLine

If (i = 23)

Print("Press any key to continue (ESC to Abort) ....", DATA:Char(13))

Print(" ",DATA:Char(13))

If (KEY:Read = KEY_ESC); Exit; EndIf

i = 1

EndIf

i = i + 1

EndDo

NewLine; FIO:Close(SourceFile)

End sub

Appendix I - BTX Constant Names

Following is a listing of all defined constants declared in SYS:NETBASIC\INCLUDE\BTRIEVE.H.

BTRIEVE.H contains NetBasic definitions for the Btrieve operation codes. The operation code parameter tells Btrieve which operation to perform. The application must specify a valid operation code for every Btrieve call. Include BTRIEVE.H in any NetBasic application accessing Btrieve.

Btrieve Contant Names Values
BTX_OPEN0
BTX_CLOSE1
BTX_INSERT2
BTX_UPDATE3
BTX_DELETE4
BTX_GET_EQUAL5
BTX_GET_NEXT6
BTX_GET_PREVIOUS7
BTX_GET_GT8
BTX_GET_GE9
BTX_GET_LT10
BTX_GET_LE11
BTX_GET_FIRST12
BTX_GET_LAST13
BTX_CREATE14
BTX_STAT15
BTX_EXTEND16
BTX_SET_DIR17
BTX_GET_DIR18
BTX_BEGIN_TRAN19
BTX_END_TRAN20
BTX_ABORT_TRAN21
BTX_GET_POSITION22
BTX_GET_DIRECT23
BTX_STEP_NEXT24
BTX_STOP25
BTX_VERSION26
BTX_UNLOCK27
BTX_RESET28
BTX_SET_OWNER29
BTX_CLEAR_OWNER30
BTX_BUILD_INDEX31
BTX_DROP_INDEX32
BTX_STEP_FIRST33
BTX_STEP_LAST34
BTX_STEP_PREVIOUS35
BTX_GET_NEXT_EXTENDED36
BTX_GET_PREV_EXTENDED37
BTX_STEP_NEXT_EXT38
BTX_STEP_PREVIOUS_EXT39
BTX_EXT_INSERT40
BTX_MISC_DATA41
BTX_CONTINUOUS42
BTX_SEEK_PERCENT44
BTX_GET_PERCENT45
BTX_CHUNK_UPDATE53
BTX_VAR_RECS1
BTX_BLANK_TRUNC2
BTX_PRE_ALLOC4
BTX_DATA_COMP8
BTX_KEY_ONLY16
BTX_BALANCED_KEYS32
BTX_FREE_1064
BTX_FREE_20128
BTX_FREE_30FREE_10 + FREE_20
BTX_DUP_PTRS256
BTX_SPECIFY_KEY_NUMS1024
BTX_VATS_SUPPORT2048
BTX_DUP1
BTX_MOD2
BTX_BIN4
BTX_NUL8
BTX_SEG16
BTX_ALT32
BTX_DESC_KEY64
BTX_REPEAT_DUPS_KEY128
BTX_EXTTYPE_KEY256
BTX_MANUAL_KEY512
BTX_NOCASE_KEY1024
BTX_KEYONLY_FILE16384
BTX_PENDING_KEY32768

Class Literal ValueClass Literal Value Class Literal Value
"AFP Server""Locality" "Print Server"
"Bindery Object""Messaging Routing Group" "Printer"
"Bindery Queue""Messaging Server" "Profile"
"Computer""NCP Server" "Resource"
"Country""Organization" "Server"
"Device""Organizational Person" "Top"
"Directory Map""Organizational Role" "Unknown"
"External Entity""Organizational Unit" "User"
"Group""Partition" "Volume"
"List""Person"

Attribute Literal ValueAttribute Literal Value Attribute Literal Value
"Account Balance""Locked By Intruder" "Path"
"ACL""Lockout After Detection" "Physical Delivery Office Name"
"Aliased Object Name""Login Allowed Time Map" "Postal Address"
"Allow Unlimited Credit""Login Disabled" "Postal Code"
"Authority Revocation""Login Expiration Time" "Postal Office Box"
"Back Link""Login Grace Limit" "Postmaster"
"Bindery Object Restriction" "Login Grace Remaining""Print Server"
"Bindery Property""Login Intruder Address" "Printer"
"Bindery Type""Login Intruder Attempts" "Printer Configuration"
"Cartridge""Login Intruder Limit" "Printer Control"
"CA Private Key""Login Intruder Reset Time" "Print Job Configuration"
"CA Public Key""Login Maximum Simultaneous" "Private Key"
"Certificate Revocation""Login Script" "Profile"
"Certificate Validity Interval" "Login Time""Profile Membership"
"CN""Low Convergence Reset Time" "Public Key"
"Convergence""Low Convergence Sync Interval" "Queue"
"C""Mailbox ID" "Queue Directory"
"Cross Certificate Pair""Mailbox Location" "Received Up To"
"Default Queue""Member" "Reference"
"Description""Memory" "Replica"
"Detect Intruder""Message Server" "Resource"
"Device""Messaging Database Location" "Revision"
"DS Revision""Messaging Routing Group" "Role Occupant"
"EMail Address""Messaging Server" "SAP Name"
"External Name""Messaging Server Type" "Security Equals"
"External Synchronizer""Minimum Account Balance" "Security Flags"
"Facsimile Telephone Number" "Network Address""See Also"
"Full Name""Network Address Restriction" "Serial Number"
"Generational Qualifier""NNS Domain" "Server"
"GID""Native Name" "Server Holds"
"Given Name""Notify" "S"
"Group Membership""Obituary" "Status"
"High Convergence Sync Interval" "Object Class""SA"
"Higher Privileges""Operator" "Supported Connections"
"Home Directory""OU" "Supported Gateway"
"Host Device""O" "Supported Services"
"Host Resource Name""Owner" "Supported Typefaces"
"Host Server""Page Description Language" "Surname"
"Synchronized Up To""Partition Control" "Telephone Number"
"Inherited ACL""Partition Creation Time" "Title"
"Initials""Password Allow Change" "Type Creator Map"
"Intruder Attempt Reset Interval" "Password Expiration Interval" "UID"
"Intruder Lockout Reset Interval" "Password Expiration Time""Unknown"
"L""Password Minimum Length" "Unknown Base Class"
"Language""Password Required" "User"
"Last Login Time""Password Unique Required" "Version"
"Last Referenced Time""Passwords Used" "Volume"

Appendix J - NDS Attribute Syntax Definitions

Back Link


Back Link - Used for the Back Link attribute, which the Directory uses for its internal management.

Matching Rules

Equality

Used In

Back Link


Boolean


Boolean - Used for attributes whose values represent true or false. In the Directory Services API, true is represented as one (1), while false is represented as zero (0).

Matching Rules

Equality

Used In

Allow Unlimited CreditLockout After Detection Password Required
Detect IntruderLogin Disabled Password Unique Required
Locked By IntruderPassword Allow Change

Remarks

Two boolean attributes match for equality if they are both TRUE or both FALSE.

Any attribute defined using this syntax is single-valued.

Case Exact String


Case Exact String - Used in attributes whose values are strings for which the case (upper or lower) is significant when performing comparisons.

Matching Rules

EqualitySubstrings

Used In

(none)

Remarks

Two case exact strings match for equality when they are of same length and their corresponding characters are identical. For example, "Dundee" and "DUNDEE" do not match.

In comparing case exact strings, the following spaces are not significant:

Leading spaces (those preceding the first printing character)

Trailing spaces (those following the last printing character)

Multiple consecutive internal spaces (these are taken as equivalent to a single space character)

Attributes conforming to this syntax are matched in a manner omitting those spaces that are not significant (as defined above). Also, there is no guarantee that insignificant spaces will be preserved by the Directory. A name server is free to omit insignificant spaces when storing an attribute value.

Case Ignore List


Case Ignore List - Used for attributes whose values are ordered sequences of strings for which the case (upper or lower) is not significant when performing comparisons.

Matching Rules

Equality

Used In

Language

Remarks

Two case ignore lists match for equality if and only if the number of strings in each is the same, and all corresponding strings match. For two corresponding strings in the list to match they must be the same length and their corresponding characters must be identical (according to the rules for case ignore strings).

When comparing the strings in case ignore lists, the following spaces are regarded as not significant:

Leading spaces (those preceding the first printing character)

Trailing spaces (those following the last printing character)

Multiple consecutive internal spaces (these are taken as equivalent to a single space character).

Attributes conforming to this syntax are matched in a manner omitting those spaces that are not significant (as defined above). Also, there is no guarantee that insignificant spaces will be preserved by the Directory. A name server is free to omit insignificant spaces when storing an attribute value.

Case Ignore String


Case Ignore String - Used in attributes whose values are strings for which the case (upper or lower) is not significant when performing comparison.

Matching Rules

EqualitySubstrings

Used In

C (Country Name)Mailbox ID SA (Street Address)
CartridgeMessaging Server Type SAP Name
CN (Common Name)NNS Domain Supported Gateway
DescriptionO (Organization Name) Supported Services
Full NameOU (Organizational Unit Name) Supported Typefaces
Generational QualifierPhysical Delivery Office Name Surname
Given NamePostal Code Title
Host Resource NamePostal Office Box Unknown Base Class
InitialsQueue Directory Version
L (Locality Name)S (State or Province Name)

Remarks

Two case ignore strings match for equality when they are of the same length and their corresponding characters are identical in all respects except that of case. For example, as case ignore strings, "Dundee" and "DUNDEE" would be equal.

When comparing case ignore strings, the following spaces are not significant:

Leading spaces (those preceding the first printing character)

Trailing spaces (those following the last printing character)

Multiple consecutive internal spaces (these are taken as equivalent to a single space character)

Attributes conforming to this syntax are matched in a manner omitting those spaces that are not significant (as defined above). Also, there is no guarantee that insignificant spaces will be preserved by the Directory. A name server is free to omit insignificant spaces when storing an attribute value.

Class Name


Class Name - Used for attributes whose values represent object class names.

Matching Rules

Equality

Used In

Object Class

Remarks

The matching rule for values of Class Name are the same as those for Case Ignore String.

Counter


Counter - Used for attributes whose values are signed integers.

Matching Rules

EqualityOrdering

Used In

Account BalanceLogin Intruder Attempts Remarks
Login Grace RemainingRevision

Any attribute defined using this syntax is single-valued. This syntax differs from Integer in that any value added to an attribute of this syntax is added to the total, and any value deleted is subtracted from the total.

Distinguished Name


Distinguished Name - Used for attributes whose values are the names of objects in the Directory tree.

Matching Rules

Equality

Used In

Aliased Object NameMember Reference
Default QueueMessage Routing Group Resource
DeviceMessage Server Role Occupant
Equivalent To MeMessaging Server Security Equals
Group MembershipOperator See Also
Higher PrivilegesOwner Server
Host DevicePostmaster User
Host ServerProfileVolume
Mailbox LocationProfile Membership

E-mail Address


E-mail Address - Used for attributes whose values represent Email addresses.

Matching Rules

Equality

Used In

E-mail Address

Facsimile Telephone Number


Facsimile Telephone Number - Specifies a string that complies with the internationally agreed format for showing international telephone numbers, E.123, and an optional bit string formatted according to Recommendation T.30.

Matching Rules

Equality

Used In

Facsimile Telephone Number

Remarks

Facsimile Telephone Number values are matched based on the telephone number field. The rules for matching fax telephone numbers are identical to those for the Case Exact syntax except that all space and hyphen (-) characters are skipped during the comparison.

Hold


Hold - Used for attributes whose values represent an object name/level pair.

Matching Rules

Equality

Used In

Server Holds

Integer


Integer - Used for attributes whose values are signed integers.

Matching Rules

EqualityOrdering

Used In

Bindery Object RestrictionLogin Intruder Limit Security Flags
ConvergenceLogin Maximum Simultaneous Status
DS RevisionMemorySupported Connections
GID (Group ID)Minimum Account Balance UID (User ID)
Login Grace LimitPassword Minimum Length

Remarks

Two integers' attributes match for equality if they are the same. The ordering rules for integers apply.

Interval


Interval - Used for attributes whose values represent intervals of time.

Matching Rules

EqualityOrdering

Used In

Certificate Validity IntervalHigh Convergence Sync Interval Intruder Attempt Reset Interval
Intruder Lockout Reset IntervalLow Convergence Sync Interval Password Expiration Interval

Net Address


Net Address - Used for network addresses in the NetWare environment. The address type indicates the type of communications protocol used (IPX™, AppleTalk*, and so on).

Matching Rules

Equality

Used In

Login Intruder AddressNetwork Address Network Address Restriction

Remarks

For two values of Net Address to match, the type, length, and value of the address must match. The address length is the number of bytes. The address itself is stored as a binary string. This string is the literal value of the address. To display it as a hexadecimal value, you must convert each 4-bit nibble to the correct character (0,1,2,3,...F).

Numeric String


Numeric String - Used for attributes whose values are numeric strings as defined in CCITT X.208.

Matching Rules

EqualitySubstrings

Used In

Bindery Type

Remarks

For two numeric strings to match for equality, the strings must be the same length and their corresponding characters must be identical. The following characters are in the numeric string character set:

0..9digits
Space character

When comparing numeric strings, the following spaces are not significant:

Attributes conforming to this syntax are matched in a manner omitting those spaces that are not significant (as defined above). Also, there is no guarantee that insignificant spaces will be preserved by the Directory. A name server is free to omit insignificant spaces when storing an attribute value.

Object ACL


Object ACL - Used for attributes whose values represent ACL entries.

Matching Rules

Approximate Matching Equality

Used In

ACLInherited ACL

Remarks

An Object ACL value can protect either an object or an attribute. The protected object is always the one that contains the ACL attribute. If an ACL entry is to apply to the object as a whole, the protected attribute name should be left empty (NULL). If a specific attribute is to be protected, it should be named in the ACL entry.

An ACL value can be matched against either a subject or a privilege set, or both. If the subject name is not to be considered in the comparison, it should be specified as NULL. If the privilege set is not to be considered in the comparison, an approximate match with a privilege set value of zero should be specified.

The Object ACL syntax supports both matching for equality and approximate matching. The difference between matching for equality and approximate matching concerns the privileges field of the comparison value. When matching for equality, the privilege set must match exactly for the comparison to succeed. When approximate matching has been selected, any bits in the privilege field in the filter that are set must also be set in the target. Any other bits in the target are ignored.

Values with the same protectedAttrName and subjectName are considered to be duplicate, and so are not permitted.

Octet List


Octet List - Used to describe an ordered sequence of octet strings.

Matching Rules

Approximate EqualsEquality

Used In

(none)

Remarks

A presented octet list matches a stored list if the presented list is a subset of the stored list. Octet strings are so designated because they are not interpreted by the Directory. They are simply a series of bits with no Unicode* implications. The length is the number of bits divided by 8. Thus each octet represents eight bits of data. The number of data bits will always be evenly divisible by 8.

Octet String


Octet String - Used for attributes whose values are byte strings uninterpreted by the Directory.

Matching Rules

EqualityOrdering

Used In

Authority RevocationBindery Property CA Private Key
CA Public KeyCertificate Revocation Cross Certificate Pair
External NameExternal Synchronizer Login Allowed Time Map
ObituaryPasswords Used Printer Configuration
Private KeyPublic Key Replica Up To

Remarks

For two octet strings to match, they must be the same length and the corresponding bit sequence (octets) must be identical. When comparing two strings, the first pair of octets that do not match are used to determine the order of the strings. These are not Unicode strings.

Path


Path - The Path syntax is used for attributes that represent a file system path.

Matching Rules

Equality

Used In

Home DirectoryMessaging Database Location Path

Remarks

The string represented by path is compared for equality using the same rules that Case Exact String uses.

The volumeName must refer to a volume object that already exists in the Directory.

Postal Address


Postal Address - Used for attributes whose values are postal addresses.

Matching Rules

Equality

Used In

Postal Address

Remarks

An attribute value for Postal Address will be typically composed of selected attributes from the MHS Unformatted Postal O/R Address version 1 according to Recommendation F.401. The value is limited to 6 lines of 30 characters each, including a Postal Country Name. Normally the information contained in such an address could include an addressee's name, street address, city, state or province, postal code and possibly a postal office box number depending on the specific requirements of the named object.

The matching rules for values of this type are the same as those for Case Ignore List.

Printable String


Printable String - Used in attributes whose values are printable strings as defined in CCITT X.208. The case (upper or lower) is significant when comparing printable strings.

Matching Rules

EqualitySubstrings

Used In

Page Description LanguageSerial Number

Remarks

The following characters are in the printable string character set:

A..Zupper case alphabetic characters
a..zlower case alphabetic characters
0..9digits
space character
'apostrophe
(left parenthesis
)right parenthesis
+plus sign
,comma
-hyphen
.full stop (period)
/solidus (slash)
:colon
=equal sign
?question mark

Two printable strings match for equality when they are the same length and their corresponding characters are identical. For example, as printable strings, "Dundee" and "DUNDEE" do not match.

When comparing printable strings, the following spaces are not significant:

Leading spaces (those preceding the first printing character)

Trailing spaces (those following the last printing character)

Multiple consecutive internal spaces (these are taken as equivalent to a single space character)

Attributes conforming to this syntax are matched in a manner omitting those spaces that are not significant (as defined above). Also, there is no guarantee that insignificant spaces will be preserved by the Directory. A name server is free to omit insignificant spaces when storing an attribute value.

Replica Pointer


Replica Pointer - Used for attributes whose values represent partition replicas.

Matching Rules

Equality

Used In

ReplicaRemarks

Each value of this syntax is composed of five parts:

The complete name of the name server that stores the replica

A value describing the capabilities of this copy of the partition: master, secondary, read-only

A number representing the replica

A value indicating the number of replicas that exist

A network address giving a hint for a node at which the name server probably resides.

The matching rules for values of Replica Pointer are based on the replica server name field only, and are the same as those for Distinguished Name.

The replicaAddressHint length is variable and can be calculated by count multiplied by the length of Net_Address_T (that is, count multiplied by 9).

Stream


Stream - Used for login scripts and other stream attributes.

Matching Rules

(none)

Used In

Login ScriptPrint Job Configuration
Printer ControlType Creator Map

Remarks

Any attribute defined with this syntax is single-valued. When returned from read or search, it returns an empty octet string. When added, the value is ignored. The value of any attribute of this syntax must be read or written using NWDSOpenStream, followed by standard file Read/Write functions.

Telephone Number


Telephone Number - Used for attributes whose values are telephone numbers.

Matching Rules

EqualitySubstrings

Used In

Telephone Number

Remarks

The length of telephone number strings must be between 1 and 32. The rules for matching telephone numbers are identical to those for the Case Exact attribute syntax except that all space and hyphen (-) characters are skipped during the comparison.

Time


Time - Used for attributes whose values represent time.

Matching Rules

EqualityOrdering

Used In

Last Login TimeLogin Expiration Time Login Intruder Reset Time
Login TimeLow Convergence Reset Time Password Expiration Time

Remarks

A Time value consists of a whole number of seconds, where zero equals 12:00 midnight, January 1, 1970, UTC.

Two Time values are compared by comparing the Integer_T values.

Timestamp


Timestamp - Used for attributes whose values mark the time when a particular event occurred or will occur.

Matching Rules

EqualityOrdering

Used In

Last Referenced TimePartition Creation Time
Received Up ToSynchronized Up To

Remarks

A Timestamp value consists of a whole number of seconds, where zero equals 12:00 midnight, January 1, 1970, UTC. The event ID is an integer which further orders events occurring within the same whole-second interval.

Two Time values are compared by comparing the whole second fields and then the event ID fields. If the whole seconds fields are unequal, order is determined by that field alone. If the whole seconds fields are equal and the event ID fields are unequal, order is determined by the event ID fields. If both fields are equal, the time stamps are equal.

Typed Name


Typed Name - Used for attributes whose values represent a level and an interval associated with an object.

Matching Rules

Equality

Used In

NotifyPartition Control Print Server
PrinterQueue

Remarks

The level of the attribute indicates the priority. The interval indicates the frequency of reference.

The values are user-assigned and relative. To be effective they must be implemented by the user. The user can use them to implement iterative intervals or to enforce priorities.

Unknown


Unknown - Used for attributes whose attribute definition was deleted from the schema.

Matching Rules

(none)

Used In

Unknown