From fbe3aed652675830c46a0c264dbc577c4575409a Mon Sep 17 00:00:00 2001 From: Joseph Walther Date: Thu, 5 Jun 2025 16:11:07 -0500 Subject: [PATCH 1/4] Get job-related information update --- .../GETACCTC lookup.rex | 18 ++++ .../GETACCTC.rex | 33 ++++---- .../README.MD | 9 +- .../Miscellaneous-items/GETJOBNM.cob | 83 +++++++++++++++++++ .../Miscellaneous-items/README.md | 7 +- 5 files changed, 130 insertions(+), 20 deletions(-) create mode 100644 endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC lookup.rex create mode 100644 endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC lookup.rex b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC lookup.rex new file mode 100644 index 0000000..122a9e6 --- /dev/null +++ b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC lookup.rex @@ -0,0 +1,18 @@ +/* REXX */ + Arg whatuser + JobAccountingCode. = '12340' + JobAccountingCode.user#01 = '127398730' + JobAccountingCode.user#02 = '127398730' + JobAccountingCode.user#03 = '106321234' + JobAccountingCode.user#04 = '106321234' + JobAccountingCode.user#05 = '111212340' + JobAccountingCode.user#06 = '124312340' + JobAccountingCode.user#07 = '121412340' + JobAccountingCode.user#08 = '118412340' + JobAccountingCode.user#09 = '124312340' + JobAccountingCode.user#10 = '114412340' + JobAccountingCode.user#11 = '123212340' + JobAccountingCode.user#12 = '111412340' + JobAccountingCode.user#13 = '106341234' + JobAccountingCode.user#14 = '301123400' + Return JobAccountingCode.whatuser diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex index 122a9e6..bcba837 100644 --- a/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex +++ b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex @@ -1,18 +1,15 @@ -/* REXX */ - Arg whatuser - JobAccountingCode. = '12340' - JobAccountingCode.user#01 = '127398730' - JobAccountingCode.user#02 = '127398730' - JobAccountingCode.user#03 = '106321234' - JobAccountingCode.user#04 = '106321234' - JobAccountingCode.user#05 = '111212340' - JobAccountingCode.user#06 = '124312340' - JobAccountingCode.user#07 = '121412340' - JobAccountingCode.user#08 = '118412340' - JobAccountingCode.user#09 = '124312340' - JobAccountingCode.user#10 = '114412340' - JobAccountingCode.user#11 = '123212340' - JobAccountingCode.user#12 = '111412340' - JobAccountingCode.user#13 = '106341234' - JobAccountingCode.user#14 = '301123400' - Return JobAccountingCode.whatuser +/* REXX */ +/* Get the running-job's accounting code */ +/* Job can be batch or User's tso session */ + CALL BPXWDYN , + "ALLOC DD(JOBINFO) LRECL(80) BLKSIZE(8000) SPACE(1,1) ", + " RECFM(F,B) TRACKS ", + " NEW UNCATALOG REUSE "; + GETJOBNM + "EXECIO * DISKR JOBINFO (stem job. FINIS "; + CALL BPXWDYN "FREE DD(JOBINFO)" + Do j# = 1 to job.0 + If Substr(job.j#,1,15) = 'accounting_code' then, + Return Strip(Word(Substr(job.j#,17),1),"B","'") + End + Return '0' diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD index 51af8a4..0f9f14f 100644 --- a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD +++ b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD @@ -5,7 +5,14 @@ These samples are provided as is and are not officially supported (see [license] ## Introduction -Items in this folder can be used to introduce and automate testing in Endevor, running the kinds of test supported by Test4Z. +Items in this folder can be used to introduce and automate testing in Endevor, running the kinds of test supported by Test4Z. There are many items in this folder largely to support the many choices available to you and your configuration for testing. + +Your Endevor processor can submit JCL and wait for your batch test to compleete. You have a choice on how the job accounting code is derived for the submmitted job. +- **GETACCTC lookup.rex** + allows you to enter userids and accounting codes at your site. +- **GETACCTC.rex** uses the **GETJOBNM** program in [Miscelaneous-Items folder](https://github.com/BroadcomMFD/broadcom-product-scripts/tree/main/endevor/Field-Developed-Programs/Miscellaneous-items) to get the accounting information from a low memory address. + + See the two modes of testing described in [Testing Modes](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0/administrating/define-options-for-unit-and-record-and-replay.html) and [Test4Z techdocs documentation](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0.html) : 1. [Record and Replay](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0/administrating/record-replay-and-verification-processing.html). The .jcl items in the **Quick-Edit-User-Extension-Points** subfolder correspond to the **Record and Replay** examples. diff --git a/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob b/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob new file mode 100644 index 0000000..8c11bb2 --- /dev/null +++ b/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob @@ -0,0 +1,83 @@ + PROCESS DYNAM OUTDD(JOBINFO) + Identification Division. + Program-ID. GETJOBNM. + Author. Gilbert Saint-Flour. + *----------------------------------------------------------------* + * * + * This program retrieves specific system-related data from * + * MVS control blocks and moves it to Working-storage. * + * * + * The name of the control-block is indicated in pos 1-6 of * + * the Procedure Division lines. * + * The layout of the MVS control blocks is described in the * + * MVS Data Areas manuals, which can be found on any MVS or * + * OS/390 CD collection or viewed on-line by going to: * + * http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/library * + * and searching for: * + * MVS DATA AREAS * + * * + * Origin = http://gsf-soft.com/Freeware/ * + * * + Data Division. + Working-Storage Section. + 01 Results. + 05 sys-name Pic x(8). + 05 job-name Pic x(8). + 05 proc-step Pic x(8). + 05 step-name Pic x(8). + 05 program-name Pic x(8). + 05 program-name2 Pic x(8). + 05 job-number Pic x(8). + 05 job-class Pic x. + 05 msg-class Pic x. + 05 programmer-name Pic x(20). + 05 acct1 Pic x(32). + 05 batch-or-cics Pic x(5). + 88 Batch Value 'BATCH'. + 88 CICS Value 'CICS '. + 05 micro-seconds Pic S9(15) COMP-3. + + 01 four-bytes. + 05 full-word Pic s9(8) Binary. + 05 ptr4 Redefines full-word Pointer. + 01 eight-bytes. + 05 double-word Pic s9(18) Binary. + * * + Linkage Section. + 01 cb1. 05 ptr1 Pointer Occurs 256. + 01 cb2. 05 ptr2 Pointer Occurs 256. + Procedure Division. + * * + PSA SET Address of cb1 to NULL + TCB SET Address of cb1 to ptr1(136) + MOVE cb1(317:8) to eight-bytes + COMPUTE micro-seconds = double-word / 4096 + TIOT SET Address of cb2 to ptr1(4) + MOVE cb2(1:8) to job-name + DISPLAY 'job_name=' quote job-name quote +********* MOVE cb2(9:8) to proc-step +********* MOVE cb2(17:8) to step-name + JSCB SET Address of cb2 to ptr1(46) + MOVE cb2(361:8) to program-name + DISPLAY 'program_name=' quote program-name quote + SSIB SET Address of cb2 to ptr2(80) + MOVE cb2(13:8) to job-number + DISPLAY 'job_number=' quote job-number quote + PRB SET Address of cb2 to ptr1(1) + MOVE cb2(97:8) to program-name2 +********* DISPLAY 'program_name2=' quote program-name2 quote + JSCB SET Address of cb2 to ptr1(46) + JCT SET Address of cb2 to ptr2(66) +********* MOVE cb2(48:1) to job-class +********* MOVE cb2(23:1) to msg-class + ACT MOVE zero to full-word + MOVE cb2(57:3) to four-bytes(2:3) + SET Address of cb2 to ptr4 + MOVE cb2(25:20) to programmer-name + DISPLAY 'programmer_name=' quote programmer-name quote + MOVE zero to full-word + MOVE cb2(49:1) to four-bytes(4:1) + MOVE cb2(50:full-word) to acct1 + DISPLAY 'accounting_code=' quote acct1 quote + * * + GOBACK. diff --git a/endevor/Field-Developed-Programs/Miscellaneous-items/README.md b/endevor/Field-Developed-Programs/Miscellaneous-items/README.md index 4424b2c..ea14c6f 100644 --- a/endevor/Field-Developed-Programs/Miscellaneous-items/README.md +++ b/endevor/Field-Developed-Programs/Miscellaneous-items/README.md @@ -1,6 +1,11 @@ # Miscellaneous-items -These are miscellaneous tools collected by Broadcom Services members and used in supporting Endevor. +These samples are provided as is and are not officially supported (see [license](https://github.com/BroadcomMFD/broadcom-product-scripts/blob/main/LICENSE +) for more information). + +## GETJOBNM + +A modified Shareware program that has a wide range of usage. Information about a running job can be written in a REXX format, to be used again with TableTool (or othere REXX processing. See the [Automated-Test-Facility-Using-Test4Z](https://github.com/BroadcomMFD/broadcom-product-scripts/tree/main/endevor/Automated-Test-Facility-Using-Test4Z) as an example. ## ANL#DRIV, ANL#VIEW and BTCHEDIT From 288b487316cfa97a440340f8ef9a2951663898a1 Mon Sep 17 00:00:00 2001 From: Joseph Walther Date: Tue, 10 Jun 2025 17:43:14 -0500 Subject: [PATCH 2/4] Improved method for getting Account information --- .../GETACCTC.rex | 34 ++++---- .../Miscellaneous-items/GETJOBNM.cob | 83 ------------------- .../Miscellaneous-items/README.md | 6 +- 3 files changed, 20 insertions(+), 103 deletions(-) delete mode 100644 endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex index bcba837..344d668 100644 --- a/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex +++ b/endevor/Automated-Test-Facility-Using-Test4Z/GETACCTC.rex @@ -1,15 +1,19 @@ -/* REXX */ -/* Get the running-job's accounting code */ -/* Job can be batch or User's tso session */ - CALL BPXWDYN , - "ALLOC DD(JOBINFO) LRECL(80) BLKSIZE(8000) SPACE(1,1) ", - " RECFM(F,B) TRACKS ", - " NEW UNCATALOG REUSE "; - GETJOBNM - "EXECIO * DISKR JOBINFO (stem job. FINIS "; - CALL BPXWDYN "FREE DD(JOBINFO)" - Do j# = 1 to job.0 - If Substr(job.j#,1,15) = 'accounting_code' then, - Return Strip(Word(Substr(job.j#,17),1),"B","'") - End - Return '0' +/* REXX */ +/* Find and return the Accounting code value for current user/job */ + start = 540 /* it starts here */ + start = D2X(start) + TCB_Addr = C2D(Storage(start,4)) /* Current TCB Addr */ + TCB_Area = Storage(D2X(TCB_Addr),200) +/*TIOT_Addr = Substr(TCB_Area,13,4) + TIOT_jobname = Storage(C2X(TIOT_Addr),8) */ + + JSCB_Addr = Substr(TCB_Area,181,4) + JSCB_Area = Storage(C2X(JSCB_Addr),280) + JCT_Addr = Substr(JSCB_Area,261,4) + JCT_Area = Storage(C2X(JCT_Addr),100) + ACT_Addr = C2D(Substr(JCT_Area,57,3)) + ACT_Area = Storage(D2X(ACT_Addr),100) + ACT_len = C2D(Substr(ACT_Area,49,1)) + ACT_code = Substr(ACT_Area,50,ACT_len) + + Return ACT_code diff --git a/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob b/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob deleted file mode 100644 index 8c11bb2..0000000 --- a/endevor/Field-Developed-Programs/Miscellaneous-items/GETJOBNM.cob +++ /dev/null @@ -1,83 +0,0 @@ - PROCESS DYNAM OUTDD(JOBINFO) - Identification Division. - Program-ID. GETJOBNM. - Author. Gilbert Saint-Flour. - *----------------------------------------------------------------* - * * - * This program retrieves specific system-related data from * - * MVS control blocks and moves it to Working-storage. * - * * - * The name of the control-block is indicated in pos 1-6 of * - * the Procedure Division lines. * - * The layout of the MVS control blocks is described in the * - * MVS Data Areas manuals, which can be found on any MVS or * - * OS/390 CD collection or viewed on-line by going to: * - * http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/library * - * and searching for: * - * MVS DATA AREAS * - * * - * Origin = http://gsf-soft.com/Freeware/ * - * * - Data Division. - Working-Storage Section. - 01 Results. - 05 sys-name Pic x(8). - 05 job-name Pic x(8). - 05 proc-step Pic x(8). - 05 step-name Pic x(8). - 05 program-name Pic x(8). - 05 program-name2 Pic x(8). - 05 job-number Pic x(8). - 05 job-class Pic x. - 05 msg-class Pic x. - 05 programmer-name Pic x(20). - 05 acct1 Pic x(32). - 05 batch-or-cics Pic x(5). - 88 Batch Value 'BATCH'. - 88 CICS Value 'CICS '. - 05 micro-seconds Pic S9(15) COMP-3. - - 01 four-bytes. - 05 full-word Pic s9(8) Binary. - 05 ptr4 Redefines full-word Pointer. - 01 eight-bytes. - 05 double-word Pic s9(18) Binary. - * * - Linkage Section. - 01 cb1. 05 ptr1 Pointer Occurs 256. - 01 cb2. 05 ptr2 Pointer Occurs 256. - Procedure Division. - * * - PSA SET Address of cb1 to NULL - TCB SET Address of cb1 to ptr1(136) - MOVE cb1(317:8) to eight-bytes - COMPUTE micro-seconds = double-word / 4096 - TIOT SET Address of cb2 to ptr1(4) - MOVE cb2(1:8) to job-name - DISPLAY 'job_name=' quote job-name quote -********* MOVE cb2(9:8) to proc-step -********* MOVE cb2(17:8) to step-name - JSCB SET Address of cb2 to ptr1(46) - MOVE cb2(361:8) to program-name - DISPLAY 'program_name=' quote program-name quote - SSIB SET Address of cb2 to ptr2(80) - MOVE cb2(13:8) to job-number - DISPLAY 'job_number=' quote job-number quote - PRB SET Address of cb2 to ptr1(1) - MOVE cb2(97:8) to program-name2 -********* DISPLAY 'program_name2=' quote program-name2 quote - JSCB SET Address of cb2 to ptr1(46) - JCT SET Address of cb2 to ptr2(66) -********* MOVE cb2(48:1) to job-class -********* MOVE cb2(23:1) to msg-class - ACT MOVE zero to full-word - MOVE cb2(57:3) to four-bytes(2:3) - SET Address of cb2 to ptr4 - MOVE cb2(25:20) to programmer-name - DISPLAY 'programmer_name=' quote programmer-name quote - MOVE zero to full-word - MOVE cb2(49:1) to four-bytes(4:1) - MOVE cb2(50:full-word) to acct1 - DISPLAY 'accounting_code=' quote acct1 quote - * * - GOBACK. diff --git a/endevor/Field-Developed-Programs/Miscellaneous-items/README.md b/endevor/Field-Developed-Programs/Miscellaneous-items/README.md index ea14c6f..a6221ca 100644 --- a/endevor/Field-Developed-Programs/Miscellaneous-items/README.md +++ b/endevor/Field-Developed-Programs/Miscellaneous-items/README.md @@ -1,11 +1,7 @@ # Miscellaneous-items These samples are provided as is and are not officially supported (see [license](https://github.com/BroadcomMFD/broadcom-product-scripts/blob/main/LICENSE -) for more information). - -## GETJOBNM - -A modified Shareware program that has a wide range of usage. Information about a running job can be written in a REXX format, to be used again with TableTool (or othere REXX processing. See the [Automated-Test-Facility-Using-Test4Z](https://github.com/BroadcomMFD/broadcom-product-scripts/tree/main/endevor/Automated-Test-Facility-Using-Test4Z) as an example. +) for more information). ## ANL#DRIV, ANL#VIEW and BTCHEDIT From b62c657c13ceed67b5ebc65fcd4bdd4a903112b2 Mon Sep 17 00:00:00 2001 From: Joseph Walther <58827655+waljo11@users.noreply.github.com> Date: Tue, 10 Jun 2025 19:56:09 -0500 Subject: [PATCH 3/4] Update README.MD --- endevor/Automated-Test-Facility-Using-Test4Z/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD index 0f9f14f..7dde451 100644 --- a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD +++ b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD @@ -10,7 +10,7 @@ Items in this folder can be used to introduce and automate testing in Endevor, r Your Endevor processor can submit JCL and wait for your batch test to compleete. You have a choice on how the job accounting code is derived for the submmitted job. - **GETACCTC lookup.rex** allows you to enter userids and accounting codes at your site. -- **GETACCTC.rex** uses the **GETJOBNM** program in [Miscelaneous-Items folder](https://github.com/BroadcomMFD/broadcom-product-scripts/tree/main/endevor/Field-Developed-Programs/Miscellaneous-items) to get the accounting information from a low memory address. +- **GETACCTC.rex** uses lower-memory to get the accounting information for an active job or session. See the two modes of testing described in [Testing Modes](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0/administrating/define-options-for-unit-and-record-and-replay.html) and [Test4Z techdocs documentation](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0.html) : From 6af15dd8a9a9abe7ac8f5920249bf54c26245394 Mon Sep 17 00:00:00 2001 From: Joseph Walther <58827655+waljo11@users.noreply.github.com> Date: Tue, 10 Jun 2025 20:01:24 -0500 Subject: [PATCH 4/4] Update README.MD --- endevor/Automated-Test-Facility-Using-Test4Z/README.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD index 7dde451..85fe338 100644 --- a/endevor/Automated-Test-Facility-Using-Test4Z/README.MD +++ b/endevor/Automated-Test-Facility-Using-Test4Z/README.MD @@ -9,8 +9,8 @@ Items in this folder can be used to introduce and automate testing in Endevor, r Your Endevor processor can submit JCL and wait for your batch test to compleete. You have a choice on how the job accounting code is derived for the submmitted job. - **GETACCTC lookup.rex** - allows you to enter userids and accounting codes at your site. -- **GETACCTC.rex** uses lower-memory to get the accounting information for an active job or session. + allows you to enter userids and accounting codes for your site. +- **GETACCTC.rex** uses data blocks in lower-memory to obtain the accounting information for an active job or session. See the two modes of testing described in [Testing Modes](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0/administrating/define-options-for-unit-and-record-and-replay.html) and [Test4Z techdocs documentation](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/test4z/1-0.html) :