Bob Cronin wrote:
> Ok, but I have written a lot of Rexx stages and have never done anything to
> explicitly commit. So, how does that work?

As soon as you read or write anything, your stage implicitly commits,
unless you have explictly issued NOCOMMIT to prevent it.

The example in the help for COMMIT doesn't really make sense, because
the result would be the same without the COMMIT.  When you need to worry
about committing explicitly is when you want to do something outside the
current pipeline set depending on whether the pipeline bombs or
not--write a log file if it bombed, erase a work file if it didn't,
etc.  For instance, I have an XEDITFIL stage that saves its input file
as the current file in XEDIT and then QUITs.  It has to check the return
code from COMMIT to know whether it should QUIT.

The official help for NOCOMMIT does have a good example of how you'd use
NOCOMMIT to let you read from an added pipeline before committing to the
current pipeline set.  Once you've issued NOCOMMIT, you then have to
commit to 0 explicitly before you can read or write anything.

¬R

Reply via email to