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 

Pls suggest to increase the processing speed of cobol pgm.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Dhruvi
Beginner


Joined: 21 Mar 2003
Posts: 5
Topics: 1
Location: India

PostPosted: Fri Mar 21, 2003 6:34 am    Post subject: Pls suggest to increase the processing speed of cobol pgm. Reply with quote

Hi,
I am working on IBM mainframe and don't know much about COBOL part.
I am writing a program in COBOL which is building a key and matches that key with a large VSAM file.
While building the key combination,ma using multi-dimensional array.I am storing the values like this,

department_no | 1 |4 | 9| $ |
__________________________
Name | aa |bb | $ |


the key combinations will be like 1aa
1bb
4aa
4bb
9aa
and so on....
The problem I am facing is the the processing speed of my program is very slow.I am not able to compare keys built by more than 70records to VSAM file Sad

Then I tried to speed up the process and convert the VSAM(KSDS) file to sequential file.And then I sorted the values of the array to make the search easy in sequential file

The problem I am facing is Program is now sorting the array's values but I am not able to open the SYSOUT of my EXECUTE JCL .

And its taking a lot of time Sad

Can anybody provide me the solution of this problem or can suggest any other way to improve the speed (pls provide the code also)

best regard,
Dhruvi
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Fri Mar 21, 2003 12:25 pm    Post subject: Reply with quote

Make sure that your table processing uses indexes rather than subscripts where possible. If you have to use subscripts, define them as COMP-3 rather than Display.

You may also want to look at adding buffers to the DD card for the VSAM file. Check into the BUFNI parameter.
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Fri Mar 21, 2003 3:09 pm    Post subject: Reply with quote

Hi Dhruvi,

From your description I can't get an idea of what you're attempting. Why don't you provide your code? That might give us a better idea.

Regards, Jack.
Back to top
View user's profile Send private message
Glenn
Beginner


Joined: 23 Mar 2003
Posts: 56
Topics: 3

PostPosted: Sun Mar 23, 2003 6:01 am    Post subject: Reply with quote

Or even pseudocode would help and a listing of your requirements (basically I mean what you program needs to get done when I say that)....

Can't get an idea of what you're attempting either...
Back to top
View user's profile Send private message
Dhruvi
Beginner


Joined: 21 Mar 2003
Posts: 5
Topics: 1
Location: India

PostPosted: Wed Mar 26, 2003 12:31 am    Post subject: Reply with quote

OK.Let me give more clarification about the problem am facing.
1)
The program is performing a SORT for the values in the array.I am able to see the sorted values in the output file of my RUN JCL.

But am not able to open SYSOUT ,i have given in RUN JCL for Display.

Although program is performing rest of the logic also but am not able to open the SYsout dataset.

Is there any convention that if we are using SORT in the program then,only the output File used for SORT can be opened only not SYSOUT dataset ?

Then where i can see all the DISPLAY statements i have put in the program as we are not using any testing tool like Expeditor.

2) I need a suggestion also.If my program using A VSAM(KSDS) dataset and I want to improve the speed of program then what kind of changes i need to make?

Some of my friends suggested to use sequential File instead of VSAM file.But am not sure about that

Thanks to all for your responses.Looking forward for more.

Best Regards,
Dhruvi
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Glenn
Beginner


Joined: 23 Mar 2003
Posts: 56
Topics: 3

PostPosted: Wed Mar 26, 2003 1:41 am    Post subject: Reply with quote

1) SYSOUT is accessed generally through DISPLAY statements, like SYSIN is accessed by using ACCEPT statements. SYSOUT is the console, although you can define it to go to a file too in your JCL I reckon. But basically SYSIN is for input from the console, and SYSOUT is for output to the console. SYSIN = read-only SYSOUT = write-only.
2) Still don't understand your problem - you mainly restated it. Here's what I understand: Input comes from somewhere (?). Something about this input(?) causes you to do a Multi-dimensional table lookup to build a key. This key is used to do a look-up read on a VSAM file... Am I right? Look for the (?) - you need to be answering those questions. A good start might be telling us what this program is doing very specifically from start to finish.
Back to top
View user's profile Send private message
Dhruvi
Beginner


Joined: 21 Mar 2003
Posts: 5
Topics: 1
Location: India

PostPosted: Thu Mar 27, 2003 7:23 am    Post subject: Reply with quote

The input for the program is a sequential File.
Program is reading one record ,checked for a variable at particular location,then checks for its value in the same record at some definite location.
If value of the variable is there in record,Program will build a multidimensional array.
Will move variable in one column and its value in another column.

another thing,if no value for the variable is found form the record,it will read the value from a DB2 table.

There may be more than one value for a variable in the table.Progarm has to read all the values and put in the same array as

ws-variable | 10 | 15| 12 | = total of 3 values
___________________________
ws-variable1 | AA | = total of 1 value
___________________________
ws-variable2 |da |vv| = total of 2 values


Hope You got the idea of the table.

Now i have to build the combinations of all the values exists in the array and consider all the combinations like for the above values in the array ,combination keys will be,

So there wil be total of 3*1*2 = 6 possible combinations.

10AAda
10AAvv
15AAda
15AAvv
12AAda
12AAvv

Hope u understand this thing.
Now I wanted to sort the values in the array to make the search easy; as I have to take each combination key and compare with a large VSAM/Sequential file for a match.


The values in array should be like this aftyer sorting

10,12,15...

ws-variable | 10 | 12| 15 | = total of 3 values
___________________________
ws-variable1 | AA | = total of 1 value
___________________________
ws-variable2 |da |vv| = total of 2 values

Hope this might help u to get the idea.

Yeah I know the purpose of SYSOUT but i have directed all the output of a Execute JCL to a dataset to test the program thru DISPLAY statements.And if am using SORT in my program its not getting opened/viewed.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Thu Mar 27, 2003 11:27 pm    Post subject: Reply with quote

Hi Dhruvi,

Let me present what I think you're saying, then you can correct what I have wrong.

The end result of your pgm is to update a group VSAM file records whose keys correspond to data collected from QSAM file input records.

The keys are developed from 3 data segments of each record read from the QSAM file. The keys are built, sorted (using DFSORT or SYNCSORT), and ultimately stored in a multi dimesional tabel in the pgm.

This done, you now reference the table in key order and update the VSAM file records using the key values stored in the table.

Now, if I'm correctly understanding your logic, I ask:

WHY not just build the key and update the VSAM file as each QSAM record is read? Sorting and storing them first in a table doesn't seem to serve any purpose, since you reference the VSAM file directly.

If I'm not understanding you correctly, then you have some further explaining to do. But my interpretation may give you a clue as to what is at the root of my misunderstanding.

Let me also mention some things in your problem description that puzzle me:

You refer to a "variable" being in one part of the I/P record and its "value" being in another. I can't say that I know what that means. Usually a variable and its value reside in the same location, in fact the terms are usually used interchangably.

You also mention "Opening" SYSOUT. Do you mean after the job is run? Are you defining it in JCL as SYSOUT=A? Or as a flat disk file?

How large is the table (# of entries)? The VSAM file (# of recs).


BTW, Sort has the ability to change the DD names of SYSIN and (I think) SYSOUT via "special registers" in the pgm. Check the manual. Though, I think that if both the pgm and sort use SYSOUT, the worst that should happen is that the SYSOUT of each gets interspesed with the other. No big deal, in this case.

Well, I've gone on long enough.

Regards, Jack.
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 -> Application Programming 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