Re: Compute the maximum return code of all steps (so far)

2018-11-29 Thread Seymour J Metz
I would posit that the vacuous comments that you say to eschew are a harmful 
superfluity. Certainly if I have to teach another programming course, I will 
announce at the beginning of the term that points will be taken off for such 
comments. I'll also warn that if the code can't be understood by the other 
students that I will make a judgement call as to whether the algorithm is 
intrinsically hard to understand or whether it is opaquely explained., with 
points off for the latter.

If anybody still has access to the source code for FAP, take a look at the 
symbol table sort. I found it to be a masterpiece of clarity. It's usually the 
code or the comments that are at fault rather than the underlying algorithm. 



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Jesse 1 Robinson 
Sent: Thursday, November 29, 2018 11:51 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Compute the maximum return code of all steps (so far)

A brief ode to comments. I'm also wary of bureaucratic dicta requiring comments 
on every line, but I will always tilt in favor of more comments rather than 
fewer. It's hard to imagine a harmful superfluity.

The real dictum should be to eschew vacuous comments like 'add r4 to r3'. Duh. 
If I can read ASM, I can see what that line is doing. If I cannot read ASM, 
then the comment is absurdly inappropriate. Good comments should be 
intelligible to anyone with experience in IT. That is not a trivial goal but 
one that's neither unreasonable nor unverifiable.

.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
robin...@sce.com

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Seymour J Metz
Sent: Tuesday, November 27, 2018 11:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: (External):Re: Compute the maximum return code of all steps (so far)

I certainly don't advocate a bureaucratic rule like "put a comment on every 
line", but that code really needs more comments. Variable names like P1, P2, P3 
don't help either.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-29 Thread Jesse 1 Robinson
A brief ode to comments. I'm also wary of bureaucratic dicta requiring comments 
on every line, but I will always tilt in favor of more comments rather than 
fewer. It's hard to imagine a harmful superfluity.

The real dictum should be to eschew vacuous comments like 'add r4 to r3'. Duh. 
If I can read ASM, I can see what that line is doing. If I cannot read ASM, 
then the comment is absurdly inappropriate. Good comments should be 
intelligible to anyone with experience in IT. That is not a trivial goal but 
one that's neither unreasonable nor unverifiable. 

.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler 
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
robin...@sce.com

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Seymour J Metz
Sent: Tuesday, November 27, 2018 11:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: (External):Re: Compute the maximum return code of all steps (so far)

I certainly don't advocate a bureaucratic rule like "put a comment on every 
line", but that code really needs more comments. Variable names like P1, P2, P3 
don't help either.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-27 Thread Seymour J Metz
I certainly don't advocate a bureaucratic rule like "put a comment on every 
line", but that code really needs more comments. Variable names like P1, P2, P3 
don't help either.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Robert Prins 
Sent: Tuesday, November 27, 2018 6:55 AM
To: IBM-MAIN@listserv.ua.edu
Subject: Re: Compute the maximum return code of all steps (so far)

Another one, in your favourite language, originally written by Simon Brown of
Willis sometime in 1992:

