Envelope a document (-ENVELOPE) command

The -ENVELOPE (-ENV) command envelopes a document as specified in the Standards Processing Engine (SPE) database and returns a response from SPE in XML format.

The XML response file contains the document IDs of the enveloped documents. The metadata schema of the XML response is defined by the wtx_install_dir\Response.xsd file.

The -ENVELOPE command supports both deferred and immediate enveloping

-ENVELOPE command syntax
>>-+- -DBURL-+--+-db_URL------+--+---------------------+-------->
   '- -DURL--'  '-db_cfg_file-'  +- -DBUSER--user_name-+   
                                 '- -U--user_name------'   

>--+--------------------+-- -DBDRIVER--driver_name-------------->
   +- -DBPSWD--password-+                            
   '- -P--password------'                            

>--+-------------------------+---------------------------------->
   '- -DBSCHEMA--schema_name-'   

>--+------------------------------+--+- -SENDER-+--sender_ID---->
   +- -URL--file_URL--------------+  '- -S------'              
   +-+- -DOCID-+--doc_ID----------+                            
   | '- -ID----'                  |                            
   |               .-;--------.   |                            
   |               V          |   |                            
   '-+- -BATCH-+-+---file_URL-+-+-'                            
     '- -H-----' | .-;------.   |                              
                 | V        |   |                              
                 '---doc_ID-+---'                              

>--+- -RECEIVER-+--receiver_ID---------------------------------->
   '- -R--------'                

>--+- -ALIAS-+--acceptor_lookup_alias--------------------------->
   '- -A-----'                          

>--+-----------------------------+------------------------------>
   +- -EDISTANDARD--edi_standard-+   
   '- -E--edi_standard-----------'   

>--+--------------------------------+--------------------------->
   +- -SENDERQUAL--sender_qualifier-+   
   '- -SNDQ--sender_qualifier-------'   

>--+------------------------------------+----------------------->
   +- -RECEIVERQUAL--receiver_qualifier-+   
   '- -RCVQ--receiver_qualifier---------'   

>--+-------------------------------------------------------------+-->
   '-+-+- -DEFERRED-+----+-+-----------------------------------+-'   
     | '- -DEF------'    | '-+- -INTERCHANGE-+--interchange_ID-'     
     '-+- -GETDEFERRED-+-'   '- -I-----------'                       
       '- -GETDEF------'                                             

>--+- -ENVELOPE-+--+--------+--+-----------+-------------------->
   '- -ENV------'  '- -KEEP-'  '- -ALLDOCS-'   

>--+---------------+-------------------------------------------><
   '-data_from_map-'

-DBURL

-DURL

Identifies the SPE database by either the database URL or the file URL of a configuration file that contains the database connection information. If you specify a configuration file, the SPE adapter uses only the database connection information in the configuration file. The adapter ignores any -DBDRIVER, -DBUSER, -DBPSWD, or -DBSCHEMA keywords on the adapter command line. The -DBURL keyword is required.

-DBUSER

-U

Specifies the SPE database user name. The -DBUSER keyword is required only for certain types of databases.

-DBPSWD

-P

Specifies the SPE database password. The -DBPSWD keyword is required only for certain types of databases.

-DBDRIVER

Specifies the name of the JDBC driver that connects to the SPE database. The -DBDRIVER keyword is required for all database types.

-DBSCHEMA

Specifies the name of the SPE database schema. The -DBSCHEMA keyword is required only for certain types of databases.

-URL

Specifies the file URL of the document to envelope. A relative path for the file URL resolves to the directory of the map that invokes the -ENVELOPE command. The -URL keyword is optional, but you must specify one of the -URL, -DOCID, -BATCH or data_from_map options.

-DOCID

-ID

Specifies the document ID of a single document to envelope. The -DOCID keyword is optional, but you must specify one of the -URL, -DOCID, -BATCH or data_from_map options.

-BATCH

-H

Identifies a group of documents to envelope by file URLs or document IDs. The -BATCH keyword is optional, but you must specify one of the -URL, -DOCID, -BATCHor data_from_map options.

-SENDER

-S

Specifies the document sender that is used to locate the envelope information in the SPE database. The -SENDER keyword is required.

-RECEIVER

-R

Specifies the document receiver that is used to locate the envelope information in the SPE database. The -RECEIVER keyword is required.

-ALIAS

-A

Specifies the acceptor look-up alias to locate the envelope information in the SPE database. The -ALIAS keyword is required.

-EDISTANDARD

-E

Specifies the EDI standard that is used to locate the envelope information in the SPE database. The -EDISTANDARD keyword is optional; however, you must specify the -EDISTANDARD keyword if you specify the -SENDERQUAL or -RECEIVERQUAL keywords.

-SENDERQUAL

-SNDQ

Specifies the document sender qualifier that is used to locate the envelope information in the SPE database. The -SENDERQUAL keyword is optional. If you specify the -SENDERQUAL keyword, you must specify the -EDISTANDARD keyword.

-RECEIVERQUAL

-RCVQ

Specifies the document receiver qualifier that is used to locate the envelope information in the SPE database. The -RECEIVERQUAL keyword is optional. If you specify the -RECEIVERQUAL keyword, you must specify the -EDISTANDARD keyword.

-DEFERRED

-DEF

Specifies deferred enveloping mode. The-DEFERRED keyword is optional. If you omit the keyword, enveloping is immediate. The -DEFERRED keyword and the -GETDEFERRED keyword are mutually exclusive.

-GETDEFERRED

-GETDEF

Gets the deferred documents from the SPE database to envelope them. The-GETDEFERRED keyword is optional. The -DEFERRED keyword and the -GETDEFERREDkeyword are mutually exclusive.

-INTERCHANGE

-I

Specifies the customer-defined interchange identifier that is associated with the documents in the SPE database. You can use the interchange identifier later to select only the documents that were prepared with a particular identifier. The interchange identifier is optional with the -DEFERRED or the -GETDEFERRED keywords.

-KEEP

Retains the documents that are returned in the SPE response. The SPE adapter stores the documents in the local file system and uses the document ID as the file name. The -KEEP keyword is optional.

-ALLDOCS

Specifies that SPE is to return all documents in the XML response file, including type=INTERMEDIATE documents. The -ALLDOCS keyword is optional. If you omit it, SPE returns only type=FINAL documents in the XML response file.

data_from_map

Specifies the data bytes to be enveloped. The data_from_map bytes are returned from the third parameter of a GET function in the map. The data_from_map bytes are optional.