View previous topic :: View next topic |
Author |
Message |
JOHNCWL Beginner
Joined: 25 Feb 2004 Posts: 31 Topics: 16
|
Posted: Thu Apr 29, 2004 11:16 am Post subject: Cobol Performance |
|
|
Hi,
I would like to know the performance affect of the below code.
Now currently its taking 0.68% CPU.
MOVE ALL 'N' TO TABLE-IO-TYPE-REC-REQ
Structure of TABLE-IO-TYPE-REC-REQ
03 TABLE-IO-TYPE-REC-REQ.
05 TITRR-O OCCURS 030 TIMES.
10 TITRR PIC X(01).
10 TOTRR PIC X(01).
10 IO-HAVE-REC PIC X(01).
10 TIOT-WHICH-SEG PIC X(02).
10 TIOT-DB-RECORD-LENGTH PIC 9(04).
10 TIOT-DB-AREA PIC X(3280).
Any ways to improve further performnace??
There are some more statements like Moving Spaces to large area, How will it affect the performance?? |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Thu Apr 29, 2004 12:10 pm Post subject: |
|
|
Hi John,
Have you looked at the Assembler code generated by the move? While you're at it why not add a move of spaces to the table and compare the code generated by each.
HTH, Jack. |
|
Back to top |
|
 |
neilxt Beginner
Joined: 01 Mar 2004 Posts: 23 Topics: 1
|
Posted: Wed May 12, 2004 2:01 pm Post subject: |
|
|
Quote: |
Hi,
I would like to know the performance affect of the below code.
MOVE ALL 'N' TO TABLE-IO-TYPE-REC-REQ
03 TABLE-IO-TYPE-REC-REQ.
05 TITRR-O OCCURS 030 TIMES.
10 TITRR PIC X(01).
10 TOTRR PIC X(01).
10 IO-HAVE-REC PIC X(01).
10 TIOT-WHICH-SEG PIC X(02).
10 TIOT-DB-RECORD-LENGTH PIC 9(04).
10 TIOT-DB-AREA PIC X(3280).
Any ways to improve further performnace??
|
As far as I know this is actually the most efficient way to do that.
Last time I looked at the Assembler for something like that it was just 4-5 instructions culminating in an overlapping MOVE LONG. There's certainly nothing you can do with loops that would better that. The only thing I can think of that might make a slight difference is if you had it as an 01 level or put in the slack to force it to a word boundry start position. |
|
Back to top |
|
 |
|
|