Article View: comp.lang.asm370
Article #1053Re: JCL Question about the RC system Variable
From: Thomas David Rivers
Date: Fri, 31 Mar 2000 00:00
Date: Fri, 31 Mar 2000 00:00
34 lines
2204 bytes
2204 bytes
Terry Heinze wrote:
> You can't set the RC in JCL with a JCL statement, but you COULD exec a COBOL
> pgm that set the value of RETURN-CODE for the step the pgm was executed in.
> The value of the RC in your first step would remain that value for the
> during of the job. In other words, replace // SET RC=4 by // EXEC
> PGM=SETRC4 then test the result of the step executing SETRC4. Each step
> returns it's own RC, so in ob containing 4 steps, there are 4 different RCs
> you can test.
Well - a COBOL program may be a little overboard; just write a quick
ASM program that puts 4 in R15 and does a BALR 14,15. That will
set the 4 as the RC.
Something like:
SET4RC CSECT
L 15,=F'4'
BALR 14,15
LTORG
END SET4RC
Assemble this, link it and there you go.
A fancier version might, perhaps, look at the incoming PARMS
value (off of R1) and simply set the return code to whatever
that specified, etc...
- Dave Rivers -
--
rivers@dignus.com Work: (919) 676-0847
Get your mainframe (370) `C' compiler at http://www.dignus.com
Technical Details
Message-ID:
<38E4B15C.B33B23C6@dignus.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8c1rst$dnl$1@hardcopy.ny.jpmorgan.com> <8c28kc$2a5k$1@newssvr04-int.news.prodigy.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d15b,42752b244b2e1d2d X-Google-Attributes: gid10d15b,public X-Google-Thread: 11415f,42752b244b2e1d2d X-Google-Attributes: gid11415f,public X-Google-Thread: f8131,42752b244b2e1d2d X-Google-Attributes: gidf8131,public X-Google-Thread: 101deb,42752b244b2e1d2d X-Google-Attributes: gid101deb,public From: Thomas David Rivers <rivers@dignus.com> Subject: Re: JCL Question about the RC system Variable Date: 2000/03/31 Message-ID: <38E4B15C.B33B23C6@dignus.com> X-Deja-AN: 604800312 Content-Transfer-Encoding: 7bit References: <8c1rst$dnl$1@hardcopy.ny.jpmorgan.com> <8c28kc$2a5k$1@newssvr04-int.news.prodigy.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: ralph.vnet.net 954511710 166.82.177.48 (Fri, 31 Mar 2000 09:08:30 EST) Organization: Dignus, LLC MIME-Version: 1.0 Reply-To: rivers@dignus.com NNTP-Posting-Date: Fri, 31 Mar 2000 09:08:30 EST Newsgroups: comp.lang.asm370,comp.lang.cobol,comp.lang.pl1,bit.listserv.tsorexx