### NBS_END_DEFINITION

End the definition of a noticeboard and then create the noticeboard, save the definition in a file, or save the definition plus data in a file

#### Description:

Check that we are currently in the middle of defining a noticeboard.
Calculate how large the definition and data parts of the noticeboard are.
Relocate all pointers in the definition so that they are relative to zero rather than being actual program virtual addresses (actually they are made relative to a small positive integer to avoid problems with zero pointers).
If the option parameter indicates, write the definition and optionally the data to a file (a default file extension of .NBD is applied).
Otherwise, create the noticeboard, copy the definition to it, write the calling process’ id to the global section to denote ownership and mark the noticeboard as being valid.
De-allocate the memory area used to amass the noticeboard definition and note that we are no longer defining a noticeboard.

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

#### Invocation

(int) = NBS_END_DEFINITION (NAME,OPTION,STATUS)

#### Arguments

##### NAME = CHARACTER$\ast$($\ast$) (Given)
If OPTION is DEFINITION_SAVE or NOTICEBOARD_SAVE, the name of the file to write the definition or definition plus data to (with a default file type of .NBD). Otherwise (OPTION is CREATE_NOTICEBOARD) the name of the noticeboard to create.
##### OPTION = CHARACTER$\ast$($\ast$) (Given)
Option that governs whether the noticeboard definition or definition plus data is saved to a file or whether the noticeboard is simply created on the spot without being associated with a file. Can be abbreviated so long as it remains unambiguous but this is not recommended because new options may be supported in the future. Case is not significant. Possible values are:

[DEFINITION_SAVE:] Save the definition to a file that does not contain space allocated for the data.

[NOTICEBOARD_SAVE:] Save the definition to a file that does contains space allocated for the data.

[CREATE_NOTICEBOARD:] Create the noticeboard immediately without associating it with a file. This is assumed if an illegal value of OPTION is given.

##### STATUS = INTEGER (Given and returned)
The global status. Possible return values are,
 NBS__NOTDEFINING Not currently defining a noticeboard

 NBS__CANTOPEN  Can’t create the definition file

 NBS__CANTWRITE  Can’t write the definition file

 NBS__SECTIONEXISTED Noticeboard of this name already

 existed.

 SS$_* System service codes from SYS$CRMPSC