The following examples demonstrate how to uninstall an application in the WebSphere Application Server V4 and V5:
call syscalls 'ON' signal on error say "FCT Test #processearfile" name. = 0 name.1 = "conversationname" name.2 = "j2eeservername" name.3 = "earfilename" val. = 0 val.1 = "API Functiontest" val.2 = "BBOASR4" val.3 = "/tmp/filetransfer_resolved.ear" rc = 4 i = 1 /* Generate XML Input */ do while(name.i <> '0') rc = XMLGEN("tempin" name.i val.i) if (rc == 4) then do say "FCT Test #processearfile failed while XMLGEN" exit end i = i+1 end; /* Call the function: processearfile */ rc = CB390CFG("-action 'processearfile' -xmlinput 'inputprocessearfile.xml' -input 'tempin' -output 'processearfile'") if (rc == 4) then do say "FCT Test #processearfile failed" exit end /* Parse the result */ rc = XMLPARSE("processearfile" "ALL") if (rc == 4) then do say "FCT Test #processearfile failed while XMLPARSE" exit end say "FCT Test #processearfile completed" return 0 exit error: say "Error in FCT Test #processearfile" rc "at line" sigl say sourceline(sigl) exit
The command sequence given below accomplishes approximately the same thing as the V4 SMAPI commands.
wsadmin> $AdminApp listWhen the wsadmin scripting tool lists the installed applications, you see output similar to the following:
WebContainerTestApplication adminconsole Greeting IvtApp
wsadmin> $AdminApp uninstall ivtAppWhen the application successfully uninstalls, you see a series of messages similar to the following:
ADMA5017I: Uninstallation of ivtApp started. ADMA5104I: Server index entry for SY1 was updated successfully. ADMA5102I: Deletion of config data for ivtApp from config repository completed successfully. ADMA5011I: Cleanup of temp dir for app ivtApp done. ADMA5106I: Application ivtApp uninstalled successfully.
wsadmin> $AdminConfig save