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

BPXBATCH and REXX

1,789 views
Skip to first unread message

Neil Haley

unread,
Feb 8, 2013, 11:21:14 AM2/8/13
to
Howdy,

I have been experimenting with running REXX jobs in Unix System Services (USS) with BPXBATCH and have run into a snag. The job completes with a RC 3840, but appear to complete ok.

-----
//USSREXX JOB (9610000),'NEIL',MSGLEVEL=1,
// MSGCLASS=X,CLASS=A,TIME=10,NOTIFY=USERID
//*
//REXX EXEC PGM=BPXBATCH,PARM='PGM /u/userid/rexx/Hello.rex'
//*
//STDIN DD DUMMY
//STDERR DD SYSOUT=*
//STDOUT DD SYSOUT=*
-----
-JOBNAME STEPNAME PROCSTEP RC
-USSREXX REXX 3840
-----

The output for the STDOUT shows what is expected "This is a simple test, no 'Hello, World' stuff here!"

I have tried Google and many IBM Information Centers, but cannot find the cause of the 3840.

Regards,

Neil Haley
nha...@ca.ibm.com
Storage & Software Mainframe Support
http://www.ibm.com/systems/z/ | http://www.about.me/NeilHaley

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

Ward Able, Grant

unread,
Feb 8, 2013, 11:43:22 AM2/8/13
to
Neil,

Not sure if this answers your question entirely, but take a look at this:

http://www-01.ibm.com/support/docview.wss?uid=isg1OA18832







Regards - Grant.

Telephone Internal: 201496 (London)

Telephone External: +44 (0)207 650 1496





-----Original Message-----

From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Neil Haley

Sent: 08 February 2013 16:21

To: TSO-...@VM.MARIST.EDU

Subject: [TSO-REXX] BPXBATCH and REXX
<BR>_____________________________________________________________

<FONT size=2><BR>

DTCC DISCLAIMER: This email and any files transmitted with it are

confidential and intended solely for the use of the individual or

entity to whom they are addressed. If you have received this email

in error, please notify us immediately and delete the email and any

attachments from your system. The recipient should check this email

and any attachments for the presence of viruses. The company

accepts no liability for any damage caused by any virus transmitted

by this email.</FONT>

Neil Haley

unread,
Feb 8, 2013, 11:53:13 AM2/8/13
to
Thanks,

I have looked through that already, 3840/256 = 15 but that still has not gotten me anywhere. I will be experimenting with the 'set -o errexit' to see if that does anything.

Regards,

Neil Haley
nha...@ca.ibm.com
Storage & Software Mainframe Support
http://www.ibm.com/systems/z/ | http://www.about.me/NeilHaley
Office: 1-613-748-2857 | Pager: 1-613-780-3345 | Mobile: 1-613-266-4565

-----TSO REXX Discussion List <TSO-...@vm.marist.edu> wrote: -----
To: TSO-...@vm.marist.edu
From: "Ward Able, Grant"
Sent by: TSO REXX Discussion List
Date: 02/08/2013 11:43AM
Subject: Re: [TSO-REXX] BPXBATCH and REXX

Neil,
Not sure if this answers your question entirely, but take a look at this:
http://www-01.ibm.com/support/docview.wss?uid=isg1OA18832



Regards - Grant.
Telephone Internal: 201496 (London)
Telephone External: +44 (0)207 650 1496


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Neil Haley
Sent: 08 February 2013 16:21
To: TSO-...@VM.MARIST.EDU
Subject: [TSO-REXX] BPXBATCH and REXX

<BR>_____________________________________________________________
<FONT size=2><BR>
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses.  The company
accepts no liability for any damage caused by any virus transmitted
by this email.</FONT>

Paul Gilmartin

unread,
Feb 8, 2013, 12:48:19 PM2/8/13
to
On Feb 8, 2013, at 09:20, Neil Haley wrote:
>
> I have been experimenting with running REXX jobs in Unix System Services (USS) with BPXBATCH and have run into a snag. The job completes with a RC 3840, but appear to complete ok.
>
This may be a silly question, but does your Rexx exit with an
EXIT 0 instruction? Under USS, Rexx has the irritating behavior
of exiting with unexpected status if no EXIT is present.
WAD, IIRC.

