GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 11 of 158    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: 7 Last Update: July 29, 2008   
  
 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
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 | No
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 1   Answer is not useful 0Overall Rating: +1    
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


 
Go To Top


 Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape