Skip to content

Add Change Job Class API to zosjobs Package - #448

Merged
frankgiordano merged 11 commits into
mainfrom
jobchange
Jan 3, 2026
Merged

frankgiordano merged 11 commits into
mainfrom
jobchange

Conversation

@frankgiordano

@frankgiordano frankgiordano commented Dec 29, 2025 •

Copy link
Copy Markdown
Collaborator

This PR implements the Change Job Class REST API in the zowe.client.sdk.zosjobs.methods package, providing users of the Java SDK with the ability to change the class of a JES job via the z/OSMF REST interface. The implementation follows the existing style and design patterns used in other job-related methods such as JobCancel, JobHold, and JobRelease.

The API wraps the z/OSMF Change Job Class endpoint documented here:
https://www.ibm.com/docs/en/zos/2.4.0?topic=interface-change-job-class

What’s Included:

  • A new class JobChange in the zosjobs.methods package

    • Follows the validation, logging, and request construction conventions from existing classes (e.g., JobCancel)
    • Supports both synchronous (version = "2.0") and asynchronous (version = "1.0") invocation
    • Validates jobName, jobId, and jobClass parameters
    • Constructs a PUT request to the /zosmf/restjobs/jobs/{jobname}/{jobid} endpoint with the proper JSON body to change job class
    • Uses ZosmfRequest and ZosmfRequestFactory to ensure consistent HTTP handling
    • Added constants to JobsConstants as needed

Example Usage

 JobChange jobChange = new JobChange(connection);
 Job job = jobChange.change("MYJOB", "00012345", "A", "2.0");

This will send a request to change the class of job MYJOB/00012345 to class "A" synchronously.

Implements #381

@frankgiordano frankgiordano self-assigned this Dec 29, 2025
@frankgiordano frankgiordano added the enhancement New feature or request label Dec 29, 2025
@frankgiordano
frankgiordano merged commit 6682e39 into main Jan 3, 2026
2 checks passed
@frankgiordano
frankgiordano deleted the jobchange branch January 3, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant