Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323265 - zos shell does not display return value of previous command correctly
Summary: zos shell does not display return value of previous command correctly
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 11:42 EDT by Violaine Batthish CLA
Modified: 2010-08-20 11:49 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Violaine Batthish CLA 2010-08-20 11:42:08 EDT
Build Identifier: RSE Core 3.2 (20100607-1030), Eclipse RCP I20100608-0911

Reported by an RDz customer and reproduced.
When running a command in the z/OS UNIX shell, the user should be able to enter the following command to display the return value of the previous command
echo $?
However, in the shell, the return value is always 0, regardless of whether or not it should be.

As discussed with Dave McKnight:
1. Problem occurs with other shells (ie Linux)
2. Issue seems to be caused by the fact that the shell issues some echo commands to display the prompt - which removed the desired return code.
3. It might not be possible to get a fix in 3.2.1 timeframe, so the work around is to issue both commands at once:
     <command>; echo $?
4. Note that if ( ) are used with the work around from 3 in a z/os Unix shell,
     (<command>; echo $?) 
   then the shell appears to stop responding due to the same problem reported in bug 323262


Reproducible: Always

Steps to Reproduce:
1. Enter the following command in the shell:
    test a = b
2. Then enter the following command:
    echo $?

Expected result:
1

Actual result: 
0
Comment 1 Violaine Batthish CLA 2010-08-20 11:49:26 EDT
Forgot to mention that using rseterm does not produce the problem reported here, but use of rseterm is not acceptable to RDz.