*process macro langlvl(os,sprog) test(all,sym);
*process rules(laxif);
-steps: proc(param) options(main) reorder;
-dcl param char(100) var;
-
-/**
-* STEPS - Entry's, builtins & files   *
-**/
-dcl (addr,
- heximage,
- index,
- length,
- plidump,
- ptradd,
- ptrvalue,
- stg,
- substr,
- unspec,
- verify) builtin;
-
-dcl sysprint file;
-
-dcl p1   ptr init (ptrvalue(16)) static;
-
-dcl 1 s1 based(p1),
-  2 p2   ptr;
-
-dcl 1 s2 based(p2),
-  2 p3   ptr;
-
-dcl 1 s3 based(p3),
-  2 *ptr,
-  2 tcb_ptr  ptr;
-
-dcl 1 tcb based(tcb_ptr),
-  2 *(3) ptr,
-  2 tiot_ptr ptr,
-  2 *(41)ptr,
-  2 jscb_ptr ptr;
-
-dcl 1 tiot based(tiot_ptr),
-  2 jobname  char (8),
-  2 stepname char (8);
-
-dcl 1 jscb based(jscb_ptr),
-  2 *(65)ptr,
-  2 jscbjct  ptr,
-  2 *(13)ptr,
-  2 jscbssib ptr;
-
-dcl 1 jct based(jscbjct),
-  2 *(5) ptr,
-  2 *char,
-  2 jctjstat bit  (8),
-  2 *char (2),
-  2 jctjname char (8),/* job name*/
-  2 *(4) ptr,
-  2 jctsdkad char (3),/* sva of first sct*/
-  2 *char,
-  2 jctjctx  char (3),/* sva of jctx */
-  2 *char,
-  2 jctactad char (3),/* sva of first act*/
-  2 *char,
-  2 *(26)ptr,
-  2 *char,
-  2 jmrjmrjd fixed dec(5,3),  /* job start date (julian) */
-  2 *(2) ptr,
-  2 jctuser  char (7),/* job user id */
-  2 *char,
-  2 jctacode char (4);/* job abend code  */
-
-dcl 1 ssib based(jscbssib),
-  2 *(3) ptr,
-  2 ssibjbid char (8);/* subsystem job id*/
-
-dcl act_ptr ptr;
-dcl 1 act based(act_ptr),
-  2 *char  (24),
-  2 actprgnm char  (20),
-  2 *char   (3),
-  2 actjnfld char,
-  2 actaccnt char (144);
-
-dcl sct_ptr ptr;
-dcl 1 sct based(sct_ptr),
-  2 *(6) ptr,
-  2 sctsexec fixed bin (15),
-  2 *(2) char,
-  2 *(2) ptr,
-  2 sctansct char (3), /* sva of next sct*/
-  2 *char,
-  2 *(5) ptr,
-  2 sctsclpc char (8), /* name of step that called procedure */
-  2 sctsname char (8), /* step name  */
-  2 *(2) ptr,
-  2 sctx_pch char (3),
-  2 *char,
-  2 *(9) ptr,
-  2 sctpgmnm char (8), /* program name   */
-  2 *char (2),
-  2 sctcdent(8)  char (6),
-  2 *char (6),
-  2 sctstend bit  (8);  /* bits and pieces   */
-
-dcl sctx_ptr ptr;
-dcl 1 sctx based(sctx_ptr),
-  2 *(5) ptr,
-  2 sctxparm char (100);
-
-dcl jctx_ptr ptr;
-dcl sctxparm_v   char (100) var;
-dcl have_had_current bit(1) init ('0'b);
-dcl have_had_title   bit(1) init ('0'b);
-dcl max_cc   fixed bin (15) init (0);
-dcl flag_after   bit(1) init ('0'b); /* A */
-dcl flag_before  bit(1) init ('0'b); /* B */
-dcl flag_current bit(1) init ('0'b); /* C */
-dcl flag_descbit(1) init ('0'b); /* D */
-dcl flag_flush   bit(1) init ('0'b); /* F */
-dcl flag_nonzero bit(1) init ('0'b); /* N */
-dcl flag_parmbit(1) init ('0'b); /* P */
-dcl flag_zerobit(1) init ('0'b); /* Z */
-
-dcl desc_max fixed bin (31) static init (255);
-dcl desc_usedfixed bin (31) init (0);
-dcl 1 desc_array(desc_max) ctl,
-  2 stepname char   (8),
-  2 text char  (64) var;
-
-flag_after   = (index(param, 'A') ^= 0);
-flag_before  = (index(param, 'B') ^= 0);
-flag_current = (index(param, 'C') ^= 0);
-flag_desc= (index(param, 'D') ^= 0);
-flag_flush   

Re: Compute the maximum return code of all steps (so far)

2018-11-27 Thread Charles Mills
Without beating a dead horse, yes that is too simple a formulation. Much of the 
point of copyright is protecting the author's rights in things that have been 
published -- made widely available.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bernd Oppolzer
Sent: Monday, November 26, 2018 6:58 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Compute the maximum return code of all steps (so far)

Sorry, this did not come to my mind, because the code appeared in a 
public forum ...

this is the link where I found it:

https://www.developpez.net/forums/d1477375/systemes/autres-systemes/z-os/jcl-sort/recuperation-code-retour-d-job-rexx/

If I find a snippet of code THAT OPEN on the internet,
I normally don't care much about copyright,
because IMO the original poster also didn't.
But maybe that's too simple minded.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-27 Thread Robert Prins
Another one, in your favourite language, originally written by Simon Brown of 
Willis sometime in 1992:


