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 ..
Advertisement

6 thoughts on “JOB statement with START and FINISH procs in Easytrieve”

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

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.