GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 11 of 162    Print  
Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
An external sort is not COBOL; it is performed through JCL and PGM=SORT. It is understandable without any code reference. An internal sort can use two different syntaxes: 1.) USING, GIVING sorts are comparable to external sorts with no extra file processing; 2) INPUT PROCEDURE, OUTPUT PROCEDURE sorts allow for data manipulation before and/or after the sort.


  
Total Answers and Comments: 9 Last Update: April 30, 2009   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: neha
 

1. Internal sort is used in COBOL application prog while external sort is used in JCL.

2. Internal sort uses workfiles while external sort uses the DFSORT mechanism.

3. External sort is more complicated than internal sort.

4. Internal sort is more flexible as we can alter or update data before  and after performing internal sort whereas the same doesn't hold true for external sort.

Thanks
Neha



Above answer was rated as good by the following members:
vukoti1229, memays
July 12, 2006 05:49:18   #1  
praleo        

RE: Explain the difference between an internal and an ...
External sort is performed by SORT pgm. Internal sort gives you data handling flexibility and it takes less secondary memory. For huge Volume of files it's better to use internal sort else large amount of space will be required in external sort. any comments...?
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 11, 2007 06:36:23   #2  
bala_alias Member Since: May 2007   Contribution: 1    

RE: Explain the difference between an internal and an ...
external sorting is used to refer to the sorting of huge volumes of data where the available main memory is not enough to handle the data. internal sorting is used for small volumes of data..
ext sorting is mostly less efficient

 
Is this answer useful? Yes | No
October 04, 2007 11:10:49   #3  
neha        

RE: Explain the difference between an internal and an ...

1. Internal sort is used in COBOL application prog while external sort is used in JCL.

2. Internal sort uses workfiles while external sort uses the DFSORT mechanism.

3. External sort is more complicated than internal sort.

4. Internal sort is more flexible as we can alter or update data before and after performing internal sort whereas the same doesn't hold true for external sort.

Thanks
Neha


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
January 08, 2008 11:07:50   #4  
lfrank Member Since: January 2008   Contribution: 9    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
This has long been a question as it relates to efficiency. The answer really depends on how much data needs to be sorted. The internal sort is simply an invocation of the same SORT utility that is JCL initiated (external sort).

When you run an external sort the entire address space is dedicated to the sort process. This means that outside the sort program itself all of the storage is used for buffers for the sort strings.

With an internal sort less storage is available to the sort since the application program and any other elements (DB2 MQ etc.) take up some of that storage.

If the amount of data is small the difference in available storage is insignificant. The sort will run just as fast. In fact doing all the work in a program can be more efficient because the JCL allocation/deallocation steps are done once instead of once for the sort step and once for the program step.

 
Is this answer useful? Yes | No
March 27, 2008 16:43:29   #5  
mouliswar2000 Member Since: March 2008   Contribution: 1    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?

An external sort is not COBOL; it is performed through JCL and PGM SORT. It is understandable without any code reference. An internal sort can use two different syntaxes: 1.) USING GIVING sorts are comparable to external sorts with no extra file processing; 2) INPUT PROCEDURE OUTPUT PROCEDURE sorts allow for data manipulation before and/or after the sort.


 
Is this answer useful? Yes | No
June 16, 2008 02:30:22   #6  
vukoti1229 Member Since: June 2008   Contribution: 3    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
Whenever you are going to manipulate any records befor sorting we are going for Internal sort..
If we dont have anything to manipulate we will go for external sort.....

 
Is this answer useful? Yes | No
July 29, 2008 00:31:59   #7  
Rinkoj Member Since: July 2008   Contribution: 1    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
COBOL sort is external sort as it requires workfile to store intermediate sort data.
Syntax:

SORT WORKFILE KEY IS EMP_NO USING INFILE GIVING OUTFILE.

INFILE -- Input file
WORKFILE -- Intermediate file where sort data will be stored
OUTFILE -- completely sorted file.

 
Is this answer useful? Yes | No
December 08, 2008 23:51:19   #8  
vengangaboy Member Since: December 2008   Contribution: 1    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?

Basically following is the difference between internal sort & external sort
-The internal sorting can reside in main memory external use secondary memory i.e. work files.
-Internal sorting is independent of time to read/write a record external ids dependent on the same because of secondary memory usage.
-Internal sorting takes input only which can be fit into its memory i.e. it takes small input
whereas external sorting can take as much as large input.
 

Is this answer useful? Yes | No
April 30, 2009 11:17:50   #9  
memays Member Since: November 2007   Contribution: 5    

RE: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
Actually Internal and External sort execute the same program (SORT) and utilize the same workfiles. The difference is in how the I/O is performed. External sort utilizes it's own I/O routines whereas Internal sort utilizes COBOL's I/O and uses an Exit (E15/E35) to pass the data to/from the SORT program.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape