next up previous 372
Next: NBS_RESTORE_NOTICEBOARD - Restore a noticeboard definition and data from file and create the noticeboard
Up: Description of Individual NBS Routines
Previous: NBS_END_DEFINITION - End the definition of a noticeboard and then create the noticeboard, save the definition in a file, or


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*(*) (Given)
The name to give the noticeboard (and thus the name of the noticeboard).
SAVE_NAME = CHARACTER*(*) (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

Prior Requirements
None.



next up previous 372
Next: NBS_RESTORE_NOTICEBOARD - Restore a noticeboard definition and data from file and create the noticeboard
Up: Description of Individual NBS Routines
Previous: NBS_END_DEFINITION - End the definition of a noticeboard and then create the noticeboard, save the definition in a file, or

NBS The Noticeboard System
Starlink User Note 77
D.J. Allan
11 September 1995
E-mail:ussc@star.rl.ac.uk