IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need Options to Read a file for each record of another file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 3:37 pm
Reply with quote

Hi,

I got a Requirement for Performance tuning a program. Issue is that the job is taking 14 hours to run.

This program Reads 2 files. Both are sequential files.

Basic logic that needs change is -
Read FILE1 (approximate number of reacords in this file is 10,000)
For each read of this file read another file (again sequential file) to get a match for Policy Number. (approximate number of records in FILE2 is again 10,000).

FILE1 LRECL - 604 with RECFM VB
FILE2 LRECL - 4000 with RECFM FB

Program has a check for Policy along with 4 other variables. Like below
If POL-FILE1 = POL-FILE2 AND
DATE-FILE1 = DATE-FILE2 AND
IND-FILE1 = IND-FILE2 AND
IND2-FILE1 = IND-FILE2 AND
IND3-FILE1 - IND-FILE2

<DO SOMETHING>
END-IF
When it gets a match then it comes out of READ or READ till End of file.
Then CLOSE FILE2 and OPEN FILE2 for another READ of FILE1.

I need options to minimize the time taken to execute this program.
1) I thought by making FILE2 as VSAM file (KSDS), each Read of FILE1 will have 1 read of FILE2
But I am not sure if this way is good as the file LRECL is 4000.

Kindly let me know if there are other ways of doing it.
I need to give options to my client and then they will get back with a chosen option which I need to code and execute.

Thanks,
Kranthi
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Apr 18, 2012 3:51 pm
Reply with quote

if you have the money,
i have the time.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Apr 18, 2012 4:13 pm
Reply with quote

What incompetent moron of a predecessor decided to use an unsorted FILE2, and open and close it 10,000 times?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 4:15 pm
Reply with quote

dbzTHEdinosauer wrote:
if you have the money,
i have the time.


I valiantly offer to go 50-50 with dbz.

Or undercut him :-)

From what you have described, I'm pretty sure we could reduce the run time by well over 99%. Seriously.

That's the biggest clue you get without stumping up for it, since your client would be very, very happy with the change (and very, very, unhappy with the original) and your client is paying you(r company) and no-one is paying us.

EDIT: It is a bit much to even call it "basic logic". I see the honourable Akatsukami has let our money-covered-cat out of the bag.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 5:10 pm
Reply with quote

This can still work out.

Your organisation, company, has serious problems.

Someone has written code for a task which should run in less than a minute (depending on machine size, etc) and it runs instead for 14 hours.

The Client knows. How, I don't know, but they know.

Presumably one of the better coders (that's you) has been given the task of providing "options" to the client, but you have no grasp of the basic problem.

Therefore, we can intuit that all systems produced by your organisation are equally poorly equipped to do the job.

So, for an agreed fee, dbz and I can receive your specs and programs. When we have stopped giggling at the code, we can turn them around with an expected minimum of 50% performance improvement, and possibly even more than 90%. Those projections are on what we know so far.

For a further fee, we can produce standards and review processes for your development and testing etc.

The savings for your organisation, and improvement in Client satisfaction, marketability of product, etc, will vastly outstrip what we would charge.

One small rat in the ointment. You work for IBM and somehow someone has produced this and the Client has found out. I'm stunned. Still, run it by your boss, PM us if you are interested :-)
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 5:32 pm
Reply with quote

Hi,

For many reasons, I am not supposed to give you my program. Spec as I said is to reduce the run time. And for sure code is written long back by some one from Client side.

Also, I guess you are not pointing any thing at IBM and IBMers :-).

I believe that IBM and IBMers produce good quality of code.

And I am really not sure if that FEE thing you are talking about is for real ...

Kindly let me know if there are ways to achieve my task.
I was also, thinking about using SORT but for that to use I need to first understand how FILE1 is SORTED and on same line I need to SORT FILE2.

Also, FILE1 is not a simple sequential file. It stores different types of records and say if there are 10 types of recirds each denoted by some code at the start then type 10 has the information that I process.

These 10 types of records are repeated for each policy.

