XDOLoad.sh Korn shell errors out while loading

Hi All,

O/S :AIX 6.1 64 bits

The following shell script errors out while loading:

cat XDOLoad.sh

#!/usr/bin/ksh

%s_contextfile%

%s_adjvaprg% oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME %s_apps_user% -DB_PASSWORD ${1} -JDBC_CONNECTION %s_dbhost%.xyz:%s_dbport%:%s_db_serv_sid% -LOB_TYPE DATA_TEMPLATE -APPS_SHORT_NAME XX -LOB_CODE XX_SUBACC -LANGUAGE en -TERRITORY US -XDO_FILE_TYPE XML -NLS_LANG AMERICAN -FILE_CONTENT_TYPE 'text/html' -FILE_NAME %c_xxcno_top%/patch/115/publisher/defs/XX.xml -OWNER ORACLE -CUSTOM_MODE FORCE

exit 0


$ ./XDOLoad.sh apps
./XDOLoad.sh[3]: %s_contextfile%:  not found
./XDOLoad.sh[5]: %s_adjvaprg%:  not found

What is the fix for this please?

Thanks for your time!

Regards,

What are these %..% strings, are those DOS variables, or preprocessing markers? They are alien to ksh syntax...

preprocessing markers to get the values from variables of xml files

For example,

grep s_apps_user $CONTEXT_FILE
            <username oa_var="s_apps_user">APPS</username>

What is the fix for this issue?

Thanks,

First preprocess the script and then execute the resulting script, I suppose...

The %..% variables are defined to accept the values from the xml file -> $CONTEXT_FILE

How can we fix that in the shell script as above?

Thanks,

A quick Google revealed this post on oracle.com about the unix syntax.

https://forums.oracle.com/forums/thread.jspa?threadID=2330229

Hi,

But the requirement is such, we need to get the shell script executed by using:

%..% variables defined to accept the values from the xml file -> $CONTEXT_FILE

Could anyone please help?

Thanks & Regards,

There is no off-the-shelf generic method to parse a xml file in unix Shell script, but sometimes is is possible with brute force.
Can you post a sample, blotting any confidential data values with X's ?

I would expect there be some process, that processes the xml and the script and that replaces the %...% variables with actual values, thus producing a resulting script, that conforms to ksh syntax and that can be executed using ksh. What that process entails, I could not tell you...