Design Question . COBOL vs JCL Utilities



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Design Question . COBOL vs JCL Utilities

Postby mainframe_novice » Thu May 27, 2010 8:51 pm

I have a task which involves
comparison of million records each from 2 files .
I get File A as an input and File B is the unload of a table .
Whatever is in File A if not in B , I have to insert those records into Table .
Whatever is in File B which is not in File A , would be updated .
Additional row each would be created for such rows.

Now Performance wise which would be faster ?

Doing it in COBOL OR Using IBM Sort/SyncSort to find the differences and using BMCHigh speed engine to do table operations ?

Your valuable inputs are appreciated .
mainframe_novice
 
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Design Question . COBOL vs JCL Utilities

 

Re: Design Question . COBOL vs JCL Utilities

Postby dick scherrer » Thu May 27, 2010 11:34 pm

Hello,

Whatever is in File B which is not in File A , would be updated .
Updated in the database table?

Suggest you run some timing tests to see which approach works best for your specific situation. One consideration is to make sure that any bit of data is read once rather than many passes of all of the data. . .

From what you have posted, i don't know enough to say more. If you post a more complete description of the process, maybe someone will have a more useful suggestion.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Design Question . COBOL vs JCL Utilities

Postby mainframe_novice » Fri May 28, 2010 3:19 am

Thanks Dick !

Yes ..Number of reads on same data is important consideration .

The updates and insert will be done on Table .

While thinking for number of reads , we do not really know how many reads tools like DFSORT and SYNCSORT do .
You,Frank or Allisa can give me a better idea on that .

But doing it COBOL puts a big questionmark on why should we write something which is already available through some utility.

Thanks for your inputs and time again !
mainframe_novice
 
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Design Question . COBOL vs JCL Utilities

Postby dick scherrer » Fri May 28, 2010 4:57 am

Hello,

But doing it COBOL puts a big questionmark on why should we write something which is already available through some utility.
If some utility or sort can do 100% of the requirement there is not much question (providing your organization permits using the full features of the sort or utility). I have been asked several times to look into "poor performance" and found that "someone" had implemented a process by using 5 or more sort/utility processes to do what one actually coded program could do. This caused hundreds of millions of records to be passed multiple times.

Someone who is familiar with both the requirement and the tools available should participate in the implementation decision. There is no one "right answer" - it depends on the specifics.

Much (actually most) of the time one sort or utility step does not meet the full requirement. Some things shold be done with code.

The updates and insert will be done on Table .
How are these updates to be accomplished? Is this possibly a typo? What % of the rows in the table will typically be inserted/updated? You mention what shouold happen if a value isin one file and not the other. What happens when the value is in both files? What about duplicatges? Etc, etc, etc. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Design Question . COBOL vs JCL Utilities

Postby Frank Yaeger » Fri May 28, 2010 4:59 am

While thinking for number of reads , we do not really know how many reads tools like DFSORT and SYNCSORT do .
You,Frank or Allisa can give me a better idea on that .


Your question is way too vague for me to answer it.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Design Question . COBOL vs JCL Utilities

Postby mainframe_novice » Fri May 28, 2010 10:11 am

Thanks Dick ...You have provided a lot of valuable information .
And yes..even I execute sort more than once ...as I can't get all things done in just one execution .
Sort can definitely help reduce the development and testing time ..but execution time will really depend upon how we implemented it .

As far as my Update and Insert SQL are concerned ,I construct those using Sort utility and by using data in files .
And using BMC high speed engine I can execute these SQLs within JCL .
In both the files we won't have any duplicates.If record exists in both the files then there won't be insert or update for that record .

Frank,
I was asking about the number of times/passes a data being read when sort tool compares 2 files , only to understand the performance .
Please let me know if you need more information .

Thanks to both of you again for your time and guidence .
mainframe_novice
 
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Design Question . COBOL vs JCL Utilities

Postby Frank Yaeger » Fri May 28, 2010 10:00 pm

If you use DFSORT's JOINKEYS function, then the data from each file will only be read once.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post