*process macro langlvl(os,sprog) test(all,sym);
*process rules(laxif);
-steps: proc(param) options(main) reorder;
-dcl param char(100) var;
-
-/**
-* STEPS - Entry's, builtins & files   *
-**/
-dcl (addr,
- heximage,
- index,
- length,
- plidump,
- ptradd,
- ptrvalue,
- stg,
- substr,
- unspec,
- verify) builtin;
-
-dcl sysprint file;
-
-dcl p1   ptr init (ptrvalue(16)) static;
-
-dcl 1 s1 based(p1),
-  2 p2   ptr;
-
-dcl 1 s2 based(p2),
-  2 p3   ptr;
-
-dcl 1 s3 based(p3),
-  2 *ptr,
-  2 tcb_ptr  ptr;
-
-dcl 1 tcb based(tcb_ptr),
-  2 *(3) ptr,
-  2 tiot_ptr ptr,
-  2 *(41)ptr,
-  2 jscb_ptr ptr;
-
-dcl 1 tiot based(tiot_ptr),
-  2 jobname  char (8),
-  2 stepname char (8);
-
-dcl 1 jscb based(jscb_ptr),
-  2 *(65)ptr,
-  2 jscbjct  ptr,
-  2 *(13)ptr,
-  2 jscbssib ptr;
-
-dcl 1 jct based(jscbjct),
-  2 *(5) ptr,
-  2 *char,
-  2 jctjstat bit  (8),
-  2 *char (2),
-  2 jctjname char (8),/* job name*/
-  2 *(4) ptr,
-  2 jctsdkad char (3),/* sva of first sct*/
-  2 *char,
-  2 jctjctx  char (3),/* sva of jctx */
-  2 *char,
-  2 jctactad char (3),/* sva of first act*/
-  2 *char,
-  2 *(26)ptr,
-  2 *char,
-  2 jmrjmrjd fixed dec(5,3),  /* job start date (julian) */
-  2 *(2) ptr,
-  2 jctuser  char (7),/* job user id */
-  2 *char,
-  2 jctacode char (4);/* job abend code  */
-
-dcl 1 ssib based(jscbssib),
-  2 *(3) ptr,
-  2 ssibjbid char (8);/* subsystem job id*/
-
-dcl act_ptr ptr;
-dcl 1 act based(act_ptr),
-  2 *char  (24),
-  2 actprgnm char  (20),
-  2 *char   (3),
-  2 actjnfld char,
-  2 actaccnt char (144);
-
-dcl sct_ptr ptr;
-dcl 1 sct based(sct_ptr),
-  2 *(6) ptr,
-  2 sctsexec fixed bin (15),
-  2 *(2) char,
-  2 *(2) ptr,
-  2 sctansct char (3), /* sva of next sct*/
-  2 *char,
-  2 *(5) ptr,
-  2 sctsclpc char (8), /* name of step that called procedure */
-  2 sctsname char (8), /* step name  */
-  2 *(2) ptr,
-  2 sctx_pch char (3),
-  2 *char,
-  2 *(9) ptr,
-  2 sctpgmnm char (8), /* program name   */
-  2 *char (2),
-  2 sctcdent(8)  char (6),
-  2 *char (6),
-  2 sctstend bit  (8);  /* bits and pieces   */
-
-dcl sctx_ptr ptr;
-dcl 1 sctx based(sctx_ptr),
-  2 *(5) ptr,
-  2 sctxparm char (100);
-
-dcl jctx_ptr ptr;
-dcl sctxparm_v   char (100) var;
-dcl have_had_current bit(1) init ('0'b);
-dcl have_had_title   bit(1) init ('0'b);
-dcl max_cc   fixed bin (15) init (0);
-dcl flag_after   bit(1) init ('0'b); /* A */
-dcl flag_before  bit(1) init ('0'b); /* B */
-dcl flag_current bit(1) init ('0'b); /* C */
-dcl flag_descbit(1) init ('0'b); /* D */
-dcl flag_flush   bit(1) init ('0'b); /* F */
-dcl flag_nonzero bit(1) init ('0'b); /* N */
-dcl flag_parmbit(1) init ('0'b); /* P */
-dcl flag_zerobit(1) init ('0'b); /* Z */
-
-dcl desc_max fixed bin (31) static init (255);
-dcl desc_usedfixed bin (31) init (0);
-dcl 1 desc_array(desc_max) ctl,
-  2 stepname char   (8),
-  2 text char  (64) var;
-
-flag_after   = (index(param, 'A') ^= 0);
-flag_before  = (index(param, 'B') ^= 0);
-flag_current = (index(param, 'C') ^= 0);
-flag_desc= (index(param, 'D') ^= 0);
-flag_flush   = (index(param, 'F') ^= 0);
-flag_nonzero = (index(param, 'N') ^= 0);
-flag_parm= (index(param, 'P') ^= 0);
-flag_zero= (index(param, 'Z') ^= 0);
-
-if ^flag_after  &
-   ^flag_before &
-   ^flag_current then
-  flag_before = '1'b;
-
-if flag_desc then
-  call load_desc_array();
-
-jctx_ptr = char3_to_ptr(jct.jctjctx);
-act_ptr  = char3_to_ptr(jct.jctactad);
-
-put skip edit(ssib.ssibjbid,
-  jct.jctjname, 'run on',
-  jct.jmrjmrjd, 'by',
-  

Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Seymour J Metz
There's the legal issue of copyright but there's also the ethical issue of 
attribution. It's best to always cite the provenance of sample code.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Bernd Oppolzer 
Sent: Monday, November 26, 2018 6:57 PM
To: IBM-MAIN@listserv.ua.edu
Subject: Re: Compute the maximum return code of all steps (so far)

Sorry, this did not come to my mind, because the code appeared in a
public forum ...

this is the link where I found it:

https://secure-web.cisco.com/1b19rHBDbXgiT7T_t-4bcXDnxJmb66xU8eSjNZLoEb6Z-Ou5qovSX5HoQq4TcH4o_1aUABNyGkF6qTr0tA8g18aWwhJHdtWsN162NqRVEf7AC_hkiXNNU3aQ68gISMs_U5rMOb16VA2pL95gcRnWBuDMyN6o3yV_Ku_UD_Di1AepisFh_rMhpLW4gq2E4x6eRg2TtVLSQBDKcEMUGdl2b_fHtSzYglBRH-l4MKmOXER3LrbV6wdBHwdakGsZ7T3-BdM4vIshSH0hfOtJw9tDcxyU3i7pXOnZfo6Hip0zENk440b-rC3ucOAloJ5qofAO55jKbYhevbvD_PWvY_DpDoC436soymxOiZ3EZ9738GZuBDYSWfdYCB-IzKR52NR5q4mMUg5S6R1ab2HIZomS9y4h6CLkX5OU56GF-4B5wkriCvGSrbKG8Zcj_xADBjYEX/https%3A%2F%2Fwww.developpez.net%2Fforums%2Fd1477375%2Fsystemes%2Fautres-systemes%2Fz-os%2Fjcl-sort%2Frecuperation-code-retour-d-job-rexx%2F

If I find a snippet of code THAT OPEN on the internet,
I normally don't care much about copyright,
because IMO the original poster also didn't.
But maybe that's too simple minded.

Thanks for your advice

Kind regards

Bernd



Am 27.11.2018 um 00:46 schrieb Arthur:
> On 26 Nov 2018 13:03:55 -0800, in bit.listserv.ibm-main
> (Message-ID:)
> bernd.oppol...@t-online.de (Bernd Oppolzer) wrote:
>
>> using this as keyword and a well known search engine,
>> I found a REXX (from a french site), which I will try tomorrow.
>>
>> This could be of interest to others, so here is the REXX (unedited,
>> no warranty),
>> including some original french comments:
>
> A link, instead of copying the code, would have been better. If the
> code hasn't been marked as free to use and copy, this is a possible
> copyright violation. Just as bad, the person who wrote this code has
> gotten no recognition for it, which is a probable violation even if it
> was covered by a Creative Commons license. And, if the coder improves
> the program, people who take the code from IBM-Main will not have
> those improvements.
>
> I like the idea of having code where it can be found. A few programs
> on the CBT tape are mine. But I *chose* to submit them, and they have
> my name on them. Just because it's on the Internet does not mean it's
> not copyright.
>
> OTOH, I congratulate you on finding this code, and thank you for
> letting us all know it exists.
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Bernd Oppolzer
Sorry, this did not come to my mind, because the code appeared in a 
public forum ...


this is the link where I found it:

https://www.developpez.net/forums/d1477375/systemes/autres-systemes/z-os/jcl-sort/recuperation-code-retour-d-job-rexx/

If I find a snippet of code THAT OPEN on the internet,
I normally don't care much about copyright,
because IMO the original poster also didn't.
But maybe that's too simple minded.

Thanks for your advice

Kind regards

Bernd



Am 27.11.2018 um 00:46 schrieb Arthur:
On 26 Nov 2018 13:03:55 -0800, in bit.listserv.ibm-main 
(Message-ID:) 
bernd.oppol...@t-online.de (Bernd Oppolzer) wrote:



using this as keyword and a well known search engine,
I found a REXX (from a french site), which I will try tomorrow.

This could be of interest to others, so here is the REXX (unedited, 
no warranty),

including some original french comments:


A link, instead of copying the code, would have been better. If the 
code hasn't been marked as free to use and copy, this is a possible 
copyright violation. Just as bad, the person who wrote this code has 
gotten no recognition for it, which is a probable violation even if it 
was covered by a Creative Commons license. And, if the coder improves 
the program, people who take the code from IBM-Main will not have 
those improvements.


I like the idea of having code where it can be found. A few programs 
on the CBT tape are mine. But I *chose* to submit them, and they have 
my name on them. Just because it's on the Internet does not mean it's 
not copyright.


OTOH, I congratulate you on finding this code, and thank you for 
letting us all know it exists.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Arthur
On 26 Nov 2018 13:03:55 -0800, in bit.listserv.ibm-main 
(Message-ID:) 
bernd.oppol...@t-online.de (Bernd Oppolzer) wrote:



using this as keyword and a well known search engine,
I found a REXX (from a french site), which I will try 
tomorrow.


This could be of interest to others, so here is the REXX 
(unedited, no warranty),

including some original french comments:


A link, instead of copying the code, would have been 
better. If the code hasn't been marked as free to use and 
copy, this is a possible copyright violation. Just as bad, 
the person who wrote this code has gotten no recognition 
for it, which is a probable violation even if it was 
covered by a Creative Commons license. And, if the coder 
improves the program, people who take the code from 
IBM-Main will not have those improvements.


I like the idea of having code where it can be found. A few 
programs on the CBT tape are mine. But I *chose* to submit 
them, and they have my name on them. Just because it's on 
the Internet does not mean it's not copyright.


OTOH, I congratulate you on finding this code, and thank 
you for letting us all know it exists. 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Seymour J Metz
"Note: The EVENTLOG data set is only available to JES2 users."


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Kirk Wolf 
Sent: Monday, November 26, 2018 4:02 PM
To: IBM-MAIN@listserv.ua.edu
Subject: Re: Compute the maximum return code of all steps (so far)

You can use Spool Dataset Browse to dynamically allocate the EVENTLOG
STEPDATA dataset which has this information (and it is IBM blessed):
https://secure-web.cisco.com/1HiHA9pFPMHKZGQk4dDFP7oJ3m_S79Oq7bba0LtlmZIro_dDJZaAoSLD7kg9igCUn3Q2njcKxDvU_xpVbMltkzlhPp32XFiSt7T93hOBiea2scr3IbfO8yfHVpS0ahi7ib42OKxELhZ55ZWtHbMap5Yw_jfG4l5u_oUOBJbkOwO2LxkAF6JBoPShEuZlJJ1rYp3wlmiOB1ivsCLnSMOj3Qdqr3fTjAP1I1G8ocResFRsLvBXNRd7rEZCf3XU0KkAjTO62yNf_8yEeirZu_38q8E-SKATsNQ_DpoqUYN6qnG-WK_ZjyIyV0TNzJ39R8DcLjMw8o7vwv_YmxVS_TPOCU6SdixQ7lxZKHHzzHeU8GFmaHzKTRAJsRwZPuYqBMke3O7OyLrmRUHG-7binNciGFtTfscDMoIFs_L8KkPvVqi_kAwP6xEltZ_qmJyxOV3Bn/https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSSLTBW_2.3.0%2Fcom.ibm.zos.v2r3.hasc300%2Faccevnt.htm

Also, the z/OSMF REST JOBs api can give this back to you in JSON:
https://secure-web.cisco.com/1bo4SYcP-_PrCXZAjzz7XBec4RtOQfLZB-SLYg1xXZ-QQoRZdcGdXixGkhSuQmj_3_ztugt5VRT16GkF733CBTrjEPxIGSlw99rlzA7oHzafOfNAKn7szftUMRiJp9sf8cgIv2t69n-LeSiK9yo3SI2yK16E32uyVJoWxxQqVXu3ZfhhSf2RjwNXOO3h88zs6nykPpPg_SBdq-E-yo9SoTEmcGAkXS5GBe-IXz5BDOhEB1D5HIL7SOGTkuZ7ybopZP5lgaPswEB2vvjVndr3U7UOvLNKBLb81-g7-tVfgfZuGNm3zi68YRMp01ylalq7n8KCloE7kPWBXRwYRBQcJu7ZSddErNGDgrTEa8sEZ8UrCZQ6uF2FBkjgStlqZin97Sop3h9TK8fNgG5DSAUSxjZbrD8JNBiMLCa0sf64aonN_VttVfUeICjXUxKv7ZQ4n/https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSSLTBW_2.3.0%2Fcom.ibm.zos.v2r3.izua700%2FIZUHPINFO_API_GetJobStatus.htm


On Mon, Nov 26, 2018 at 2:42 PM Seymour J Metz  wrote:

> It is relatively easy to retrieve the Step Control Table (SCT) for each
> step and check the return code, but I don't know how to do it in a way that
> IBM will bless; AFAIK the relevant control blocks are not GUPI.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Bernd Oppolzer 
> Sent: Monday, November 26, 2018 3:29 PM
> To: IBM-MAIN@listserv.ua.edu
> Subject: Compute the maximum return code of all steps (so far)
>
> Hello list,
>
> I have the need to compute (in a C, PL/1 or ASSEMBLER module)
> the maximum return code of all prior steps of the running job so far.
>
> This is intended to be the last step of the job and to write the MAXRC
> into a DB2 table, which shows the requester the outcome of this
> special job (in a series of maybe hundred jobs which he or she
> activated by a sort of makefile).
>
> At the moment this is done by a series of steps named RC0, RC4, RC8
> and so on, which are activated when the MAXRC falls into the appropriate
> range, and then the MAXRC value is written to an ISPF table. I am modifying
> this into using a DB2 table, because we had some problems in the past due
> to parallel use of the ISPF table involved, which lead to bad situations
> (ENQs).
> In this context I thought about replacing this bunch of steps by one.
>
> Is this possible? What is needed?
> Is there a place where the MAXRC is stored, or is it necessary to retrieve
> the RCs of the different steps and compute the MAXRC value myself?
> What if one of the steps ABENDed?
>
> It is of course possible to keep the JCL-IF-logic and only replace the
> ISPF table by DB2 ... this is what I would do if the computation of the
> RCs etc. is too difficult.
>
> Many thanks for your suggestions;
> have a nice day.
>
> Bernd
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Bernd Oppolzer

Many thanks for the pointer to the SCT;

using this as keyword and a well known search engine,
I found a REXX (from a french site), which I will try tomorrow.

This could be of interest to others, so here is the REXX (unedited, no 
warranty),

including some original french comments:

/* REXX - Recap des Return Code issus des steps d'un JOB */
TCB = ptr(540,4)  /* Task Control Bloc IKJTCB>TCBJSCB   */
JSCB    = ptr(TCB+180,4)  /* Job/Step Control Block IEZJSCB>JSCBJCT  */
JCT = adj(ptr(JSCB+260,4)) /* Job Control Table IEFAJCTB */
SSIB    = adj(ptr(JSCB+316,4)) /* Sub Syst ID Block IEFJSSIB */
StActif = adj(ptr(JSCB+328,4)) /* Step Control Table */
StepRef = adj(ptr(JCT+32,3))   /* IEFAJCTB>JCTSDKAD  */
JobName = strip(stg(JCT+8,8))  /* IEFAJCTB>JCTJNAME  */
say   JobName justify(' ',40) date() time()
queue JobName justify(' ',40) date() time()
IdName = strip(stg(SSIB+0,8))  /* IEFJSSIB>SSIBDEST  */
say   userid() 'Ident'
queue userid() 'Ident'
UserName = strip(stg(JCT+160,8))   /* IEFAJCTB>JCTUSER8  */
say   UserName 'User'
queue UserName 'User'
do 50   /* Limitation aux 50 premiers steps */
   if StepRef = 0 ! StepRef = StActif then leave
   StepProc = strip(stg(StepRef+44,8))
   if   StepProc = '' then StepName = strip(stg(StepRef+52,8))
   else StepName = StepProc !! '.' !! strip(stg(StepRef+52,8))
   PgmName = strip(stg(JSCB+360,8))
   StepRC = strip(ptr(StepRef+8,2))
   StepRef = adj(ptr(StepRef+20,3))
   say   '    ' left(StepName,17) 'RC='right(StepRC,2,'0') PgmName
   queue '    ' left(StepName,17) 'RC='right(StepRC,2,'0') PgmName
end
  PSATOLD  = STORAGE(21C,4)    /* POINTER TO TCB   */
  PTRTIOT  = STORAGE(D2X(C2D(PSATOLD)+12),4)   /* POINTER TO TIOT  */
  JOBNAME  = STORAGE(D2X(C2D(PTRTIOT)),8)
  STEPNAME = STORAGE(D2X(C2D(PTRTIOT)+8),8)
  PROCNAME = STORAGE(D2X(C2D(PTRTIOT)+16),8)
  Tcbjscbb = Storage(D2x(C2d(Psatold)+181),3)  /* jscb */
  jscbssib = STORAGE(D2X(C2D(tcbjscbb)+316),4)  /* Ptr to SSIB */
  ssibjbid = STORAGE(D2X(C2D(jscbssib)+12),8)    /* job identifier */
  ssibid   = STORAGE(D2X(C2D(jscbssib)+12),20)    /* identifier */
queue JOBNAME SSIBJBID ssibid STEPNAME PROCNAME
"execio * diskw CREXEC (fini"
exit

ptr: return c2d(storage(d2x(arg(1)),arg(2)))
stg: return storage(d2x(arg(1)),arg(2))
adj: if arg(1) = 0 then return arg(1) ; else return arg(1) + 16


Thanks again for your valuable suggestion;
this mailing list is amazing

Bernd


Am 26.11.2018 um 21:41 schrieb Seymour J Metz:

It is relatively easy to retrieve the Step Control Table (SCT) for each step 
and check the return code, but I don't know how to do it in a way that IBM will 
bless; AFAIK the relevant control blocks are not GUPI.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of Bernd 
Oppolzer 
Sent: Monday, November 26, 2018 3:29 PM
To: IBM-MAIN@listserv.ua.edu
Subject: Compute the maximum return code of all steps (so far)

Hello list,

I have the need to compute (in a C, PL/1 or ASSEMBLER module)
the maximum return code of all prior steps of the running job so far.

This is intended to be the last step of the job and to write the MAXRC
into a DB2 table, which shows the requester the outcome of this
special job (in a series of maybe hundred jobs which he or she
activated by a sort of makefile).

At the moment this is done by a series of steps named RC0, RC4, RC8
and so on, which are activated when the MAXRC falls into the appropriate
range, and then the MAXRC value is written to an ISPF table. I am modifying
this into using a DB2 table, because we had some problems in the past due
to parallel use of the ISPF table involved, which lead to bad situations
(ENQs).
In this context I thought about replacing this bunch of steps by one.

Is this possible? What is needed?
Is there a place where the MAXRC is stored, or is it necessary to retrieve
the RCs of the different steps and compute the MAXRC value myself?
What if one of the steps ABENDed?

It is of course possible to keep the JCL-IF-logic and only replace the
ISPF table by DB2 ... this is what I would do if the computation of the
RCs etc. is too difficult.

Many thanks for your suggestions;
have a nice day.

Bernd

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@list

Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Kirk Wolf
You can use Spool Dataset Browse to dynamically allocate the EVENTLOG
STEPDATA dataset which has this information (and it is IBM blessed):
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.hasc300/accevnt.htm

Also, the z/OSMF REST JOBs api can give this back to you in JSON:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.izua700/IZUHPINFO_API_GetJobStatus.htm


On Mon, Nov 26, 2018 at 2:42 PM Seymour J Metz  wrote:

> It is relatively easy to retrieve the Step Control Table (SCT) for each
> step and check the return code, but I don't know how to do it in a way that
> IBM will bless; AFAIK the relevant control blocks are not GUPI.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Bernd Oppolzer 
> Sent: Monday, November 26, 2018 3:29 PM
> To: IBM-MAIN@listserv.ua.edu
> Subject: Compute the maximum return code of all steps (so far)
>
> Hello list,
>
> I have the need to compute (in a C, PL/1 or ASSEMBLER module)
> the maximum return code of all prior steps of the running job so far.
>
> This is intended to be the last step of the job and to write the MAXRC
> into a DB2 table, which shows the requester the outcome of this
> special job (in a series of maybe hundred jobs which he or she
> activated by a sort of makefile).
>
> At the moment this is done by a series of steps named RC0, RC4, RC8
> and so on, which are activated when the MAXRC falls into the appropriate
> range, and then the MAXRC value is written to an ISPF table. I am modifying
> this into using a DB2 table, because we had some problems in the past due
> to parallel use of the ISPF table involved, which lead to bad situations
> (ENQs).
> In this context I thought about replacing this bunch of steps by one.
>
> Is this possible? What is needed?
> Is there a place where the MAXRC is stored, or is it necessary to retrieve
> the RCs of the different steps and compute the MAXRC value myself?
> What if one of the steps ABENDed?
>
> It is of course possible to keep the JCL-IF-logic and only replace the
> ISPF table by DB2 ... this is what I would do if the computation of the
> RCs etc. is too difficult.
>
> Many thanks for your suggestions;
> have a nice day.
>
> Bernd
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Compute the maximum return code of all steps (so far)

2018-11-26 Thread Seymour J Metz
It is relatively easy to retrieve the Step Control Table (SCT) for each step 
and check the return code, but I don't know how to do it in a way that IBM will 
bless; AFAIK the relevant control blocks are not GUPI.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Bernd Oppolzer 
Sent: Monday, November 26, 2018 3:29 PM
To: IBM-MAIN@listserv.ua.edu
Subject: Compute the maximum return code of all steps (so far)

Hello list,

I have the need to compute (in a C, PL/1 or ASSEMBLER module)
the maximum return code of all prior steps of the running job so far.

This is intended to be the last step of the job and to write the MAXRC
into a DB2 table, which shows the requester the outcome of this
special job (in a series of maybe hundred jobs which he or she
activated by a sort of makefile).

At the moment this is done by a series of steps named RC0, RC4, RC8
and so on, which are activated when the MAXRC falls into the appropriate
range, and then the MAXRC value is written to an ISPF table. I am modifying
this into using a DB2 table, because we had some problems in the past due
to parallel use of the ISPF table involved, which lead to bad situations
(ENQs).
In this context I thought about replacing this bunch of steps by one.

Is this possible? What is needed?
Is there a place where the MAXRC is stored, or is it necessary to retrieve
the RCs of the different steps and compute the MAXRC value myself?
What if one of the steps ABENDed?

It is of course possible to keep the JCL-IF-logic and only replace the
ISPF table by DB2 ... this is what I would do if the computation of the
RCs etc. is too difficult.

Many thanks for your suggestions;
have a nice day.

Bernd

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Compute the maximum return code of all steps (so far)

2018-11-26 Thread Bernd Oppolzer

Hello list,

I have the need to compute (in a C, PL/1 or ASSEMBLER module)
the maximum return code of all prior steps of the running job so far.

This is intended to be the last step of the job and to write the MAXRC
into a DB2 table, which shows the requester the outcome of this
special job (in a series of maybe hundred jobs which he or she
activated by a sort of makefile).

At the moment this is done by a series of steps named RC0, RC4, RC8
and so on, which are activated when the MAXRC falls into the appropriate
range, and then the MAXRC value is written to an ISPF table. I am modifying
this into using a DB2 table, because we had some problems in the past due
to parallel use of the ISPF table involved, which lead to bad situations 
(ENQs).

In this context I thought about replacing this bunch of steps by one.

Is this possible? What is needed?
Is there a place where the MAXRC is stored, or is it necessary to retrieve
the RCs of the different steps and compute the MAXRC value myself?
What if one of the steps ABENDed?

It is of course possible to keep the JCL-IF-logic and only replace the
ISPF table by DB2 ... this is what I would do if the computation of the
RCs etc. is too difficult.

Many thanks for your suggestions;
have a nice day.

Bernd

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN