Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Performance Tuning

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
shashi_IT
Member


Joined: 15 Oct 2013
Posts: 2

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Oct 15, 2013 12:24 pm    Post subject: Performance Tuning Reply with quote

Hello Everyone,

I am trying to fetch few records based on the account as key from Input KSDS VSAM file into flat file.Count in input VSAM file is nearly 56 Millions. I want to reduce the CPU time and Elapse time for this sort.

Current CPU time : 2.50, Elapse time : 22.64

Step from JCL : STEP016 EXEC PGM=SORT,PARM='MINCORE=512K'

Sort card : SORT FIELDS=COPY
INCLUDE COND=(1,1,BI,NE,1,1,BI,OR,
5,11,CH,EQ,C'account1',OR,
5,11,CH,EQ,C'account2',OR,
.
.
.
5,11,CH,EQ,C'account54',OR,
1,1,BI,NE,1,1,BI)

Any help will be greatly appreciated.Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Oct 15, 2013 1:18 pm    Post subject: Reply with quote

Write a prigram to take the keys and extract the data using the key.

The problem with the SORT is that it will read the 56M records, even if you've extracted all your accounts after 1,000 records.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
shashi_IT
Member


Joined: 15 Oct 2013
Posts: 2

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 10:13 am    Post subject: Reply with quote

Thanks William for your reply.

We want it should be done thru jcl sort not thru cobol sort.

(your comment) -->The problem with the SORT is that it will read the 56M records, even if you've extracted all your accounts after 1,000 records.

Ans : My account contain like 'Z%' ,so it has to read the whole file and extract the expected result from input file.

Kindly reply fast .Thank you.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 107
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 11:12 am    Post subject: Reply with quote

All your OR conditions would be applied against each of 56M records that may be the reason it is taking time.

Do you have any condition that can be put as AND against all these OR conditions.? - If so include that first.

i.e., as you said your account numbers would be like 'Z%' from this are all your account numbers starting with 'Z'?

Also keep the most possible condition first in the COND.

Giving more clarity on the input and output file condition would be much helpful to give you some suggetsions.
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 11:47 am    Post subject: Reply with quote

I'm not suggesting "cobol sort", I'm suggesting a program in a language which can do keyed reads on a KSDS.

For the quantify of account numbers you could physically get on an INCLUDE statement, it is going to be much more efficient to do keyed reads.

You are not sorting the data, All you are doing is including data for the account numbers you want.

You could get rid of the first and last OR, which are from somethng which genrated your INCLUDE. That would help a very litle, but nowhere near as much as the keyed reads would.


Last edited by William Collins on Wed Oct 16, 2013 5:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 107
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 4:46 pm    Post subject: Reply with quote

Then, what about doing this in Easytrieve.? You can read (or) search the file based on key.

Sample easytrieve code if you are not familiar with it -

http://code.xmlgadgets.com/2010/08/27/reading-vsam-file-in-easytrieve/

PS - Sorry, moderators can remove the link if it is violating the forum's rule in anyways.
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 5:58 pm    Post subject: Reply with quote

The link is for a sequential pass of a VSAM file. You'd need a keyed READ, and if multiple records of the same key, a START and GET until the key is different from that requested.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 9:50 pm    Post subject: Reply with quote

Easytrieve, COBOL, or SORT would pass all 56M records unless a keyed read is done . . .
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 107
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 10:32 am    Post subject: Reply with quote

William -

Sorry, But I believe the example provided in the link is a KEY'ed read. This is how a KSDS random read will happen in Easytrieve. EOF mentioned in the program is for FILE1, that might have confused you. Please correct me if I am wrong.

Sorry, currently I left without mainframe machine, else I would have tested the code and confirmed the same.
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 1:04 pm    Post subject: Reply with quote

You are free to believe what you like, no need to apologise.

You need to look in your Easytrieve Plus manual and see what GET does. Then see what READ does... have al look at all theI/O in fact.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 25, 2016 9:44 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities 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


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-7306.html