Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

What is the difference between CANCEL and INITIAL statement

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
vjrithwik
Member


Joined: 12 Oct 2006
Posts: 2

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 12, 2006 12:25 pm    Post subject: What is the difference between CANCEL and INITIAL statement Reply with quote

Hi,

What is difference between CANCEL and INITIAL statements.
_________________
Regards,
Rithwik

"To learn to read is to light a fire; every syllable that is spelled out is a spark?
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 1051

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
1 salutes

PostPosted: Thu Oct 12, 2006 5:22 pm    Post subject: Reply with quote

Hi Rithwik,

CANCEL is used to initialize the sub-program. INITIAL is used to initialise the same program.
More information.........

CANCEL statement.
-----------------------

The CANCEL statement ensures that the next time the referenced subprogram is
called it will be entered in its initial state.

When a CANCEL statement is executed, all programs contained within the program referenced
by the CANCEL statement are also canceled.

A program can, however, cancel a program that it did not call, providing that,
in the calling hierarchy, it is higher than or equal to the program it is canceling.
For example:

A calls B and B calls C (When A receives control, it can cancel C.)

A calls B and A calls C (When C receives control, it can cancel B.)



NOTE : No action is taken when a CANCEL statement is executed, if subprogram has not been dynamically called.



INITIAL Statement
-----------------------

Specifies that when program-name is called, program-name and any programs contained
within it are placed in their initial state. The INITIAL attribute is not supported for programs
compiled with the THREAD option.

INITIAL statement is used with PROGRAM-ID statement.




Thanks,
Krishna
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
gmt360
Member


Joined: 31 May 2010
Posts: 1

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jun 01, 2010 1:21 pm    Post subject: Reply with quote

Sorry for replying to an older post.
If not valid pls let me know, however it is related.

Do we use IS INITIAL in sub-program only?

Dynamically called programs are always in Initial Mode, Is it automatic or do we need to Code IS INITIAL or CANCEL?/

Pls reply

thanks

Garry
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jun 01, 2010 11:36 pm    Post subject: Reply with quote

Quote:
Dynamically called programs are always in Initial Mode


not true

only for first CALL. after that, without a CANCEL, next time pgm is CALLed, it is in last left status.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
-1 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jun 01, 2010 11:37 pm    Post subject: Reply with quote

Quote:
Dynamically called programs are always in Initial Mode


not true

only for first CALL. after that, without a CANCEL, next time pgm is CALLed, it is in last left status.

only with the program-id clause INITIAL,
will a program (dynamically or statically) be load on each CALL in initial state.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 27, 2016 8:32 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Jan 30, 2016 11:42 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Feb 01, 2016 10:10 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts SORT OUTFIL HEADER Example 5 murali gummadi 12722 Mon Feb 01, 2016 11:01 pm
academyindia4 View latest post
No new posts difference between COMP and COMP-3 4 pkaushi 15960 Mon Feb 01, 2016 10:49 pm
academyindia4 View latest post
No new posts what s the difference between DB2 & ADB2? 8 Richard 10784 Sat Mar 17, 2012 1:07 pm
Rookie View latest post
No new posts 2007 - A YEAR WITH A DIFFERENCE 0 Krishna 2960 Thu Dec 28, 2006 6:48 pm
Krishna View latest post
No new posts difference between elapsed time and the cpu time 2 Diya 8921 Thu Jun 29, 2006 3:56 pm
Juan View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-1174.html