PQ73844: WSCP W/PQ60191 STILL REPORTING INCORRECT RETURN CODES OF RC=0 EVEN THOUGH THE COMMAND DOES NOT SUCCEED

 A fix is available

4.0.6: WebSphere Application Server Version 4.0 Fix Pack 6



APAR status
Closed as program error.

Error description
WAS 4.0.4 included 
PQ60191 which was for WSCP.SH does not
correctly provide return values if the command failed for some
reasons.
.
They are still experiencing WSCP returning an incorrect return
code of RC=0 even though the command does not succeed.
.
Tested it with a wrong command (wscp.sh -c "ApplicationServer
lst") and still got return code 0. After reading in the specific
APAR description (
PQ60191) it was found that there has to be set
a property 'wscp.useNewRetCode' to some non-null value. Now we
get the expected return code <> 0.
.
Two cases detected where WSCP does still report incorrect
return codes (i.e., RC=0 even that command does not succeed):
.
./wscp.sh -c "source not_existing_file" gives
couldn't read file "not_existing_file"
with RC=0
.
and
.
./wscp.sh -c "source incorrect_file" gives
WSCP0170E: Either "-moduleappservers" or "-defappserver" must be
specified
with RC=0
.
The second sample derived from an input file where erranously a
line break exists before the option -defappserver. While we
accept that the command fails the return code shouldn't be set
to 0.
.
Also another situation:
AppServer and Appl 'Tool_Servlets_Examples' has not been
stopped yet. Trying several times to remove the application:
.
wscp> EnterpriseApp remove
{/EnterpriseApp:Tool_Servlets_Examples/}
wscp> EnterpriseApp remove
{/EnterpriseApp:Tool_Servlets_Examples/}
...
wscp> EnterpriseApp remove
{/EnterpriseApp:Tool_Servlets_Examples/}
.
It doesn't report an error (while the application of course
never can be removed).
Local fix
None available at this time.
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server users of the    *
*                 wscp client program.                         *
****************************************************************
* PROBLEM DESCRIPTION: WSCP returns 0 exit code even if        *
*                      errors have occurred.                   *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
When wscp is processing a directive from the command line and
that command fails, wscp will return an exit code of 0.  For
example, the following commands will fail yet wscp will still
return exit code of 0:

  wscp -c "ApplicationServer txyz3" ("txyz3 is invalid token)

  wscp -c "source foo.dog.cat" (where foo.dog.cat does not
                                exist)
Problem conclusion
Added code to check for errors when processing command
line ("-c") directives and return non-zero exit code
if errors are present.
Temporary fix
Testfix available on:
wasdoc0:/APARS/PQ66291/WS4.04/PQ66291_eFix.jar
and README may be found at:
wasdoc0:/APARS/PQ66291/WS4.04/README.txt
Comments
APAR information
APAR number PQ73844
Reported component name WEBSPHERE AE AI
Reported component ID 5630A2200
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2003-05-05
Closed date 2003-05-05
Last modified date 2003-05-05

APAR is sysrouted FROM one or more of the following:
PQ66291

APAR is sysrouted TO one or more of the following:

Modules/Macros
WSCP          

SRLS

Fix information
Fixed component name WEBSPHERE AE AI
Fixed component ID 5630A2200

Applicable component levels
R400 PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ73844
IBM Group: Software Group
Modified date: May 5, 2003