View previous topic :: View next topic
|
Author |
Message |
karthikuma
New User
Joined: 29 Mar 2005 Posts: 62
|
|
|
|
In company which sort is using(cobol r jcl ). at wat condition we have to go for cobol and for jcl.
bye,
kumar |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
jcl sorting's performance is generally more better than cobol sorting. as in case of cobol sorting the resource are held up till the whole program didn't get executed where as in case of jcl sorting the resources are released as soon as just sorting is over. e.g.
there are 2 programs PROG1 and PROG2.Output of PROG1 need to be accesed in sorted format in PROG2. Now if you perform cobol sorting then the resource for sorting i.e. ur intermidiate work file will be held up unless and untill PROG2 completes it's execution where as if you use jcl sorting then PROG1-SORT-PROG2. Now sort utility will give the sorted output to the PROG2 and it can perform directly the input(sorted output of PROG1).
The intermidiate work file all will be relesed as soon as execution of SORT utility is over.
and at the same time running the utility programs take the minimum time and it's space complexity as well as time complexity is better than a normal program.
One can go for cobol sorting only when the execution time for the PROG2 is not very high.But if the execution time of PROG2 is very high then i think it is better to go for JCL sorting. |
|
Back to top |
|
|
squid_rocks
New User
Joined: 21 Mar 2005 Posts: 15 Location: Pune, INDIA
|
|
|
|
Hi,
I would like to add something here...
In either of the sort methods, internally a JCL is submitted (what I mean here is, even if you do an internal sort, a JCL is actually submitted). So actually there is not much difference.
But the catch is here...
Internal sort (COBOL sort) we use when:-
1. We have less data to sort.
2. when we need to use INPUT PROCEDURE and OUTPUT PROCEDURE.
Whereas external sort is preferred when we have huge records in the file to sort.
One more thing is (not sure about this one) - We do not have to declare the files that we need to sort externally, in the COBOL program as is the case with SD entry for internal-sort file.
Hope this is of some help...
Pls correct me if wrong |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Generally external (JCL) sorts perform I/O operations far more efficiently than internal sorts using I/O PROCEDURES.
If an internal sort doesn't use I/O PROCEDURES (and I think the Compiler Option FASTSRT is also required) it performs as efficiently as an external sort.
So it's adviseable to use external sorts if at all possible. I know some shops require all sorts to be external, in spite of passing the data more than once. Would I go that far? Not without some test verification. |
|
Back to top |
|
|
rushtojayaraj
New User
Joined: 15 Jul 2005 Posts: 2
|
|
|
|
Hi,
I completely agree with the above points
Let me add few more things...
when we have to make a decision between JCL or Cobol sort consider the following factors.
1.Size of the data that needs to be sorted
2.Perfomance
3.Reusability(the temp output file in JCL sort can be passed on to next step)
4.purpose of the sort -Sorting in order of one or more fields either in ascending or descending order, Elimination of duplicates,include or exclude records based on the given condition and a lot more..
regards,
Jai |
|
Back to top |
|
|
|