by lxw039 » Tue Oct 14, 2008 7:03 pm
hi, thanks for your help, this is cobol source code as following:
IDENTIFICATION DIVISION.
*
PROGRAM-ID. CALC1000.
*
ENVIRONMENT DIVISION.
*
INPUT-OUTPUT SECTION.
*
DATA DIVISION.
*
FILE SECTION.
*
WORKING-STORAGE SECTION.
*
77 END-OF-SESSION-SWITCH PIC X VALUE "N".
77 SALES-AMOUNT PIC 9(5)V99.
77 SALES-TAX PIC Z,ZZZ.99.
*
PROCEDURE DIVISION.
*
000-CALCULATE-SALES-TAX.
*
PERFORM 100-CALCULATE-ONE-SALES-TAX
UNTIL END-OF-SESSION-SWITCH = "Y".
DISPLAY "END OF SESSION.".
STOP RUN.
*
100-CALCULATE-ONE-SALES-TAX.
*
DISPLAY "-----------------------------------------------".
DISPLAY "TO END PROGRAM, ENTER 0.".
DISPLAY "TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.".
ACCEPT SALES-AMOUNT.
IF SALES-AMOUNT = ZERO
MOVE "Y" TO END-OF-SESSION-SWITCH
ELSE
COMPUTE SALES-TAX ROUNDED =
SALES-AMOUNT * .0785
DISPLAY "SALES TAX = " SALES-TAX.
the output in pc (OS: windows xp)----everything is ok:
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
100.00
SALES TAX = 7.85
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
10.00
SALES TAX = .79
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
29.99
SALES TAX = 2.35
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
0
END OF SESSION.
the output in mainframe(OS: mvs/os/390), run under tso---what's wrong with it?:
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
100
SALES TAX = 785.00
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
10
SALES TAX = 785.00
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
29
SALES TAX = 2,276.50
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
0
SALES TAX = .00
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
-----------------------------------------------
TO END PROGRAM, ENTER 0.
TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
100.00
CEE3207S The system detected a data exception (System Completion Code=0C7).
From compile unit CALC1000 at entry point CALC1000 at compile unit off
set +000004CE at entry offset +000004CE
at address 2960A126.
Abend 0C7000 hex occurred processing command 'CALL '.
ISPD210 CMD abended - 'CALL' terminated abnormally.
***
my JCL compiler:
000001 //LXW039B JOB 31450,'BATCH COMPILE',MSGLEVEL=(1,1),
000002 // REGION=4M,CLASS=A,MSGCLASS=X,USER=LXW039,
000003 // PASSWORD=
000004 //*
000005 //COMPILE EXEC PROC=IGYWCL,PARM.COBOL='XREF,FLAG(I,E)'
000006 //COBOL.SYSIN DD DSN=MP.LXW039.SOURCE(CALC1000),DISP=SHR
000007 //*
000008 //LKED.SYSLMOD DD DSN=MP.CTEST08.LOAD(CALC1000),DISP=SHR
000009 //*
000010 /*
****** **************************** Bottom of Data ******************
my run command:
tso allocate ddname(sysin) dsname(*)
tso allocate ddname(sysout) dsname(*)
call 'mp.ctest08.load(calc1000)'
could you help me find the cause of this problem run in pc and mainframe, thanks.