METADATA Procedure

PROC METADATA Statement

Sends an XML string to the metadata server

Syntax

PROC METADATA <server-connection-arguments>
<METHOD = DOREQUEST | STATUS>
IN = "XML–string" | fileref
<OUT = fileref>
<HEADER = NONE | SIMPLE | FULL>
<VERBOSE>;

Required Argument

IN= "XML-string " | fileref
specifies an input XML string or fileref. The type of XML string that is submitted depends on whether the METHOD= argument is specified, and what its value is.
  • If the METHOD= argument is omitted, or if it specifies METHOD=DOREQUEST, IN= specifies an XML-formatted method call, or IN= specifies an XML file that contains the method call.
    You form the method call as if you are submitting it in the inMetadata parameter of the DoRequest method. You can submit any method from the SAS Open Metadata Interface IOMI server interface and the IServer Status method. For more information, see Concepts: METADATA Procedure.
  • If METHOD=STATUS, IN= specifies an XML element that is valid in the inMeta parameter of the IServer Status method, or IN= specifies an XML file that contains the XML element. For more information, see Concepts: METADATA Procedure.
Note:PROC METADATA does not support fixed-length records in the XML method call under z/OS. PROC METADATA returns an error on files with fixed-length records whether a fileref or XML string is used.

Optional Arguments

HEADER= NONE | SIMPLE | FULL
specifies whether to include an XML header in the output XML file. The declaration specifies the character-set encoding for Web browsers and XML parsers to use when processing national language characters in the output XML file. For more information, see HEADER= Argument.
NONE
omits an encoding declaration. Web browsers and parsers might not handle national language characters appropriately.
SIMPLE
inserts an XML header that specifies the XML version number: <?xml version="1.0"?>.
FULL
inserts an XML declaration that represents the encoding that was specified when creating the output XML file. The source for the encoding varies, depending on the operating environment. In general, the encoding value is taken from the ENCODING= option specified in the FILENAME statement, or from the ENCODING= system option.
SAS attempts to use that encoding for the output XML file (and in the XML header). The encoding can vary. A single encoding can have multiple names or aliases that can appear in the XML header. These names might not be valid or recognized in all XML parsers. When generating the encoding attribute in the XML header, SAS attempts to use an alias that will be recognized by Internet Explorer. If the alias is not found, SAS attempts to use a name that will be recognized by Java XML parsers. If the name is not found, SAS uses an alias by which SAS will recognize the encoding.
For information about encoding and transcoding, see SAS National Language Support (NLS): Reference Guide.
METHOD=DOREQUEST | STATUS
specifies whether PROC METADATA is submitting an IOMI DoRequest method call or an IServer Status method call in the IN= argument. If the METHOD= argument is omitted, the default is DoRequest. For more information, see Concepts: METADATA Procedure.
OUT=fileref
specifies an XML file in which to store the output that is returned by the metadata server. The value must be a fileref, not a pathname. Therefore, you must first submit a FILENAME statement to assign a fileref to a pathname. In most cases, the output XML string is identical to the input XML string, with the addition of the requested values within the XML elements. If the OUT= argument is omitted, PROC METADATA output is written to the SAS log. For more information, see Results: METADATA Procedure. See also Filerefs with the IN= and OUT= Arguments.
Notes:PROC METADATA can generate large XML output. You might need to specify a large LRECL value or RECFM=N (streaming output) to avoid truncation of long output lines.

Under z/OS, fixed-length records in the XML method call are not supported by PROC METADATA. Specify RECFM=V (or RECFM=N as suggested above) when you create the XML method call.

VERBOSE
specifies to print the input XML string to the SAS log after it has been preprocessed. For more information, see VERBOSE Argument.

Server Connection Arguments

The server connection arguments establish communication with the metadata server. If you omit these arguments, then the values of the metadata system options are used, or the values can be obtained interactively. For more information, see Connection Options .

PASSWORD="password"
is the password for the authenticated user ID on the metadata server. If you do not specify PASSWORD=, the value of the METAPASS= system option is used. For more information, see METAPASS= System Option. The maximum length is 512 characters.
Alias:METAPASS= or PW=
PORT=number
is the TCP port that the metadata server listens to for requests. This port number was used to start the metadata server. If you do not specify PORT=, the value of the METAPORT= system option is used. For more information, see METAPORT= System Option. The range of allowed port numbers is 1–65535. The metadata server is configured with a default port number of 8561.
Alias:METAPORT=
Requirement:Do not enclose the value in quotation marks.
PROTOCOL=BRIDGE
specifies the network protocol for connecting to the metadata server. If you do not specify PROTOCOL=, the value of the METAPROTOCOL= system option is used. For more information, see METAPROTOCOL= System Option. In this release, the only supported value is BRIDGE, which specifies the SAS Bridge protocol. This is the server default, so there is no need to specify this argument.
Alias:METAPROTOCOL=
Requirement:Do not enclose the value in quotation marks.
REPOSITORY= "name"
is the name of the SAS Metadata Repository to use when resolving the $METAREPOSITORY substitution variable. PROC METADATA enables you to specify the substitution variable $METAREPOSITORY in your input XML. The substitution variable is resolved to the repository that you specify in REPOSITORY=. This value is the repository's Name= attribute. If you do not specify REPOSITORY=, the value of the METAREPOSITORY= system option is used. For more information, see METAREPOSITORY= System Option. The default for the METAREPOSITORY= system option is FOUNDATION. The maximum length is 32,000 characters.
Alias:METAREPOSITORY= or REPOS=
SERVER="host-name"
is the host name or network IP address of the computer that hosts the metadata server. The value LOCALHOST can be used if the SAS session is connecting to the metadata server on the same computer. If you do not specify SERVER=, the value of the METASERVER= system option is used. For more information, see METASERVER= System Option. The maximum length is 256 characters.
Alias:HOST= or IPADDR= or METASERVER=
USER="authenticated-user-ID"
is an authenticated user ID on the metadata server. The metadata server supports several authentication providers. For more information about authentication, see the SAS Intelligence Platform: Security Administration Guide. If you do not specify USER=, the value of the METAUSER= system option is used. For more information, see METAUSER= System Option. The maximum length is 256 characters.
Alias:ID= or METAUSER= or USERID=