MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Production Job Performance and more

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue Nov 01, 2005 11:27 am    Post subject: Production Job Performance and more Reply with quote

I need to update a table on a weekly basis. This can be accomplished with a query. Here are my questions:
1. What will have better performance DSNTIAUL or a compiled COBOL program?
2. Is DSNTIAUL ok for a production job?
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Tue Nov 01, 2005 11:30 am    Post subject: Reply with quote

NASCAR9,

What kind of updates are we talking ?

A single sql statement which would update the entire table or is the update based on a key in the table?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue Nov 01, 2005 11:36 am    Post subject: Reply with quote

kolusu,
The query could update 0 to 1000 rows. Here is the query.
Code:
UPDATE HOURS.PREMACTIVE A               
   SET (A.ARREARS,                     
        A.ARREARS_DATE) =               
    (SELECT 'A', B.MAILDATE             
       FROM HOURS.UFCWLETTER B         
     WHERE B.MAILDATE   = CURRENT DATE
       AND B.LETTERNAME = 'PREMLETT101'
       AND A.SSNO       = B.SSNO       
       AND A.EMPDATE  <> '9999-12-31'   
       AND A.ACTION   <> 'DELETE'       
      AND (A.ARREARS = ' '             
       OR  A.ARREARS IS NULL))         
WHERE 0 NOT IN (SELECT COUNT (*)       
       FROM HOURS.UFCWLETTER C         
     WHERE C.MAILDATE   = CURRENT DATE
       AND C.LETTERNAME = 'PREMLETT101'
       AND A.SSNO       = C.SSNO       
       AND A.EMPDATE  <> '9999-12-31'   
       AND A.ACTION   <> 'DELETE'       
      AND (A.ARREARS = ' '             
       OR  A.ARREARS IS NULL))         

_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Tue Nov 01, 2005 11:57 am    Post subject: Reply with quote

NASCAR9,

I would prefer a cobol program opening a cursor on table A and B.

Another option is to run an explain for the above update statement and see the cost

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue Nov 01, 2005 12:02 pm    Post subject: Reply with quote

kolusu,
A batch program is the way I was leaning also.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Tue Nov 01, 2005 2:20 pm    Post subject: Reply with quote

NASCAR9,
Also take into account the activity on the table HOURS.PREMACTIVE, it can cause deadlock/timeout to other processes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group