Sunday, June 16, 2013

Differences 1


Q1) What is the difference between PIC 9.99 and 9v99 ?
A1) PIC 9.99 is a FOUR-POSITION field that actually contains a decimal point where as PIC 9v99 is THREE- POSITION numeric field with implied or assumed decimal position. 

Q2) What is the difference between SEARCH and SEARCH ALL ? What is more efficient ?
A2) SEARCH is a sequential search from the beginning of the table. SEARCH ALL is a binary search, continually dividing the table in two halves until a match is found. SEARCH ALL is more efficient for tables larger than 70 items. 

Q3) What is the difference between static call & Dynamic call?
A3) In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, the called program is not an executable program it can executed through the called program 

Q4) What is the different between index and subscript ?
A4) Subscript refers to the array of occurrence , where as Index represents an occurrence of a table element. An index can only modified using perform, search & set. Need to have an index for a table in order to use SEARCH and SEARCH All.
Sl #
Subscript
Index
1
Working Storage item
Internal Item – No need to declare it.
2
It means occurrence
It means displacement
3
Occurrence, in turn translated to displacement to access elements and so slower than INDEX access.
Faster and efficient.
4
It can be used in any arithmetic operations or for display.
It cannot be used for arithmetic operation or for display purpose.
5
Subscripts can be modified by any arithmetic statement.
INDEX can only be modified with SET, SEARCH and PERFORM statements.