Appendix B - Reserved Key Names
Appendix C - Reserved Network Names
Appendix D - Reserved Error Names
Appendix E - Reserved Edit Field Keys
Appendix G - Partial Listing of NCP Calls
Appendix I - BTX Constant Names
Appendix J - NDS Attribute Syntax Definitions
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_Name | Integer Value |
Forground Colors: | ||
BLACK | WIN_FG_BLACK | 0 |
BLUE | WIN_FG_BLUE | 1 |
CYAN | WIN_FG_CYAN | 3 |
GREEN | WIN_FG_GREEN | 2 |
LIGHT | WIN_FG_LIGHT | 8 |
MAGENTA | WIN_FG_MAGENTA | 5 |
RED | WIN_FG_RED | 4 |
WHITE | WIN_FG_WHITE | 7 |
YELLOW | WIN_FG_YELLOW | 6 |
Background Colors: | ||
BLINK | WIN_BG_BLINK | 128 |
BLUE | WIN_BG_BLUE | 16 |
CYAN | WIN_BG_CYAN | 48 |
GREEN | WIN_BG_GREEN | 32 |
MAGENTA | WIN_BG_MAGENTA | 80 |
RED | WIN_BG_RED | 64 |
WHITE | WIN_BG_WHITE | 112 |
YELLOW | WIN_BG_YELLOW | 96 |
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 Name | Integer Value |
Alt F10 | KEY_ALT_F10 | 28928 |
Alt F3 | KEY_ALT_F3 | 27136 |
Alt F4 | KEY_ALT_F4 | 27392 |
Alt F6 | KEY_ALT_F6 | 27904 |
Alt F7 | KEY_ALT_F7 | 28160 |
Alt F8 | KEY_ALT_F8 | 28416 |
Alt F9 | KEY_ALT_F9 | 28672 |
AltF5 | KEY_ALT_F5 | 27648 |
Backspace | KEY_TAB | 9 |
Ctrl A | KEY_CTRL_A | 1 |
Ctrl B | KEY_CTRL_B | 2 |
Ctrl C | KEY_CTRL_C | 3 |
Ctrl D | KEY_CTRL_D | 4 |
Ctrl E | KEY_CTRL_E | 5 |
Ctrl End | KEY_CTRL_END | 29952 |
Ctrl F | KEY_CTRL_F | 6 |
Ctrl F1 | KEY_CTRL_F1 | 24064 |
Ctrl F2 | KEY_CTRL_F2 | 24320 |
Ctrl F3 | KEY_CTRL_F3 | 24576 |
Ctrl F4 | KEY_CTRL_F4 | 24832 |
Ctrl F5 | KEY_CTRL_F5 | 25088 |
Ctrl G | KEY_CTRL_G | 7 |
Ctrl H | KEY_CTRL_H | 8 |
Ctrl Home | KEY_CTRL_HOME | 30464 |
Ctrl I | KEY_CTRL_I | 9 |
Ctrl J | KEY_CTRL_J | 10 |
Ctrl K | KEY_CTRL_K | 11 |
Ctrl L | KEY_CTRL_L | 12 |
Ctrl Left Arrow | KEY_CTRL_LEFT | 29440 |
Ctrl M | KEY_CTRL_M | 13 |
Ctrl N | KEY_CTRL_N | 14 |
Ctrl O | KEY_CTRL_O | 15 |
Ctrl P | KEY_CTRL_P | 16 |
Ctrl Page Down | KEY_CTRL_PGDN | 30208 |
Ctrl Page Up | KEY_CTRL_PGUP | 33792 |
Ctrl Q | KEY_CTRL_Q | 17 |
Ctrl R | KEY_CTRL_R | 18 |
Ctrl Right Arrow | KEY_CTRL_RIGHT | 29696 |
Ctrl S | KEY_CTRL_S | 19 |
Ctrl T | KEY_CTRL_T | 20 |
Ctrl U | KEY_CTRL_U | 21 |
Ctrl V | KEY_CTRL_V | 22 |
Ctrl W | KEY_CTRL_W | 23 |
Ctrl X | KEY_CTRL_X | 24 |
Ctrl Y | KEY_CTRL_Y | 25 |
Ctrl Z | KEY_CTRL_Z | 26 |
Delete | KEY_DEL | 21248 |
Down Arrow | KEY_DOWN | 20480 |
End | KEY_END | 20224 |
Enter or Return | KEY_ENTER | 13 |
Escape | KEY_ESC | 27 |
F1 | KEY_F1 | 15104 |
F10 | KEY_F10 | 17408 |
F2 | KEY_F2 | 15360 |
F3 | KEY_F3 | 15616 |
F4 | KEY_F4 | 15872 |
F5 | KEY_F5 | 16128 |
F6 | KEY_F6 | 16384 |
F7 | KEY_F7 | 16640 |
F8 | KEY_F8 | 16896 |
F9 | KEY_F9 | 17152 |
Home | KEY_HOME | 18176 |
Insert | KEY_INS | 20992 |
Left Arrow | KEY_LEFT | 19200 |
Page Down | KEY_PGDN | 20736 |
Page Up | KEY_PGUP | 18688 |
Right Arrow | KEY_RIGHT | 19712 |
Shift F1 | KEY_SHIFT_F1 | 21504 |
Shift F10 | KEY_SHIFT_F10 | 23808 |
Shift F2 | KEY_SHIFT_F2 | 21760 |
Shift F3 | KEY_SHIFT_F3 | 22016 |
Shift F4 | KEY_SHIFT_F4 | 22272 |
Shift F5 | KEY_SHIFT_F5 | 22528 |
Shift F6 | KEY_SHIFT_F6 | 22784 |
Shift F7 | KEY_SHIFT_F7 | 23040 |
Shift F8 | KEY_SHIFT_F8 | 23296 |
Shift F9 | KEY_SHIFT_F9 | 23552 |
Shift Tab | KEY_SHIFT_TAB | 3840 |
Up Arrow | KEY_UP | 18432 |
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_ADMINISTRATION | 11 |
NET_ADVERTISING_PRINT_SERVER | 71 |
NET_ARCHIVE_SERVER_DYNAMIC_SAP | 46 |
NET_BF_DYNAMIC | 1 |
NET_BF_ITEM | 0 |
NET_BF_SET | 2 |
NET_BF_STATIC | 0 |
NET_BTRIEVE_VAP | 80 |
NET_FILE_SERVER | 4 |
NET_GROUP | 2 |
NET_JOB_QUEUE | 10 |
NET_NAS_SNA_GATEWAY | 33 |
NET_PRINT_QUEUE_USER | 83 |
NET_PRINT_QUEUE | 3 |
NET_READ_ANYONE | 0 |
NET_READ_LOGGED_CLIENT | 1 |
NET_READ_NETWARE | 4 |
NET_READ_SAME_CLIENT | 2 |
NET_READ_SUPERVISOR | 3 |
NET_REMOTE_BRIDGE_SERVER | 36 |
NET_TA_ALL | 255 |
NET_TA_CREATE | 8 |
NET_TA_DELETE | 16 |
NET_TA_MODIFY | 128 |
NET_TA_NONE | 0 |
NET_TA_OPEN | 4 |
NET_TA_OWNERSHIP | 32 |
NET_TA_READ | 1 |
NET_TA_SEARCH | 64 |
NET_TA_WRITE | 2 |
NET_TIME_SYNC_SERVER | 45 |
NET_UNKNOWN | 0 |
NET_USER_GROUP | 2 |
NET_USER | 1 |
NET_WILD | -1 |
NET_WRITE_ANYONE | 0 |
NET_WRITE_LOGGED_CLIENT | 1 |
NET_WRITE_NETWARE | 4 |
NET_WRITE_SAME_CLIENT | 2 |
NET_WRITE_SUPERVISOR | 3 |
NET_ARCHIVE_QUEUE | 8 |
NET_ARCHIVE_SERVER | 9 |
NET_GATEWAY | 6 |
NET_JOB_SERVER | 5 |
NET_PRINT_SERVER | 7 |
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 |
Edit field keys are used to move the cursor within
user input regions.
Key Name | Action |
Enter or Return | Moves the cursor to the next input region. |
Tab | Moves the cursor to the next input region. |
Shift Tab | Moves the cursor to the previous input region. |
Left Arrow | Moves the cursor one character to the left. |
Right Arrow | Moves the cursor one character to the right. |
Insert | Toggles between replace and insert modes. |
Delete | Deletes the character at the cursor. |
Backspace | Deletes the character to the left of the cursor. |
Escape | Aborts the input. |
Home | Moves 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 Arrow | Terminates the input. |
Ctrl Right Arrow | Terminates the input. |
Page Up | Terminates the input. |
Page Down | Terminates the input. |
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+" |
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 Code | Sub. Code |
Abort Servicing Queue Job And File | 0x17 | 0x73 |
Add Audit Property | 0x58 | 0x02 |
Add Bindery Object to Set | 0x17 | 0x41 |
Add Trustee to Directory | 0x16 | 0x0D |
Allocate Permanent Directory Handle | 0x16 | 0x12 |
Attach Queue Server To Queue | 0x17 | 0x6F |
Broadcast to Console | 0x15 | 0x09 |
Change Bindery Object Password | 0x17 | 0x40 |
Change Bindery Object Password Encrypted | 0x17 | 0x4B |
Change Bindery Object Security | 0x17 | 0x38 |
Change Property Security | 0x17 | 0x3B |
Check Console Privileges | 0x17 | 0xC8 |
Clear File | 0x07 | None |
Clear File Set | 0x08 | None |
Close And Queue Capture File | 0x11 | 0x01 |
Close Bindery | 0x17 | 0x44 |
Close File And Start Job Queue | 0x17 | 0x69 |
Function and Variable Names | Ex#1 | Ex#2 | Ex#3 | Ex#4 | Ex#5 | Ex#6 | Ex#7 |
BTX:Call | |||||||
DATA:Ascii | |||||||
DATA:Char | |||||||
DATA:Integer | |||||||
DATA:String | |||||||
DATE:Utf | |||||||
DEBUG:Number | |||||||
DIR:File:Copy | |||||||
DIR:File:First | |||||||
DIR:File:Get | |||||||
DIR:File:Next | |||||||
DIR:Object | |||||||
DIR:Path:Get | |||||||
DIR:Path:Set | |||||||
False | |||||||
FIO:Close | |||||||
FIO:Eof | |||||||
FIO:Open | |||||||
FIO:Read:String | |||||||
KEY:Last | |||||||
KEY:Read | |||||||
KEY:Ready | |||||||
Local | |||||||
MATH:Mod | |||||||
NET:Bindery:First | |||||||
NET:Bindery:Get | |||||||
NET:Bindery:Next | |||||||
NET:Bindery:Property:Exist | |||||||
NET:Broadcast:Send | |||||||
NET:Connection:Get | |||||||
NET:Connection:Info | |||||||
NET:Connection:Set | |||||||
NET:Ncp:Call | |||||||
NET:Queue:Job:Submit | |||||||
NET:Server:Attach | |||||||
NET:Server:Name | |||||||
NET:STAT:Bytes:Received | |||||||
NET:STAT:Bytes:Transmitted | |||||||
NET:STAT:Directory:Searches | |||||||
NET:STAT:Disk:Bytes:Read | |||||||
NET:STAT:Disk:Bytes:Written | |||||||
NET:STAT:Disk:Reads | |||||||
NET:STAT:Disk:Writes | |||||||
NET:STAT:FAT:Sectors:Dirty | |||||||
NET:STAT:FAT:Sectors:Written | |||||||
NET:STAT:File:Bytes:Read | |||||||
NET:STAT:File:Bytes:Written | |||||||
NET:STAT:File:Creates | |||||||
NET:STAT:File:Deletes | |||||||
NET:STAT:File:Opens | |||||||
NET:STAT:File:Reads | |||||||
NET:STAT:File:Renames | |||||||
NET:STAT:File:Writes | |||||||
NET:STAT:Packets:Received | |||||||
NET:STAT:Packets:Routed | |||||||
NET:STAT:Packets:Transmitted | |||||||
NET:STAT:Record:Locks | |||||||
NET:STAT:Server:Requests | |||||||
NET:STAT:Server:Utilization | |||||||
NET:STAT:Transactions | |||||||
NewLine | |||||||
NMX:Lib:Load | |||||||
OBJECT:Make | |||||||
Quit | |||||||
RPC:Call | |||||||
STR:Length | |||||||
STR:Pad:Right | |||||||
STR:Repeat | |||||||
STR:Sub | |||||||
STR:Trim:All | |||||||
SYS:Date:Get | |||||||
SYS:Delay | |||||||
SYS:Error:Number | |||||||
SYS:Param | |||||||
SYS:Param:Count | |||||||
True | |||||||
WIN:At | |||||||
WIN:Clear | |||||||
WIN:Close | |||||||
WIN:Color | |||||||
WIN:Cursor:Hide | |||||||
WIN:Cursor:Show | |||||||
WIN:Define | |||||||
WIN:Menu:Define | |||||||
WIN:Menu:Item:Add | |||||||
WIN:Menu:Item:Name | |||||||
WIN:Menu:Start | |||||||
WIN:Popup | |||||||
WIN:Say | |||||||
WIN:Show | |||||||
WIN:Title |
The following are several NetBasic sample scripts:
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
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
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
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
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)
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
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
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_OPEN | 0 |
BTX_CLOSE | 1 |
BTX_INSERT | 2 |
BTX_UPDATE | 3 |
BTX_DELETE | 4 |
BTX_GET_EQUAL | 5 |
BTX_GET_NEXT | 6 |
BTX_GET_PREVIOUS | 7 |
BTX_GET_GT | 8 |
BTX_GET_GE | 9 |
BTX_GET_LT | 10 |
BTX_GET_LE | 11 |
BTX_GET_FIRST | 12 |
BTX_GET_LAST | 13 |
BTX_CREATE | 14 |
BTX_STAT | 15 |
BTX_EXTEND | 16 |
BTX_SET_DIR | 17 |
BTX_GET_DIR | 18 |
BTX_BEGIN_TRAN | 19 |
BTX_END_TRAN | 20 |
BTX_ABORT_TRAN | 21 |
BTX_GET_POSITION | 22 |
BTX_GET_DIRECT | 23 |
BTX_STEP_NEXT | 24 |
BTX_STOP | 25 |
BTX_VERSION | 26 |
BTX_UNLOCK | 27 |
BTX_RESET | 28 |
BTX_SET_OWNER | 29 |
BTX_CLEAR_OWNER | 30 |
BTX_BUILD_INDEX | 31 |
BTX_DROP_INDEX | 32 |
BTX_STEP_FIRST | 33 |
BTX_STEP_LAST | 34 |
BTX_STEP_PREVIOUS | 35 |
BTX_GET_NEXT_EXTENDED | 36 |
BTX_GET_PREV_EXTENDED | 37 |
BTX_STEP_NEXT_EXT | 38 |
BTX_STEP_PREVIOUS_EXT | 39 |
BTX_EXT_INSERT | 40 |
BTX_MISC_DATA | 41 |
BTX_CONTINUOUS | 42 |
BTX_SEEK_PERCENT | 44 |
BTX_GET_PERCENT | 45 |
BTX_CHUNK_UPDATE | 53 |
BTX_VAR_RECS | 1 |
BTX_BLANK_TRUNC | 2 |
BTX_PRE_ALLOC | 4 |
BTX_DATA_COMP | 8 |
BTX_KEY_ONLY | 16 |
BTX_BALANCED_KEYS | 32 |
BTX_FREE_10 | 64 |
BTX_FREE_20 | 128 |
BTX_FREE_30 | FREE_10 + FREE_20 |
BTX_DUP_PTRS | 256 |
BTX_SPECIFY_KEY_NUMS | 1024 |
BTX_VATS_SUPPORT | 2048 |
BTX_DUP | 1 |
BTX_MOD | 2 |
BTX_BIN | 4 |
BTX_NUL | 8 |
BTX_SEG | 16 |
BTX_ALT | 32 |
BTX_DESC_KEY | 64 |
BTX_REPEAT_DUPS_KEY | 128 |
BTX_EXTTYPE_KEY | 256 |
BTX_MANUAL_KEY | 512 |
BTX_NOCASE_KEY | 1024 |
BTX_KEYONLY_FILE | 16384 |
BTX_PENDING_KEY | 32768 |
Class Literal Value | Class 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 Value | Attribute 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" |
Back Link - Used for the Back Link attribute, which
the Directory uses for its internal management.
Matching Rules
Equality |
Used In
Back Link |
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 Credit | Lockout After Detection | Password Required |
Detect Intruder | Login Disabled | Password Unique Required |
Locked By Intruder | Password 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 - Used in attributes whose values are strings
for which the case (upper or lower) is significant when performing
comparisons.
Matching Rules
Equality | Substrings |
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 - 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 - Used in attributes whose values are strings
for which the case (upper or lower) is not significant when performing
comparison.
Matching Rules
Equality | Substrings |
Used In
C (Country Name) | Mailbox ID | SA (Street Address) |
Cartridge | Messaging Server Type | SAP Name |
CN (Common Name) | NNS Domain | Supported Gateway |
Description | O (Organization Name) | Supported Services |
Full Name | OU (Organizational Unit Name) | Supported Typefaces |
Generational Qualifier | Physical Delivery Office Name | Surname |
Given Name | Postal Code | Title |
Host Resource Name | Postal Office Box | Unknown Base Class |
Initials | Queue 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 - 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 - Used for attributes whose values are signed integers.
Matching Rules
Equality | Ordering |
Used In
Account Balance | Login Intruder Attempts | Remarks |
Login Grace Remaining | Revision |
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 - Used for attributes whose values are the
names of objects in the Directory tree.
Matching Rules
Equality |
Used In
Aliased Object Name | Member | Reference |
Default Queue | Message Routing Group | Resource |
Device | Message Server | Role Occupant |
Equivalent To Me | Messaging Server | Security Equals |
Group Membership | Operator | See Also |
Higher Privileges | Owner | Server |
Host Device | Postmaster | User |
Host Server | Profile | Volume |
Mailbox Location | Profile Membership |
E-mail Address - Used for attributes whose values represent Email
addresses.
Matching Rules
Equality |
Used In
E-mail Address |
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 - Used for attributes whose values represent an object name/level
pair.
Matching Rules
Equality |
Used In
Server Holds |
Integer - Used for attributes whose values are signed integers.
Matching Rules
Equality | Ordering |
Used In
Bindery Object Restriction | Login Intruder Limit | Security Flags |
Convergence | Login Maximum Simultaneous | Status |
DS Revision | Memory | Supported Connections |
GID (Group ID) | Minimum Account Balance | UID (User ID) |
Login Grace Limit | Password Minimum Length |
Remarks
Two integers' attributes match for equality if they are the same.
The ordering rules for integers apply.
Interval - Used for attributes whose values represent intervals
of time.
Matching Rules
Equality | Ordering |
Used In
Certificate Validity Interval | High Convergence Sync Interval | Intruder Attempt Reset Interval |
Intruder Lockout Reset Interval | Low Convergence Sync Interval | Password Expiration Interval |
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 Address | Network 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 - Used for attributes whose values are numeric
strings as defined in CCITT X.208.
Matching Rules
Equality | Substrings |
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..9 | digits |
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 - Used for attributes whose values represent
ACL entries.
Matching Rules
Approximate Matching | Equality |
Used In
ACL | Inherited 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 - Used to describe an ordered sequence of octet strings.
Matching Rules
Approximate Equals | Equality |
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 - Used for attributes whose values are byte strings
uninterpreted by the Directory.
Matching Rules
Equality | Ordering |
Used In
Authority Revocation | Bindery Property | CA Private Key |
CA Public Key | Certificate Revocation | Cross Certificate Pair |
External Name | External Synchronizer | Login Allowed Time Map |
Obituary | Passwords Used | Printer Configuration |
Private Key | Public 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 - The Path syntax is used for attributes that represent a
file system path.
Matching Rules
Equality |
Used In
Home Directory | Messaging 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 - 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 - 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
Equality | Substrings |
Used In
Page Description Language | Serial Number |
Remarks
The following characters are in the printable string character
set:
A..Z | upper case alphabetic characters |
a..z | lower case alphabetic characters |
0..9 | digits |
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 - Used for attributes whose values represent partition
replicas.
Matching Rules
Equality |
Used In
Replica | Remarks |
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 - Used for login scripts and other stream attributes.
Matching Rules
(none)
Used In
Login Script | Print Job Configuration |
Printer Control | Type 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 - Used for attributes whose values are telephone
numbers.
Matching Rules
Equality | Substrings |
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 - Used for attributes whose values represent time.
Matching Rules
Equality | Ordering |
Used In
Last Login Time | Login Expiration Time | Login Intruder Reset Time |
Login Time | Low 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 - Used for attributes whose values mark the time when
a particular event occurred or will occur.
Matching Rules
Equality | Ordering |
Used In
Last Referenced Time | Partition Creation Time |
Received Up To | Synchronized 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 - Used for attributes whose values represent a level
and an interval associated with an object.
Matching Rules
Equality |
Used In
Notify | Partition Control | Print Server |
Printer | Queue |
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 - Used for attributes whose attribute definition was deleted from the schema.
Matching Rules
(none)
Used In
Unknown