Showing posts with label XDOLoader. Show all posts
Showing posts with label XDOLoader. Show all posts

Friday, 30 May 2008

XDOLoader Part 2 - UPLOAD syntax

Yesterday, I ran through the DOWNLOAD syntax of XDOLoader to download XML Publisher templates and data definitions to a local machine.
OK - I admit that having the file download syntax without the corresponding UPLOAD syntax is not much use! So, let's take a closer look at the UPLOAD syntax:

java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
-DB_USERNAME \
-DB_PASSWORD \
-JDBC_CONNECTION \
-LOB_TYPE \
-APPS_SHORT_NAME \
-LOB_CODE \
-LANGUAGE \
-TERRITORY \
-XDO_FILE_TYPE \
-NLS_LANG \
-FILE_NAME \
-CUSTOM_MODE [FORCENOFORCE] \
-LOG_FILE


I'll only describe those parameters that are different from yesterday:

XDO_FILE_TYPE: The XML Publisher Type i.e. PDF, RTF, XLS, XSL-FO, XSL-HTML, XSL-XML,
XSL-TEXT, XSD, XML, RTF-ETEXT
NLS_LANG: The value of your NLS_LANG environment variable e.g. American_America.WE8ISO8859P1
FILE_NAME: The name of XML Publisher File to upload
CUSTOM_MODE: Set this to FORCE to update an existing template

UPLOAD EXAMPLE:

Here's a shell script that I use to upload files:
------------------------
# Get parameters
apps_psw=$1
jdbc_con=$2
app_short_name=$3
lob_code=$4
filename=$5
filetype=$6
#Upload XML Publisher Template
% java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
-DB_USERNAME apps \
-DB_PASSWORD $apps_psw \
-JDBC_CONNECTION $jdbc_con \
-LOB_TYPE TEMPLATE \
-APPS_SHORT_NAME $app_short_name \
-LOB_CODE $lob_code \
-NLS_LANG American_America.WE8ISO8859P1 \
-LANGUAGE en \
-TERRITORY US \
-XDO_FILE_TYPE $filetype \
-FILE_NAME $filename \
-CUSTOM_MODE FORCE \
-LOG_FILE xdotmpl.log
------------------------


ADDITIONAL NOTES:

1) You must set your APPL_TOP and CLASSPATH before running the XDOLoader
2) Don't forget to FNDLOAD the XML Publisher metadata using xdotmpl.lct before uploading the XML Publisher template or data template. Without this, you wont be able to view the file uploaded from the XML Publisher Administrator responsibility. I'll leave that syntax for you to look up ;-)

Thursday, 29 May 2008

XDOLoader Part 1 - XML Publisher DOWNLOAD mode syntax

It surprises me how few people are aware of the generic loader (XDOLoader) for XML / BI Publisher (BIP) files.

Like FNDLOAD for AOL / XML Publisher metadata and WFLOAD for Workflow Item Types, XDOLoader is is a command line utility that allows you to migrate the BIP files between environments. The following BIP file types can be upload and downloaded:

- TEMPLATE
- XML_SCHEMA
- XML_SAMPLE
- DATA TEMPLATE

Call XDOLoader in DOWNLOAD mode to create a local copy of the relevant object.
Call XDOLoader in UPLOAD mode to load your local definitions into the database.

Here's the DOWNLOAD syntax and some examples for Oracle E-Business suite users:

DOWNLOAD MODE SYNTAX:

% java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME \
-DB_PASSWORD \
-JDBC_CONNECTION \
-LOB_TYPE \
-APPS_SHORT_NAME \
-LOB_CODE \
-LANGUAGE \
-TERRITORY \
-LOG_FILE \
-DEBUG

KEY (for E-Business suite Users):

-DB_USERNAME: apps username for the target instance
-DB_PASSWORD: apps password for the target instance
-JDBC_CONNECTION: JDBC connection string (e.g. server:port:sid)
of the target instance
-LOB_TYPE: The XML Publisher object type.
One of 'TEMPLATE', 'XML_SCHEMA', 'XML_SAMPLE' or 'DATA TEMPLATE'
-APPS_SHORT_NAME: Application short name used to register the XML Publisher object
-LOB_CODE: Template code i.e. concurrent program short name
-LANGUAGE: ISO language code(i.e. en) used when registering the object
-TERRITORY: ISO language code(i.e. GB) used when registering the object
-LOG_FILE: Name of the log file. The default filename is xdotmpl.log
-DEBUG: Run in Debug mode. Valid values are 'true' or 'false'


DOWNLOAD MODE EXAMPLES:

This is the simple shell script that I use to download 'GB English' presentation and data templates.
(Note - Change your language and territory as appropriate):

-----------------------------------------
# Get parameters
apps_psw=$1
jdbc_con=$2
app_short_name=$3
lob_code=$4

# Download XML Publisher Template RTF and XSL
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD $apps_psw \
-JDBC_CONNECTION $jdbc_con \
-LOB_TYPE TEMPLATE \
-APPS_SHORT_NAME $app_short_name \
-LOB_CODE $lob_code \
-LANGUAGE en \
-TERRITORY GB \
-LOG_FILE xdotmpl.log \
-DEBUG true

# Download XML Publisher dataTemplate
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD $apps_psw \
-JDBC_CONNECTION $jdbc_con \
-LOB_TYPE DATA_TEMPLATE \
-APPS_SHORT_NAME $app_short_name \
-LOB_CODE $lob_code \
-LANGUAGE en \
-TERRITORY GB \
-LOG_FILE xdotmpl.log \
-DEBUG true

-----------------------------------------

ADDITIONAL NOTES:

1) Don't forget to download your XML Publisher metadata using the FNDLOAD utility. The control file name is xdotmpl.lct.

More on the UPLOAD syntax tomorrow!