Loading

JOB statement with START and FINISH procs in Easytrieve

Consider reading about JOB INPUT statements and PROCs in Easytrieve to know about JOB and PROC in easytrieve (not the usual JOB and PROC in JCL !).

 LIST ON
 JOB INPUT NULL START BEGIN-PROC FINISH FINAL-PROC
   PERFORM MID-PROC
   DISPLAY ' IN THE JOB '
 STOP
*
 BEGIN-PROC. PROC
   DISPLAY ' STARTING ..'
 END-PROC
*
 FINAL-PROC. PROC
   DISPLAY ' ENDING ..'
 END-PROC
*
 MID-PROC. PROC
   DISPLAY ' MIDDLE ..'
 END-PROC
*

In the above program, BEGIN-PROC will execute first (before starting the JOB block) and FINAL-PROC will be executed after the JOB statements are complete. hence, output of this program will look like,

 STARTING ..
 MIDDLE ..
 IN THE JOB
 ENDING ..

Related Posts




blog comments powered by Disqus

There's 6 Comments So Far

  •   Rekha
    March 26th, 2012 at 7:18 am

    I am new to Easytrieve, Its very helpful for me to understand the basic concepts as its correlated with Cobol.

  •   Karthik
    March 28th, 2012 at 3:35 am

    Thanks Rekha for your comment!

  •   Rekha Madheswaran
    April 24th, 2012 at 10:14 am

    I’m beginner in easytieve. Its very much helpful for me to understand. Thanks a lot….

  •   Karthik
    April 24th, 2012 at 1:57 pm

    Thanks Rekha!

  •   Rituraj Singh Rawat
    November 14th, 2012 at 10:20 am

    Thanks Karthik ! Keep up the good work !

  •   bone raviteja
    June 24th, 2013 at 10:45 am

    i am new to easytrieve ,this is very useful to know the concepts very easy and simplest way thanks alot………………………

Share your thoughts, leave a comment!