Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Performance issue with Cobol Program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
thanoozm

New User


Joined: 23 May 2007
Posts: 26
Location: hyderabad

PostPosted: Thu Jul 29, 2010 6:57 pm    Post subject: Performance issue with Cobol Program?
Reply with quote

We are trying to develop a new module for report purpose. The main functionality of this module is

1)Read some student number from file (this is numeric)
2)Search it in tablea with student number, and prefix of student number can be (A,B,C and D) – I need to retrive all the rows with (any prefix).
EX: student numbers is 123,
if Table A has like this
Prefix Number Dep no
A 123 1
B 123 2
C 123 3
D 123 4
I need to able to read all the four numbers from table I need to write report Under student no123

3)I need to read next record from input file (different student number) and repeat 2 step. This process has to repeat until end off the file.


I am having problem with this I have written code it is taking 10 hours to run in production. It is huge amount of CPU time using. I need to reduce time.

My input file is getting 10,000 records and Table A has (8lakhs records), I have write cursor on Table A with conditions. Cursor is getting maximum off 100 records. Do we have any options to reduce time consuming?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 7:03 pm    Post subject:
Reply with quote

what are the datatype definitions for your table?
what is the potential range of PREFIX
what does your declare cursor look like?
what does the jcl for the step that invokes your program look like?

use the BBcode CODE tags
Back to top
View user's profile Send private message
thanoozm

New User


Joined: 23 May 2007
Posts: 26
Location: hyderabad

PostPosted: Thu Jul 29, 2010 8:24 pm    Post subject:
Reply with quote

Data type of Prefix is character(1) and maximum it can have 35(26 alphabets and 9 numeric) but I need to consider only 5 prefixes(A,B,C,D and E).

I am using IKJEFT01 utility
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 8:32 pm    Post subject:
Reply with quote

well, since you can only have 35 potential rows returned per Number
it makes no sense to have 100 returned by the cursor,
which is why I asked: what does your declare cursor look like?
Back to top
View user's profile Send private message
thanoozm

New User


Joined: 23 May 2007
Posts: 26
Location: hyderabad

PostPosted: Thu Jul 29, 2010 8:43 pm    Post subject:
Reply with quote

Hi Dick,

Correct what ever you said but I have not mentioned one point. Depart meant numbers can be any number (it has one character and 6 numeric), If depart meant number varies i need to accept that row also.

Prefix Number Dep no
A 123 1
B 123 2
C 123 3
D 123 4
A 123 2
A 123 3

In above case i will get more rows.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 8:45 pm    Post subject:
Reply with quote

what does the following (which you sent me in a PM)
have to do with what you stated in your first post.

Code:

EXEC SQL
   DECLARE CUR-GET-PAYMUM CURSOR FOR
     SELECT DISTINCT B.POLICY_IDENTITY
           ,B.INDIVIDUAL_IDENT
           ,A.TITLE
           ,A.SURNAME
           ,A.FORENAME
       FROM VMWI_BASIC01  A
          , VMWD_B_DTLS01 B
      WHERE A.MAX_INIT_ANNTY_ASS  = 'N'
        AND A.INDIVIDUAL_IDENT    = B.INDIVIDUAL_IDENT
        AND A.CURRENT_STATUS     IN ('S','I','N')
        AND B.POLICY_IDENTITY  LIKE :WS-SCHEMENUM-DB2
END-EXEC.

Private Message wrote:

VMWI_BASIC01 this table has 4lakhs and VMWD_B_DTLS01 this table has around 8lakhs records. My input scheme number present in WS-SCHEMENUM-DB2 I have added % to get all the prefix with that scheme.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 9:22 pm    Post subject:
Reply with quote

and stop sending me private messages.

there is a very large difference between what you described in your first post and what you are actually doing.

get an explain of the cursor and work with that.
I don't like joins, but the LIKE clause does not thrill me.

and sort your IN-list
instead of IN ('S','I','N')
should be IN ('I','N','S')

only thing I can suggest based on the information that I have is buffer up your input and output files (30 or 40).

we have no idea about your system, your tables, their interrelationships.
work with the explain and get the sql pared down as best you can on your end.
Back to top
View user's profile Send private message
thanoozm

New User


Joined: 23 May 2007
Posts: 26
Location: hyderabad

PostPosted: Fri Jul 30, 2010 12:54 pm    Post subject:
Reply with quote

Thanks Dick,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us