Skip to content

Commit 13d43b1

Browse files
committed
Readme Update and included items
1 parent 4fc6d2b commit 13d43b1

File tree

4 files changed

+190
-0
lines changed

4 files changed

+190
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* REXX */
2+
/* Bump the last character on a Jobname to next value */
3+
Trace O
4+
Arg jobname;
5+
Rotation = '12345678901',
6+
'ABCDEFGHIJKLMNOPQRSTUVWXYZA',
7+
'@#$@'
8+
jobname = word(jobname,1)
9+
lastchar = Substr(jobname,Length(jobname))
10+
wherenext = Pos(lastchar,Rotation) + 1
11+
overlaychar = Substr(Rotation,wherenext,1)
12+
nextJobname = overlay(jobname,overlaychar,Length(jobname))
13+
nextJobname = overlay(overlaychar,jobname,Length(jobname))
14+
Return nextJobname
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* REXX */
2+
Arg whatuser
3+
JobAccountingCode. = '12340'
4+
JobAccountingCode.user#01 = '127398730'
5+
JobAccountingCode.user#02 = '127398730'
6+
JobAccountingCode.user#03 = '106321234'
7+
JobAccountingCode.user#04 = '106321234'
8+
JobAccountingCode.user#05 = '111212340'
9+
JobAccountingCode.user#06 = '124312340'
10+
JobAccountingCode.user#07 = '121412340'
11+
JobAccountingCode.user#08 = '118412340'
12+
JobAccountingCode.user#09 = '124312340'
13+
JobAccountingCode.user#10 = '114412340'
14+
JobAccountingCode.user#11 = '123212340'
15+
JobAccountingCode.user#12 = '111412340'
16+
JobAccountingCode.user#13 = '106341234'
17+
JobAccountingCode.user#14 = '301123400'
18+
Return JobAccountingCode.whatuser

endevor/Automated-Test-Facility-Using-Test4Z/README.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Automated Testing in Endevor with Test4Z
22

3+
These samples are provided as is and are not officially supported (see [license](https://github.com/BroadcomMFD/broadcom-product-scripts/blob/main/LICENSE
4+
) for more information).
5+
36
## Introduction
47

