Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to ABEND in batch REXX

287 views
Skip to first unread message

Bob Stark

unread,
Aug 14, 2008, 10:17:41 AM8/14/08
to
I am writing a REXX program designed to be called from batch, with end-user
input statements.

If those statements fail validity checking, I'd like to issue diagnostic
messages and terminate with a user abend.

Is there a clean way to do that? Issue a user abend from REXX?

I know I can run under IKJEFT1B, exit with a bad return code, it will be
propagated to the jobstep, and a subsequent jobstep could test that return
code with COND= or IF logic and exec PGM=xxxABEND (site-specific). But that
assumes that the end user's who run this utility can pull that off. If I
abend, their next step is generally not going to run.

I am guessing I could Address TSO "CALL *(xxxABEND)" to abend, site
specific once again.

Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x150 412-445-8072

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Bob Hamilton

unread,
Aug 14, 2008, 10:20:02 AM8/14/08
to
EXIT followed by an expression or number.

bobh

Jeff Byrum

unread,
Aug 14, 2008, 10:22:55 AM8/14/08
to
Go to http://cbttape.org/ and search for GBHABEND

Jeff

Lindy Mayfield

unread,
Aug 14, 2008, 10:27:02 AM8/14/08
to
This is an interesting one that comes up now and then. I've found no
way to get Rexx to cause a job to abend. Funny you mention this because
I've probably dumped a TSO batch job running Rexx about 1000 times over
the course of this week. (-:

It'll dump and write to SYSUDUMP no problem, but I've never had the job
abend.

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Bob Stark

Sent: 14. elokuuta 2008 17:17
To: TSO-...@VM.MARIST.EDU
Subject: [TSO-REXX] How to ABEND in batch REXX

I am writing a REXX program designed to be called from batch, with
end-user
input statements.

If those statements fail validity checking, I'd like to issue diagnostic
messages and terminate with a user abend.

Is there a clean way to do that? Issue a user abend from REXX?

I know I can run under IKJEFT1B, exit with a bad return code, it will be
propagated to the jobstep, and a subsequent jobstep could test that
return
code with COND= or IF logic and exec PGM=xxxABEND (site-specific). But
that
assumes that the end user's who run this utility can pull that off. If I
abend, their next step is generally not going to run.

I am guessing I could Address TSO "CALL *(xxxABEND)" to abend, site
specific once again.

Regards,

Bob Stark

----------------------------------------------------------------------

Lindy Mayfield

unread,
Aug 14, 2008, 10:27:37 AM8/14/08
to
Sorry, then apologies for my last post. I learned something else new
today.


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Jeff Byrum
Sent: 14. elokuuta 2008 17:22
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] How to ABEND in batch REXX

Go to http://cbttape.org/ and search for GBHABEND

Jeff

----------------------------------------------------------------------

sb...@heustoeffel.ch

unread,
Aug 28, 2008, 5:48:04 AM8/28/08
to
On 14 Aug., 16:22, Jeff.By...@ASG.COM (Jeff Byrum) wrote:
> Go tohttp://cbttape.org/and search for GBHABEND

>
> Jeff
>
>
>
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-R...@VM.MARIST.EDU] On Behalf
>
> Of Bob Stark
> Sent: Thursday, August 14, 2008 10:17 AM
> To: TSO-R...@VM.MARIST.EDU

> Subject: How to ABEND in batch REXX
>
> I am writing a REXX program designed to be called from batch, with
> end-user
> input statements.
>
> If those statements fail validity checking, I'd like to issue diagnostic
> messages and terminate with a user abend.
>
> Is there a clean way to do that? Issue a user abend from REXX?
>
> I know I can run under IKJEFT1B, exit with a bad return code, it will be
> propagated to the jobstep, and a subsequent jobstep could test that
> return
> code with COND= or IF logic and exec PGM=xxxABEND (site-specific). But
> that
> assumes that the end user's who run this utility can pull that off. If I
> abend, their next step is generally not going to run.
>
> I am guessing I could Address TSO "CALL *(xxxABEND)"  to abend, site
> specific once again.
>
> Regards,
>
> Bob Stark
>
> ProTech - When you're serious about Systems Management
> Consulting, Software, and Training for z/OS, UNIX and Internetwww.protechtraining.com  800-373-9188 x150   412-445-8072

>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions,
> send email to LISTS...@VM.MARIST.EDU with the message: INFO TSO-REXX

>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions,
> send email to LISTS...@VM.MARIST.EDU with the message: INFO TSO-REXX- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Hi There,
This Program is cool !!!
BUT.. if i do something like

ADDRESS LINKMVS "GBHABEND U1234"

Compile & Link this REXX... and Call the Compiled REXX via Batch Job,
the Batch Ends with ReturnCode 0 :-(( You can see the Abend, but it
gets traped by REXX .. So the Actual Batch Step doesn't get the
Abend...

-------------------
11.45.43 JOB70335 +IRX0251E User abend code 1234, reason code
00000000.
11.45.43 JOB70335 +IRX0255E Abend in host command GBHABEND or address
environ
11.45.43 JOB70335 IEA995I SYMPTOM DUMP OUTPUT
571
571 USER COMPLETION
CODE=1234
571 TIME=11.45.43 SEQ=34718 CPU=0000
ASID=0084
571 PSW AT TIME OF ERROR 078D1000 0000ADF8 ILC 2
INTC 0D
571 ACTIVE LOAD MODULE ADDRESS=0000AD60
OFFSET=00
571
NAME=GBHABEND
571 DATA AT PSW 0000ADF2 - 00181610 0A0D58FD
004858D0
571 AR/GR 0: 9C616EDE/80000000 1:
00000000/800004D2
571 2: 00000000/00000000 3:
00000000/1D214F5C
571 4: 00000000/1D214C90 5:
00000000/074F2F78
571 6: 00000000/1D2AF62C 7:
00000000/000083E0
571 8: 00000000/000004D2 9:
00000000/00000003
571 A: 00000000/000083E5 B:
00000000/6000AD66
571 C: 00000000/00008600 D:
00000000/0000AE94
571 E: 00000000/80FD9790 F:
00000000/0000AD60
571 END OF SYMPTOM
DUMP
11.45.43 JOB70335 GSDMV20I JOBNAME- --STEP-- -PSTEP-- CCODE ELAPSED-
TIME -CPU
11.45.43 JOB70335 GSDMV21I C778648X TEST 0
00:00:02
11.45.43 JOB70335 IEF404I C778648X - ENDED -
TIME=11.45.43
11.45.43 JOB70335 GSDMV22I -C778648X ENDED. NAME-TEST
BATCH TOTAL
11.45.43 JOB70335 $HASP395 C778648X
ENDED
-------------


Any Ideas how to get the Compiled REXX to Abend ?
Kind Regards
Sbec

0 new messages