Class ZosBatchJobnames
IZosBatchJobname instances for jobnames chosen by the test.
By default the Manager provisions a unique jobname, either when IZosBatch.submitJob(String) is used
(or a null jobname is passed to IZosBatch.submitJob(String, IZosBatchJobname))
or by using the ZosBatchJobname annotation.
Use this class when the job must run under a particular jobname, for example to run a library member
under its documented name.
A valid jobname is 1 to 8 characters. The first character must be a letter or one of #, $
or @, and the remaining characters must be letters, digits or #, $ or @.
A name that is not valid is rejected with a ZosBatchException. Names are converted to upper case.
For example: IZosBatchJob batchJob = zosBatch.submitJob(jcl, ZosBatchJobnames.exact("PAYROLL"));
-
Method Summary
Modifier and TypeMethodDescriptionstatic IZosBatchJobnameCreate a jobname with exactly the supplied name, converted to upper case.static IZosBatchJobnamerandomWithPrefix(String prefix) Create a jobname that starts with the supplied prefix, converted to upper case, followed by random alphanumeric characters that make the jobname 8 characters long.
-
Method Details
-
exact
Create a jobname with exactly the supplied name, converted to upper case.Parallel runs: Galasa does not make this name unique. If tests that run at the same time on the same z/OS system submit jobs with the same name, a search by name, such as
IZosBatch.getJobs(String, String), returns the jobs of all of those tests. Each job still has its own job ID, which Galasa uses to track it. To avoid collisions, let the Manager provision the jobname, or userandomWithPrefix(String)to make a collision less likely.- Parameters:
name- the jobname, 1 to 8 characters- Returns:
- the
IZosBatchJobname - Throws:
ZosBatchException- if the name isnull, empty, longer than 8 characters or contains invalid characters
-
randomWithPrefix
Create a jobname that starts with the supplied prefix, converted to upper case, followed by random alphanumeric characters that make the jobname 8 characters long. For example, the prefixPAYproduces a jobname such asPAYK3Z9X. A new random suffix is generated on every call.This is the same as the jobname provisioned by the Manager, except that the prefix is chosen by the test rather than from the
zosbatch.jobname.[imageid].prefixproperty.The jobname is random, not guaranteed to be unique. The longer the prefix, the fewer the random characters and the greater the chance of a collision with another job. A 7 character prefix leaves only one random character.
- Parameters:
prefix- the start of the jobname, 1 to 7 characters- Returns:
- the
IZosBatchJobname - Throws:
ZosBatchException- if the prefix isnull, empty, longer than 7 characters or contains invalid characters
-