58
Items in this folder can be used to introduce and automate testing in Endevor, running the kinds of test supported by Test4Z.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/* REXX */
2+
/*----------------------------------------------------------*/
3+
/* This Rexx is given a JCL dataset and member name in its */
4+
/* parameter. */
5+
/* The REXX: */
6+
/* o submits the JCL */
7+
/* o watches and waits for it to complete its execution*/
8+
/* o returns to caller */
9+
/* */
10+
/*----------------------------------------------------------*/
11+
CALL BPXWDYN 'INFO DD(SUBMITST)'
12+
If RESULT = 0 Then Trace ?R
13+
Arg SubmitJCL WaitLoops LoopSeconds;
14+
15+
/* Set the value for Phase that indicates job is done */
16+
FinalExpectedPhase = "AWAITING OUTPUT"
17+
18+
/*----------------------------------------------------------*/
19+
/* Get my jobname.... Cannot wait for myself */
20+
/* Ensure the job we submit does not have the same jobname */
21+
/* as my own. */
22+
/*----------------------------------------------------------*/
23+
myJobName = MVSVAR('SYMDEF',JOBNAME ) /*Returns JOBNAME */
24+
25+
/* Submit the JCL named in the parameter */
26+
Call Submit_n_save_jobInfo;
27+
If SelectJobName = myJobName then,
28+
Do
29+
Say 'The job to be monitored is mine. Invalid request'
30+
Exit(8)
31+
End;
32+
33+
/* Wait for the submitted job to finish */
34+
jobnum = SelectJobNumber
35+
jobid = SelectJobName
36+
ownerid = USERID()
37+
retcode. = ' '
38+
daten. = ' '
39+
Timen.= ' '
40+
PhaseName. = ' '
41+
Call Monitor_Job_Status;
42+
43+
exit
44+
45+
Submit_n_save_jobInfo: /* submit SubmitJCL job and save job info */
46+
47+
Address TSO "PROFILE NOINTERCOM" /* turn off msg notific */
48+
CALL MSG "ON"
49+
CALL OUTTRAP "out."
50+
ADDRESS TSO "SUBMIT '"SubmitJCL"'" ;
51+
CALL OUTTRAP "OFF"
52+
JobData = Strip(out.1);
53+
jobinfo = Word(JobData,2) ;
54+
If jobinfo = 'JOB' then,
55+
jobinfo = Word(JobData,3) ;
56+
SelectJobName = Word(Translate(jobinfo,' ',')('),1) ;
57+
SelectJobNumber = Word(Translate(jobinfo,' ',')('),2) ;
58+
59+
Return;
60+
61+
Monitor_Job_Status:
62+
63+
IsfRC = isfcalls( "ON" )
64+
if IsfRC <> 0 then Exit(8)
65+
66+
myMessage = ' ';
67+
isfprefix = SelectJobname
68+
isfowner = USERID()
69+
isfcols = "jname jobid ownerid queue jclass prtdest retcode",
70+
" daten TIMEN PHASENAME "
71+
72+
seconds = LoopSeconds /* Number of Seconds to wait if needed */
73+
74+
/*********************************************/
75+
/* Wait until the submitted job is completed */
76+
/*********************************************/
77+
Do loop# = 1 to WaitLoops
78+
/* call exec_sdsf "0 ISFEXEC ST" opts_sdsf */
79+
Address SDSF "isfexec ST (VERBOSE ALTERNATE DELAYED)"
80+
81+
if RC <> 0 then,
82+
Do
83+
say "RC" RC "returned from ISFEXEC ST" ;
84+
Exit(12);
85+
end;
86+
87+
Sa= 'isfcols=' isfcols
88+
StRows = isfrows
89+
If StRows = 0 then,
90+
Do
91+
say "No rows returned from ISFEXEC"
92+
Call WaitAwhile
93+
Iterate ;
94+
end;
95+
96+
SubmittedJobPhase = 'Submitted'
97+
Call EvaluateSubmittedJob
98+
If SubmittedJobPhase = FinalExpectedPhase then Leave;
99+
100+
Call WaitAwhile
101+
102+
End; /* Do loop# = 1 to WaitLoops */
103+
104+
If SubmittedJobPhase /= FinalExpectedPhase then,
105+
Do
106+
Say 'Job' SelectJobname SelectJobNumber,
107+
' not completed within Wait arguments',
108+
WaitLoops LoopSeconds
109+
exit(8)
110+
End
111+
112+
Say 'Job' SelectJobname SelectJobNumber 'is completed',
113+
' at ' DATE(S) TIME()
114+
115+
Return;
116+
117+
EvaluateSubmittedJob:
118+
119+
Do row# = 1 to StRows
120+
Sa= 'Finding' jname.row# jobid.row# ownerid.row#,
121+
jclass.row# PhaseName.row# Timen.row#
122+
if jobid.row# /= SelectJobNumber then iterate;
123+
124+
SubmittedJobPhase = PhaseName.row#
125+
Sa= 'Status:' SelectJobname SelectJobNumber ,
126+
'retcode.row#=' retcode.row# SubmittedJobPhase ,
127+
' on ' row# 'wait loop'
128+
Leave;
129+
End; /*Do row# = 1 to StRows */
130+
131+
Return;
132+
133+
WaitAwhile:
134+
/* */
135+
/* A resource is unavailable. Wait awhile and try */
136+
/* accessing the resource again. */
137+
/* */
138+
/* The length of the wait is designated in the parameter */
139+
/* value which specifies a number of seconds. */
140+
/* A parameter value of '000003' causes a wait for 3 seconds. */
141+
/* */
142+
/*seconds = Abs(seconds) */
143+
/*seconds = Trunc(seconds,0) */
144+
Say "Waiting for" seconds "seconds at " DATE(S) TIME()
145+
/* AOPBATCH and BPXWDYN are IBM programs */
146+
CALL BPXWDYN "ALLOC DD(STDOUT) DUMMY SHR REUSE"
147+
CALL BPXWDYN "ALLOC DD(STDERR) DUMMY SHR REUSE"
148+
CALL BPXWDYN "ALLOC DD(STDIN) DUMMY SHR REUSE"
149+
150+
/* AOPBATCH and BPXWDYN are IBM programs */
151+
parm = "sleep "seconds
152+
Address LINKMVS "AOPBATCH parm"
153+
154+
Return
155+

0 commit comments

Comments
 (0)