JCShell error handling script?

Hi,

In JCShell, I need to set a variable in a script,

if my upload app command gives an error, I want to delete it and then install the cap file.

I am not able to capture this delete error bcoz the shell exits the script immediately on a failure.

the script looks like:

/card

auth

card-info

#install the cap file

upload -d "xyzApp.cap"

#if cannot install, delete the package and retry

#if ${DeletePkg} == 1

delete -r |xyz

upload -d "xyzApp.cap"

#end

Is it possible to set the variable "DeletePkg" to 1 or 0 depending on the status word received from upload cmd?

Or get info from card-info and then decide to send the delete cmd or not?

Thanks,

priti

[768 byte] By [ptangia] at [2007-11-27 8:33:15]
# 1

From the JCOP Tools user guide:

Script Errors

If the JCShell command execution returns an error, the execution of the script will be terminated and the error description will be reported.

Starting the command line with a "-" character allows to continue script execution in case of errors. The JCShell will report the error and continue with the next command in the script.

Example:

-delete 1122334455

This works only in scripts.

lexdabeara at 2007-7-12 20:29:21 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
Thanks, that worked!!!
ptangia at 2007-7-12 20:29:21 > top of Java-index,Java Mobility Forums,Consumer and Commerce...