The BIND command binds the specified wizard generated service code to the loaded inbound XML document or creates a new empty outbound XML document.
The SERVICE keyword value is used in a resource property lookup using the property key service.'value' and service.archive.'value' to locate the binding class and the binding jar file that contains the binding class and supporting classes generated by the XMLBinding Wizard. If the service binding archive entry does not exist, then the binding jar file must exist in the JSM jar subdirectory instead of a user specified directory.
You will need to specify the type of bind as outbound or inbound - a READ and GET are normally associated with an inbound type while SET and WRITE are normally associated with an outbound type.
The position of the BIND command in the code depends on whether you are intending to read data from an existing XML document or you are intending to create a new XML document.
If you are reading from an existing document, the code flow will be something like this:
GET (one or more times)
Whereas, creating an XML document would require the following sequence of commands:
SET (one or more times)
BIND SERVICE(ORDERS) TYPE(*INBOUND) BINDTRACE(*YES)