-- gil

Vitonis, Tony

unread,
Feb 8, 2013, 1:10:38 PM2/8/13
to
That's how I fixed my problem child REXX. It was getting RC 3840; I put in an EXIT 0 statement; it got RC 0.

Doc shows that the BPXBATCH return code is (inexplicably?) 256 times the exit status of the script, modulo 4096. An exit code of 255 is therefore:

255*256 = 65280 mod 4096 = 3840

People are strange objects.

-----Original Message-----
From: Paul Gilmartin
Sent: Friday, February 08, 2013 12:35 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: BPXBATCH and REXX

On Feb 8, 2013, at 09:20, Neil Haley wrote:
>
> I have been experimenting with running REXX jobs in Unix System Services (USS) with BPXBATCH and have run into a snag. The job completes with a RC 3840, but appear to complete ok.
>
This may be a silly question, but does your Rexx exit with an
EXIT 0 instruction? Under USS, Rexx has the irritating behavior
of exiting with unexpected status if no EXIT is present.
WAD, IIRC.

Neil Haley

unread,
Feb 8, 2013, 1:16:35 PM2/8/13
to
Thousand Thanks!

That did the trick. Time to get rid of my bad programing practices, some of my code has 'EXIT 0' while others don't. The one I have been experimenting with didn't.

Regards,

Neil Haley
nha...@ca.ibm.com
Storage & Software Mainframe Support
http://www.ibm.com/systems/z/ | http://www.about.me/NeilHaley

-----TSO REXX Discussion List <TSO-...@vm.marist.edu> wrote: -----
To: TSO-...@vm.marist.edu
From: Paul Gilmartin
Sent by: TSO REXX Discussion List
Date: 02/08/2013 01:03PM
Subject: Re: [TSO-REXX] BPXBATCH and REXX

On Feb 8, 2013, at 09:20, Neil Haley wrote:
>
> I have been experimenting with running REXX jobs in Unix System Services (USS) with BPXBATCH and have run into a snag. �The job completes with a RC 3840, but appear to complete ok.
> �
This may be a silly question, but does your Rexx exit with an
EXIT 0 instruction? �Under USS, Rexx has the irritating behavior
of exiting with unexpected status if no EXIT is present.
WAD, IIRC.

-- gil

Paul Gilmartin

unread,
Feb 8, 2013, 5:44:10 PM2/8/13
to
On 2013-02-08 11:16, Neil Haley wrote:
> Thousand Thanks!
>
> That did the trick. Time to get rid of my bad programing practices, some of my code has 'EXIT 0' while others don't. The one I have been experimenting with didn't.
>
You're welcome. I think it's a bug. Doesn't happen on CMS or TSO.

Heck, I remember FORTRAN II, where running into the END of
a program resulted in a Start I/O to the card reader, followed
by a nasty note from the operator.

Adrian Stern

unread,
Feb 9, 2013, 5:12:57 AM2/9/13
to
But how logical that was! No end of program statement so the operating
system tries to read another card! Dear old Fortran!

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of
Paul Gilmartin
Sent: den 8 februari 2013 23:44
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] BPXBATCH and REXX

Paul Gilmartin

unread,
Feb 9, 2013, 10:14:42 AM2/9/13
to
On Feb 9, 2013, at 03:12, Adrian Stern wrote:

> But how logical that was! No end of program statement so the operating
> system tries to read another card! Dear old Fortran!
>
Actually, the OS was embedded in the compiler. The compiled
code was trying to read and initiate the next job. The whole
design failed miserably when spooling input from tape was
invented and jobs were no longer read directly from cards.

Adrian Stern

unread,
Feb 9, 2013, 10:30:29 AM2/9/13
to
I only ever wrote Fortran that was punched to card - and that was version IV
- 1972 I think it was. And the OS must have been George II.

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of
Paul Gilmartin
Sent: den 9 februari 2013 16:14
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] BPXBATCH and REXX

0 new messages