Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Another advantage of PROCs is re-startability.
Many organizations have a policy that all scheduled production jobs execute one or more PROCs. The normal jcl contains a JOB statement, and one or more EXEC statements (with symbolic parameters if any).
JOB contains executable JCL statements. Each JOB will have max 255 steps to execute. each step will execute diff program. Each program will have diff functionality. In 255 steps you may invoke procedures or programs. Here my piont is, JOB is used to execute programs or to invoke procedures. This is what job will do...
Coming for Proc's... Proc stands for Procedure. It means, there should be some certain procedure which multiple users can use the same code as per their requirement. Little in detail... Take for example...
There is a program ( ACCTCHEK) which will check the account # against with masterfile. here , input file contains some account # and this file will check aginst with master file. This is the functionality of ACCTCHEK program. Now this program i am coding in catalog procedure.
User 1 : has a JOB which will contain 10 steps , but, out of 10 steps there is a step which has to check the account # against with master file.
User 2 : has a JOB which will contain 30 steps, but, out of 30 steps there is a step which has to check the account # against with master file.
User n ....
here my point is , all the user are expecting same kind of functionality which has to check the account # against with the master file. Instead of writing diff users as same functionality program multiple times, they will write one prgoram ( ACCTCHEK as per the above example ) and they will keep that progam in catalog procedures. So, advantages are Reusability, One time debugging, we can reduce multiple coding .
Hope it will help you this information... Please let me know if you are not clear. Thanks.