Kindly let me know if you need more information.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 18, 2012 5:36 pm
Reply with quote

Quote:
For many reasons, I am not supposed to give you my program.


since You ask for help, You are supposed to give us the info we ask/need to solve Your problem

if You cannot do that, for whatever reason, You are wasting everybody' s time


Quote:
believe that IBM and IBMers produce good quality of code.


does not look so from the quality of questions asked here by IBMers


anyway
I strongly believe that IBM employees should not ask for help on a public forum

when I worked ( in IBM ) it was against the BUSINESS CONDUCT GUIDELINES
to ask <external> sources for help

but maybe now IBM work ethics and rules have changed ,
or it' s just IBM India way of conducting IT consulting business
( sell at an high price what they get for free AKA known as stealing )

IBM has it' s own internal forums for getting help !
so just tell us for what reason we should give free consultancy services to IBM ?

it would be nice/interesting to see Your manager comments on the subject here icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 5:45 pm
Reply with quote

Of course I was serious about the fee :-)

Opening and Closing a file 10,000 times, and reading every record on it 10,000 times, will consume considerable resources. On your client's machine it consumes nearly all the run time for the job, as it would do on anyone's machine. I can't believe that anyone has put up with that for years, but there we go.

The "options" are simple. Do it without opening/closing/reading-the-entire-file 10,000 times.

How best to do it, does depend on the specifics of the data.

Unless the files are not "designed" at all, then multiple record-types should not come into it.

Sort and two-file-match, sort and internal table, sort and less-likely-ksds... the specifics are beyond guessing.

But you, or someone where you work, should know all this...
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 5:52 pm
Reply with quote

Hi,
I read BCG and posting or pasting directly file names or code is against the BCG.

It is not against when we post in general.

Thanks for your help.

I thought I could get some more options of getting the task done and not in any other way.

It would have been better if there is a tag line that IBMers can not use this forum. But I thought we could use. any how thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 18, 2012 5:56 pm
Reply with quote

Quote:
It would have been better if there is a tag line that IBMers can not use this forum.


nowhere is said that IBMers can not use the forum,

if <You> do and show incompetence
<You> are bound to bear the comments about IBM poor ethics.
whether You like it or not.

and if <You> do not like it just complain to Ginny icon_evil.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 5:59 pm
Reply with quote

Indeed, we have very welcome IBMers on here. They provide solutions, not look for them from us to sell to their clients.
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 6:11 pm
Reply with quote

Thanks Bill. I started looking into the SORT option already.
Will get back if that code works. And I am sure there are alternatives for all the tasks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 6:14 pm
Reply with quote

And what about thanking the Honourable Akatsukami? Without his intervention (cat spilling) I'd still have wanted that fee...
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Apr 18, 2012 6:29 pm
Reply with quote

Bill Woodger wrote:
And what about thanking the Honourable Akatsukami? Without his intervention (cat spilling) I'd still have wanted that fee...

I didn't mean to snatch the bread out of your mouth icon_smile.gif

With due respect to Dr. Sorichetti and the other IBMers and ex-IBMers on this board, however, and as a former IBM subcontractor myself, I must say that I am very negatively impressed with the lack of technical acumen, programming ability, and even basic literacy in English shown by the developers and recruiters for IBM India. I can only suppose that both IBM Global Services and its clients would rather spend little and get nothing, than spend much and get much icon_sad.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 18, 2012 6:35 pm
Reply with quote

Konnichiwa Akatsukami Sama

Quote:
With due respect to Dr. Sorichetti and the other IBMers and ex-IBMers on this board, however, and as a former IBM subcontractor myself, I must say that I am very negatively impressed with the lack of technical acumen, programming ability, and even basic literacy in English shown by the developers and recruiters for IBM India


apart the English skills...
I am really pissed of about the above , or better
the overall lack of competence an even worse good judgement capabilities

cheers
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 6:50 pm
Reply with quote

thanks every one. I can feel only sarcasam. in each and every sentence you have posted. And from now on, I would never want to post any question on this forum. If possible I will post answers ... Actually, I do not wan to use this forum for any reason from now on. Have never seen so much of negativity any where else.

