ERROR when Calling batch file within another batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kalanidhig
Posts: 2
Joined: 14 May 2013 20:48

ERROR when Calling batch file within another batch

#1 Post by kalanidhig » 14 May 2013 20:55

hi
i am calling startscen.bat with four parameter, i want to call multiple batch with different parament.
here are the example
i am keeping following script with in a single batch

Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_AGILE_PERSISTEDSTAGE_LISTNAME 001 GLOBAL 6

Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_AGILE_PERSISTEDSTAGE_LISTENTRY 001 GLOBAL 6

but i am getting error while running

C:\Apps\ODI11g\oracledi\agent\bin>A9MetadataTask.bat

C:\Apps\ODI11g\oracledi\agent\bin>Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_
AGILE_PERSISTEDSTAGE_LISTNAME 001 GLOBAL 6Call startscen.bat SDE_AGILE_A931_ADAP
TOR_SDE_AGILE_PERSISTEDSTAGE_LISTENTRY 001 GLOBAL 6
Error parsing logLevel:6Call should be an integer

(c) Copyright Oracle. All rights reserved.

PRODUCT
Oracle Data Integrator

FILENAME
startscen.(bat|sh)

DESCRIPTION
Starts a scenario. See Oracle Data Integrator documentation for the detailed

syntax.

SYNTAX
startscen.(bat|sh) <scenario_name> <version> <context_code> [<log_level>] [
-SESSION_NAME=<session_name>] [-KEYWORDS=<keywords>] [-AGENT_URL=<agent_url>] [-
NAME=<agent_name>] [-ASYNC=(false|true)] [<variable>=<value>]*
-ASYNC=false is default; -ASYNC=true is valid only if -AGENT_URL is specif
ied
PREREQUISITES
The REPOSITORY CONNECTION INFORMATION section of odiparams.(bat|sh) should be

completed before running this script.

can you suggest how to make it work?

Thanks
Kalanidhi

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: ERROR when Calling batch file within another batch

#2 Post by foxidrive » 14 May 2013 22:01

kalanidhig wrote:hi

Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_AGILE_PERSISTEDSTAGE_LISTNAME 001 GLOBAL 6

Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_AGILE_PERSISTEDSTAGE_LISTENTRY 001 GLOBAL 6

but i am getting error while running

C:\Apps\ODI11g\oracledi\agent\bin>A9MetadataTask.bat

C:\Apps\ODI11g\oracledi\agent\bin>Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_
AGILE_PERSISTEDSTAGE_LISTNAME 001 GLOBAL 6Call startscen.bat SDE_AGILE_A931_ADAP
TOR_SDE_AGILE_PERSISTEDSTAGE_LISTENTRY 001 GLOBAL 6
Error parsing logLevel:6Call should be an integer



The error shows that the two lines in the batch file are not separated by a blank line or carriage return and line feed.

Try firstly executing one line at a time. If that works then put the two commands on separate lines in a batch file and try that.

Another possibility is that your startscen.bat is causing the issue.

kalanidhig
Posts: 2
Joined: 14 May 2013 20:48

Re: ERROR when Calling batch file within another batch

#3 Post by kalanidhig » 14 May 2013 22:38

if i keep single batch like

Call startscen.bat SDE_AGILE_A931_ADAPTOR_SDE_AGILE_PERSISTEDSTAGE_LISTENTRY 001 GLOBAL 6

is working fine, when i am keeping more than one batch call, am getting the error.

Thanks
Kalanidhi

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: ERROR when Calling batch file within another batch

#4 Post by foxidrive » 15 May 2013 04:30

Which text editor are you using to create the batch file? Is it separating the lines with hex 0D0A ?

Try copy and pasting the two lines into notepad and saving it as a .bat file.
I can't believe this is caused by an editor fault...

Post Reply