Change status of Batch Job using X++

I have created a Batch Job using SysOperationFramework. I want to change the status of my Batch Job using X++ code.

When and why do you want to change the status? Normally it’s handled by the framework.

After execution of the batch the status will be ended now I want the status need to be changed to withhold. It is easy to change manually but i’m trying to change using X++.
Hope you got my Idea.

What business problem you’re trying to solve by this technical design?
Maybe we can find a better solution when we understand the actual problem.

yeah Thanks. Actually I am working on a project which Automate the batch processing activity using sysoperationframework