And most of u seem to b Ex-ibmers.... think if you have done any good today, by replying to my post. except venting out your frustration on me.

God Bless you!!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 18, 2012 7:06 pm
Reply with quote

Quote:
And most of u seem to b Ex-ibmers....

being an ex IBMer is the reason for the tone of my reply
but maybe You are too thick to understand

Quote:
think if you have done any good today, by replying to my post.

once upon a time IBM had as one of the objectives to be the BEST of the brand for each <product> delivered to the customers
and that reflected on the attitude of the people.
but then at that time we had different ethics and different pride

since You did not appreciate the suggetsion to meditate on ethics and pride
we just lost time

Quote:
except venting out your frustration on me.


Our ethics, pride, professional image and skills got better
the same attributes for IBM and IBM employees got worse

why should we be frustrated,
Oh Yes we are pissed at IBM for it, but thats all
You might after all be the semi-innocent victim icon_cool.gif

why not report our comments to Your manager?
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Wed Apr 18, 2012 7:34 pm
Reply with quote

I wish I could understand what you are saying. But just because I am IBMer for some time does not mean ...you should say all these.

If I resign in a weeks time from now....then will you answer for my questions in more nice way....

and How does it make any difference to you...me being an IBMer now and in a week out of IBM.

And will it make any difference if I am from IBM India or from some other company.

Yes, I became a victim of all your offences...for no real good reason ....

And again, I have never ever seen this kind of sarcasm and negetivity any where else or from any person for no good reason...

We are all earning because we are working on IBMs product IBM Mainframes. I am thankful to it. I will be even if I join some other company.

Talking about ethics ....we can still go back and read forum rules...and think about the real ethics we are following.

I am sure you still will not accept and will try to reply again. Dont you think, with your level of knowledge you could have even answered to my question in last 2 hours. Instead you have been posting just to make some comments about IBM.

I have all the respect for all the companies that I have worked with and for all the people that I have interacted with including you...considered you to be knowledgeable person....because I saw that you are a moderator for this forum.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Wed Apr 18, 2012 7:40 pm
Reply with quote

Good day to all!

I can not believe a program badly design as it is take 14 hours to run with 10,000 records in each file. First, I really believe it was design like that to su** the milk out of the cow (client) but the cow got wise as time went by.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 7:54 pm
Reply with quote

Kranthi,

It is not personal, if you read.

What we do tend to dislike is consultants/consultancies coming here for solutions to problems they can't handle themselves, which we know at the end of the day they are going to make money from by passing the solution off as their own and the client paying.

I did not realise initially that it was a client-written program. Still, the problem itself was so obvious as to not require asking here, surely?

If, when you had signed-up here, you had never mentioned IBM as an employer, and if, when asking the question, you had never introduced the "client" part of the relationship, the responses would have been somewhat different, but we'd still have expected it to be obvious to you what the "basic" problem was.

Anyway, whatever happend to that famous old "IBMer Sense of Humour" you used to all be known and loved for? :-)

EDIT: I've just read to the end of your previous post.

The point about the solution is that it is instantly obvious. Don't, and don't ever, do such a silly thing. I know it wasn't you, but you should know. Hopefully you do now.

Beyond that, we can say no more as you are unable to provide anything more. We can't provide more direct answers to an entirely open-ended question.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 11:23 pm
Reply with quote

Hello,

Quote:
I can feel only sarcasam. in each and every sentence you have posted
If you feel only sarcasm, it is probably because you were expecting sarcasm. . .

Most of the replies to this are not sarcastic at all. . .

People have offered to do this work for a fee. Many of our senior contributors are in the business of doing "things" for a fee. Nothing sarcastic about this. They are called consultants or contractors.

The approach used in the code (doesn't really matter who wrote it originally) is completely unacceptable. It should be redesigned to operate properly. And yes, it should run in less than a minute. There are several alternative approaches that would drastically improve performance - and they should be rather obvious.

And yes, IBMers are surely welcome here icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top