Page 1 of 2

retrive job completition code

PostPosted: Sat Mar 15, 2014 4:25 am
by cresg820
Hello,
i want to launch some jobs in background from a server and get completion codes. To launch jobs i see that if I connect to zos in telnet and write "submit casual.job.to.launch.name" i get a job id like jobXXXXX, and if i write "output jobXXXXX" i see job sysout from which i can get job return code. But i think that this is not the best solution, especially if job's sysout is very big or if has been purged/deleted/ecc.

I see also if i set "Notify" parameter in the job card when i'm connected to z/os i receive a notification with completition code, but also this solution isn't the best one because if i've been disconnected from system for some reason i lose messages.


I cannot use a automatic job scheduler because datasets change at every launch.

Someone have some ideas hot to resolve this problem? Thanks

Re: retrive job completition code

PostPosted: Sat Mar 15, 2014 4:54 pm
by NicC
If you want to sumit a job after the previous one ends successfully Then this has een asked many times. The simplest way is to get the prior job to submit the successor - execute IKJEFT01 and have it issue the submit command. You do, of course, have to set up all parameters beforehand but once that is done submit the first one and go have your coffee.

Re: retrive job completition code

PostPosted: Sat Mar 15, 2014 5:37 pm
by cresg820
Hi,
thank you for your response. I don't need to submit some jobs in sequence. Jobs that I have to submit have no relations between them and an ABEND of one of them has no impact to others.

Re: retrive job completition code

PostPosted: Sun Mar 16, 2014 3:49 am
by dick scherrer
Hello,

Your requirement is not clear . . .

If you want something done in the case of an abend You have to provide for it. SomeThing has to know what to do and cause it to be submitted.

If you are concerned about "losing" some messages, do not delete them until they are no longer needed?

You may need to consider some other approach as this does not sound like it does what you want.

Re: retrive job completition code

PostPosted: Sun Mar 16, 2014 4:16 am
by cresg820
Hi,
i'll try to be more clear:

A user needs to submit a job on a running z/os partition but he hasn't necessary permisions to do that. He send me a mail and says "hi, i need to sumbit job in prod.random.job.to.sumbit.". I submit his job, check job's execution and
reply to his mail with job's return code

multiply this for one or two hundred requests and I go crazy ... so I need something that does this "stupid work" for me. I plan to create a web interface where users can inserts their requests and a background application that reads users requests and does dirty work: submit jobs, check execution and notify users.
The web interface and the background application will run on an external server and jobs to sumbit don't share any standards like input class, ms g class, notify parameters ecc.



any other approach or suggestion is welcome

Re: retrive job completition code

PostPosted: Sun Mar 16, 2014 11:45 pm
by NicC
If they are accessing production data then the jobs should be run under the control of the scheduler no matter how many or who the user is - CEO or God.The scheduler can run a job to send emails.

Re: retrive job completition code

PostPosted: Mon Mar 17, 2014 1:35 am
by cresg820
my problem is that jobs name change and jobs jcls change continuously there is no ties between jobs.

If i use a scheduler i have to define every time new jobs and delete the oldest one ... not very practical

Re: retrive job completition code

PostPosted: Mon Mar 17, 2014 5:45 am
by dick scherrer
Hello,

Why can each user not have one job name and upload run specifics (including which datasets and jcl) when they want to submit a job.

Each user would have a single "incoming control" dataset and the system schedule would be set up to submit when this dataset is created.

If you have 1000 users this would still be a lot of one-time setup.

The last several clients I've supported allow users to submit their own jobs. . . fwiw.

Re: retrive job completition code

PostPosted: Mon Mar 17, 2014 6:07 am
by cresg820
dick scherrer wrote:Why can each user not have one job name and upload run specifics (including which datasets and jcl) when they want to submit a job.
Each user would have a single "incoming control" dataset and the system schedule would be set up to submit when this dataset is created.
If you have 1000 users this would still be a lot of one-time setup.

There aren't rules that put restrictions to jobs names and datasets names so I cannot create a static and pre configured environment. And it is difficult to change users habits

dick scherrer wrote:The last several clients I've supported allow users to submit their own jobs. . . fwiw.

For internal policy users cannot submit their jobs unless their jobs are not submitted by someone authorized to sumbit arbitrary jobs, and I cannot change this policies.

I need a dynamic environment and I have no problem to manage this on server side I have problems to submit an arbitrary job to z/os and get its return code.

Re: retrive job completition code

PostPosted: Mon Mar 17, 2014 6:54 pm
by dick scherrer
Hello,

And it is difficult to change users habits
Yes, it can be. However, this is not a developer issue. This is a management issue. If management believes it is proper for you to spend so much time doing this manually, you may be stuck for a while.
There aren't rules that put restrictions to jobs names and datasets names so I cannot create a static and pre configured environment.
Why can each user not have "their own" job and dataset for the submission and the first thing the process does is to generate whatever is needed for the actual run?