Started Jobs

In z/OS we have this entity called a started task. It is like a process in Unix. It isn’t something anyone can do, it requires operator authority. As a console operator you issue the command Start xxx, where xxx is the name of a previously prepared JCL procedure. The JCL ‘proc’ is the same as procedure in JCL, a callable piece of function. So we use the term start a proc. A procedure includes a program or series of programs that get invoked with optional parameters and what ever data is required for that program.

The security is first through the ability to access the operator console which we call console authority, second by your access to the start command at all. The OPERCMDS class in SAF secures commands by name. So you would need permission to the Start command. Next by your ability to search and update a ‘proclib’. There are some procs that have well known names and are located in the procedure library. Other procs you might have to guess, but if you can read the proclib then you can see the existing procs. The procedure library is defined in 2 places. One place is in MSTRJCL – the master JCL. This is the proc that is used to start the master scheduler which is up all the time z/OS is running. There are DD’s – data defintions in the master JCL for the master proclib (IEFPDSI). This proclib is used whenever a proc is started that is directed to, or defaults to the master scheduler. For example S xxx,SUB=MSTR will direct a start command to the master scheduler. Primary subsystems such as JES2 when started will use the MSTRJCL IEFPDSI DD to locate the proc of JES2 itself. Once the Primary Job scheduler is up it takes on the role of the primary scheduler and all start commands are directed to it unless otherwise directed.

When you issue a start command once JES2 is up, the proclib used will be dictated by the STCCLASS statement in the JES2 parms. Those parms are located in the JES2 proc located in the MSTRJCL. Typically the proclib concatenation is has “SYS1.PROCLIB” or “SYS1.USER.PROCLIB” etc. To make a new proc you just place it into one of the libraries that you have permission to update. You need to be careful when updating proclibs to do so safely.

A Start command will invoke a proc and a proc defines the started task. Normally that’s all you need to know. The JOB statement and the EXEC statements are constructed by the Start command to invoke the PROC. There isn’t much configurability to the JOB statement. Further if you want to add a JCLLIB or modify the output class for a particular proc this isn’t easily done.

A Started Job is the same as a started task but it replaces the Start commands created Job statement with one you build. This can be very helpful. The key thing to note is the MSTRJCL has a DD called IEFJOBS. The system will look here for Started jobs.