View previous topic :: View next topic
|
Author |
Message |
muthukannan
New User
Joined: 03 Aug 2006 Posts: 42 Location: Chennai
|
|
|
|
Here is my cobol program.
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID ASG6C.
000300 DATA DIVISION.
000400 WORKING-STORAGE SECTION.
000500 01 WS-P PIC 9(3)V9(2).
000600 01 WS-N PIC 9(2).
000700 01 WS-R PIC 9(3)V9(2).
000800 01 WS-I PIC 9(4)V9(9).
000900 PROCEDURE DIVISION.
001000 A000-MAIN-PARA.
001100 ACCEPT WS-P.
001200 ACCEPT WS-N.
001300 ACCEPT WS-R.
001310 DISPLAY WS-P.
001320 DISPLAY WS-N.
001330 DISPLAY WS-R.
001400 COMPUTE WS-I ROUNDED = ( WS-P * WS-N ) * ( WS-R / 100).
001600 DISPLAY "THE RESULT IS =" WS-I.
001610 STOP RUN.
The Jcl for the above program is
000100 //G54938A JOB ,,CLASS=A,MSGCLASS=A,MSGLEVEL=1,1),NOTIFY=&SYSUID
000200 //STEP1 EXEC PGM=ASG6C
000300 //STEPLIB DD DSN=OPERN.CICS1.LOADLIB,DISP=SHR
000400 010.00
000500 03
000600 012.00
000700 //
while trying to run the program am getting the following error
CEE3207S The system detected a data exception (System Completion Code=0C7).From compile unit ASG6C at entry point ASG6C at compile unit offset +00 address 0AD0116A.
can someone please tell me what is the error in the program. Please...
Thank you.
Muthukannan |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Muthukannan,
The definitions for the fields WS-P and WS-R are inconsistent with the data being received. You have defined the fields with an assumed decimal point and the data in SYSIN has an actual decimal point.
Step 1 ? Remove the decimal point from SYSIN. I don?t think you will get the 0C7.
Step 2 ? Modify you program to except and process input with decimal point
Step 3 ? Test with values that will activate the ?ROUNDED? feature. I don?t think the COMPUTE will give you the answer you?re looking for at that precision. |
|
Back to top |
|
|
muthukannan
New User
Joined: 03 Aug 2006 Posts: 42 Location: Chennai
|
|
|
|
Hey thanks for your reply.
With the help of you i solved the problem.
Thanks for your immediate reply...
|
|
Back to top |
|
|
shankarravi1984 Warnings : 1 New User
Joined: 15 Sep 2006 Posts: 9 Location: pune
|
|
|
|
[code]hi this is ravi
some times while calculating (( WS-P * WS-N ) * ( WS-R / 100). ) as you have mentioned in your program,you just move (ws-p*ws-n) into one constant varialbe and (ws-r/ 100) into one constant variable and multiply those two constant variables.
if this is not the problem,while dividing with zero only this 'soc7' error occurs,you please verify ur program another time |
|
Back to top |
|
|
|