Page 1 of 1

Difference between internal sort and external sort

Posted: Wed Dec 28, 2011 4:58 pm
by sonakasi
Hi all,

I have been questioned in an interview as whats the diff between internal sort and external sort ??

Answer :
Internal sort is handled by a cobol program using i/p file,work file and o/p file.
Internal sort is when you do any processing you need to recompile the cobol program
External sort is performed through jcl where you provide SORTIN and SORTOUT datasets and its easier to perform this sort as any changes, will require only submitting the jcl.

Kindly clarify on the same.

Posted: Wed Dec 28, 2011 9:44 pm
by DikDude
Internal sort is handled by a cobol program using i/p file,work file and o/p file.
Not typically. Well-implemented internal sorts do NOT specify using/giving, but rather input proccedure/ output procedure.
Internal sort is when you do any processing you need to recompile the cobol program
Most of the time this is not true. Once the code is in Production only a requirements change should cause the code to be re-compiled.
External sort is performed through jcl where you provide SORTIN and SORTOUT datasets and its easier to perform this sort as any changes, will require only submitting the jcl.
If the sort must be changed, the code on either side of the sort may also have to be changed. . .

IMHO, the primary difference between an internal and an external sort is that in one case some program uses the SORT statement and in the other the sort product for the system is directly invoked via JCL.

There is no generic "best to use". What is "best" depends on the requirement.

Posted: Thu Dec 29, 2011 1:14 pm
by sonakasi
Thank you very much !!!