View previous topic :: View next topic
|
Author |
Message |
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
hello everybody
1. Explain call by value and call by reference with examples.
2. Explain STRING function WITH POINTER option.
3. Explain Static Call and Dynamic call with examples.
4. Diff. between subscript and index with examples.
5. Diff. between Search and Search All.
Plz answer these questions early. These are mostly asked interview questions.
bye
karthi G. |
|
Back to top |
|
|
mvs_butta
New User
Joined: 23 Dec 2003 Posts: 13
|
|
|
|
These are all basic questions , you can find the answers in any standard cobol book or refer to any manual |
|
Back to top |
|
|
pankajupadhyay Warnings : 1 New User
Joined: 04 May 2007 Posts: 13 Location: pune
|
|
|
|
if u want to sand only value of a particular variable from main pgm to sub pgm then its called called call by value, in this method main pgm and sub pgm use diffrent memory location .
when u use call by refrence that means u are sending address of identifier which u sending from main pgm to sub pgm , in that case sending and reciving feild use same memory location. ex
MAIN PGM.
W-S SECTION.
77 A PIC 999 VALUE IS 20.
77 B PIC 999 VALU IS 30
77 C PIC 999 VALUE ZEORS.
PROC.. DIV..
CALL 'SUBPGM' USING CALL BY VALUE A,B.
CALL BY REFRENCE C.
DISPLAY A
DISPLAY B
DISPLAY C
---------------------------------------------------------
SUB PGM.
L-K SECTION.
77 P PIC 999.
77 Q PIC 999.
77 R PIC 999.
PROCEDURE DIVISION USING P, Q ,R.
COMPUTE C = A + B.
DISPLAY C.
-----------------------------
OUT PUT
A = 20
B= 30
C= 50
P =20
Q= 30
R= 50
Here c and r using same memory location
but a, b and p,q are not |
|
Back to top |
|
|
pankajupadhyay Warnings : 1 New User
Joined: 04 May 2007 Posts: 13 Location: pune
|
|
|
|
subscript is integer variable which u define in a w-s section
but index is displacement which u write along with table declaration
with occurs clause |
|
Back to top |
|
|
pankajupadhyay Warnings : 1 New User
Joined: 04 May 2007 Posts: 13 Location: pune
|
|
|
|
search is seq. search but search all use for binary search.
search is good for small records and search all good for big records
and u can also add diff b/w seq and binary search |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You will find additional info about each of your questions if you search the forums.
Each has already been answered. |
|
Back to top |
|
|
|