NBS_RESTORE_DEFINITION

Restore a noticeboard definition from file and create the noticeboard

Description:

Open the file and determine the noticeboard size.
Check that the data part was not saved to the file.
Create the noticeboard.
Read the definition part of the file into the noticeboard.
Write the calling process’ id to the noticeboard to denote ownership and mark the noticeboard as being valid.
Close the file.

If the noticeboard already existed, NBS__SECTIONEXISTED status is returned and the calling process becomes its owner.

Invocation

(Int) = NBS_RESTORE_DEFINITION (NAME,SAVE_NAME,STATUS)

Arguments

NAME = CHARACTER$\ast$($\ast$) (Given)
The name to give the noticeboard (and thus the name of the noticeboard).
SAVE_NAME = CHARACTER$\ast$($\ast$) (Given)
The name of the file from which to read the definition (with a default file type of .NBD)
STATUS = INTEGER (Given and returned)
The global status. Possible return values are,
 NBS__CANTOPEN  Can’t create the definition file

 NBS__DATASAVED  Noticeboard data was saved to the

 definition file — cannot restore only defn

 NBS__CANTREAD  Can’t read the definition file

 NBS__BADVERSION Wrong version in definition file

 NBS__SECTIONEXISTED Noticeboard of this name already

 existed.

 SS$_* System service codes from SYS$CRMPSC

None.