Reputation: 3064
I have simple Rexx script hello_world.rexx
:
/* rexx */
SAY 'Hello World'
EXIT
Then I run it:
>./hello_world.rexx
Hello World
It executes well, but somehow I always get 255 exit code.
>echo $?
255
Does somebody know how to fix script to get 0
as exit code?
Upvotes: 0
Views: 563
Reputation: 5191
According to the documentation an return code of 255 indicates that the program was terminated. Use exit 0
if you want a zero returned.
Upvotes: 3
Reputation: 131
I assume you are running the REXX code from USS.
See here => https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/bpx1rx32.htm
You can explicitly set return code 0 by using EXIT 0, for example:
/* rexx */
SAY 'Hello World'
EXIT 0
Upvotes: 6