Joined: 09 Aug 2008 Posts: 1631 Location: Mumbai, India
Posted: Wed Apr 01, 2009 11:04 am Post subject:
To start with, Sort when invoked using COBOL application then it's called as "Internal sort" while "external sort" is one directly used in JCL.
"Which one is better" - This has long been a question as it relates to efficiency. The answer, actually, 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.
Hope this helps . . . _________________ Regards,
The way in which COBOL interfaces with DFSORT depends on the use of COBOL features such as FASTSRT, NOFASTSRT, USING, GIVING and INPUT and OUTPUT PROCEDUREs, and DFSORT features such as COBOL exits and DFSORT control statements. In general, the features you use are dictated by the needs of your application. But in many cases, an application can achieve its results using one or another of these features, that is, you have a choice. This chapter describes some of the COBOL and DFSORT features you can choose and the performance and productivity implications of doing so.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum