|
INTERVIEW QUESTIONS
MAINFRAME
DB2
DETAILS
Question: What will happened ,if the subprogram is called second time?
Answer: Subprogram are reusable statements. If more than one program require the same statements to be repeated, then its better idea to place these statements in a new program and CALL them as subprograms. The result vary as what value u pass as parameter
They can be called as many time as the programmer wishes. These subprogram will be expanded in the main memory while execution. Thus main program space is reduced and its easy to understand the logic.
Note: Here 'St' is short for Statement. Let suppose that St2 is having 100 lines of repeatable code.
Say: ProgA is having St1, St2 , St3, St2. And ProgB is having St5, St2, St6. And ProgC is having St7, St2.
If u Observe St2 is repeated in DIFFRENT programs (ProgA/B/C) as well as WITHIN SAME prog (ProgA). So its better to place the St2 in a subprogram and then make a CALL to this SUBPROGRAM.
You can pass same/different parameters each time you make a CALL to the subprogram, even within SAME program.
|
|
|
Category |
DB2 Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6946 users |
Added on |
7/22/2011 |
Views |
70626 |
Rate it! |
|
|
Question:
What will happened ,if the subprogram is called second time?
Answer:
Subprogram are reusable statements. If more than one program require the same statements to be repeated, then its better idea to place these statements in a new program and CALL them as subprograms. The result vary as what value u pass as parameter
They can be called as many time as the programmer wishes. These subprogram will be expanded in the main memory while execution. Thus main program space is reduced and its easy to understand the logic.
Note: Here 'St' is short for Statement. Let suppose that St2 is having 100 lines of repeatable code.
Say: ProgA is having St1, St2 , St3, St2. And ProgB is having St5, St2, St6. And ProgC is having St7, St2.
If u Observe St2 is repeated in DIFFRENT programs (ProgA/B/C) as well as WITHIN SAME prog (ProgA). So its better to place the St2 in a subprogram and then make a CALL to this SUBPROGRAM.
You can pass same/different parameters each time you make a CALL to the subprogram, even within SAME program. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What will happened .if the file is open in extend mode and corresponding is equal to old in jcl?
|
View Answer
|
|
File opening modes in cobol and corresponding dispositions?
|
View Answer
|
|
Initial position of cursor of the exucuton of open statements?
|
View Answer
|
|
When do you use subroutines?
|
View Answer
|
|
At what stage db2 must be up?
|
View Answer
|
|
Can you display the index?
|
View Answer
|
|
What is the index ,types of index ?
|
View Answer
|
|
What is an intent lock?
|
View Answer
|
|
What is low values and high values?
|
View Answer
|
|
How to read last record in vsam file.,I don't know how many records are there?
|
View Answer
|
|
How many clustering indexes are pasing for a table?
|
View Answer
|
|
How to know other person job status?
|
View Answer
|
|
Can u see s9(4)comp3 data?
|
View Answer
|
|
How to see the status of the table?
|
View Answer
|
|
When you will use cursor with hold option?
|
View Answer
|
|
Describe the elements of the SELECT query syntax. SELECT element FROM table WHERE conditional statement
|
View Answer
|
|
What is diff b/w QMF & Spoofi?
|
View Answer
|
|
A dataset contains 1000 records ,I want to brouse particular record in file-id?
|
View Answer
|
|
How to load data to a table?
|
View Answer
|
|
File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using file-aid?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All DB2 Interview Questions & Answers - Exam Mode /
Learning Mode
|