XSR_COMPLETE

The XSR_COMPLETE procedure is the final stored procedure to be called as part of the XML schema registration process, which registers XML schemas with the XSR. An XML schema is not available for validation until the schema registration completes through a call to this stored procedure.

Authorization

The privileges held by the authorization ID of the statement must include the following:
  • The following system authorities:
    • The system authority *EXECUTE on the service program associated with the procedure,
    • The system authority *EXECUTE on the SYSPROC library,
    • The system authority *EXECUTE on the library containing the *SQLXSR object, and
    • The ALTER privilege for the *SQLXSR object.
  • Start of changeDatabase administrator authorityEnd of change
The privileges held by the authorization ID of the statement must include at least one of the following:
  • For the XSROBJECTS, XSROBJECTCOMPONENTS, XSROBJECTHIERARCHIES, and XSRANNOTATIONINFO catalog tables:
    • The UPDATE privilege on XSROBJECTS, XSROBJECTCOMPONENTS, and XSROBJECTHIERARCHIES,
    • The INSERT privilege on XSRANNOTATIONINFO, and
    • The system authority *EXECUTE on library QSYS2.
  • Start of changeDatabase administrator authorityEnd of change

The user ID of the caller of the procedure must have the EXECUTE privilege on the XSR_COMPLETE stored procedure.

Syntax

Read syntax diagramSkip visual syntax diagramXSR_COMPLETE(rschema, name,schemaproperties,issuedfordecomposition )

Description

The schema is SYSPROC.

rschema
An input parameter of type VARCHAR(128) that specifies the SQL schema for the XML schema. It must be a valid SQL identifier. The SQL schema is one part of the qualified name used to identify this XML schema in the XSR. (The other part of the name is supplied by the name parameter). This parameter can have the NULL value which indicates that name is implicitly qualified based on the rules specified in Qualification of unqualified object names.
If rschema is specified, it cannot be QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP.
name
An input parameter of type VARCHAR(128) that specifies the name of the XML schema. It must be a valid SQL identifier. The complete name for the XML schema for which a completion check is to be performed is rschema.name. The XML schema name must already exist as a result of calling the XSR_REGISTER stored procedure, and XML schema registration cannot yet be completed. This parameter cannot have the NULL value. Rules for valid characters and delimiters that apply to any SQL identifier also apply to this parameter.
schemaproperties
An input parameter of type BLOB(5M) that specifies properties, if any, associated with the XML schema. The values for this parameter is either NULL, if there are no associated properties, or an XML document representing the properties for the XML schema.
issuedfordecomposition
An input parameter of type INTEGER that indicates if an XML schema is to be used for decomposition. If an XML schema is to be used for decomposition, this value should be set to 1; otherwise, it should be set to 0.

Example

The following example calls the XSR_COMPLETE stored procedure:

  CALL SYSPROC.XSR_COMPLETE(
    'MyLib',
    'MySchema',
    :schemaproperty_host_var,
    0)