retrive job completition code



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

retrive job completition code

Postby cresg820 » Sat Mar 15, 2014 4:25 am

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
cresg820
 
Posts: 12
Joined: Mon Apr 08, 2013 7:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: retrive job completition code

Postby NicC » Sat Mar 15, 2014 4:54 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: retrive job completition code

Postby cresg820 » Sat Mar 15, 2014 5:37 pm

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.
cresg820
 
Posts: 12
Joined: Mon Apr 08, 2013 7:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: retrive job completition code

Postby dick scherrer » Sun Mar 16, 2014 3:49 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: retrive job completition code

Postby cresg820 » Sun Mar 16, 2014 4:16 am

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
cresg820
 
Posts: 12
Joined: Mon Apr 08, 2013 7:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: retrive job completition code

Postby NicC » Sun Mar 16, 2014 11:45 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: retrive job completition code

Postby cresg820 » Mon Mar 17, 2014 1:35 am

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
cresg820
 
Posts: 12
Joined: Mon Apr 08, 2013 7:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: retrive job completition code

Postby dick scherrer » Mon Mar 17, 2014 5:45 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: retrive job completition code

Postby cresg820 » Mon Mar 17, 2014 6:07 am

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.
cresg820
 
Posts: 12
Joined: Mon Apr 08, 2013 7:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: retrive job completition code

Postby dick scherrer » Mon Mar 17, 2014 6:54 pm

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post