I am receiving a s0c7 error when trying to calc the following fields and I need to know how to resolve this issue.
If PRD-DED-AMT of ZMAD2999 + PRD-DED-AMT2 of ZMAD2999 <= WS- DED-TOT(SUB2)
CONTINUE
ELSE
MOVE ERROR-1 TO REJ-CD
END-IF
THIS FIELD IS DEFINED AS PRD-DED-AMT PIC S9(16) V99 cOMP-3
PRD-DED-AMT2 PIC S9(16) V99 cOMP-3
ON THE DATABASE AND WS-DED-TOT(SUB2) PIC 9(05) V99
Thanks
s0c7 error
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 1
- Joined: Sat Feb 05, 2011 6:59 am
- Location: florida
s0c7 error
Sandra Watkins
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
a s0c7 simply means you have non-numerics (alpha) in one of your numeric fields.
i would also check the integrity of SUB2, it may not contain the occurance value that you expect. SUB2 could have alpha.
since ws-det-tot is in a COBOL internal table, I would change the pic clause to comp-3, since the other fields involved are comp-3.
and sub2 should be a comp field.
either run thru xpeditor/intertest/what ever debug tool your shop has,
or
display all three fields before the IF statment.
and
you are not calculating fields, you are resolving an IF statement.
i would also check the integrity of SUB2, it may not contain the occurance value that you expect. SUB2 could have alpha.
since ws-det-tot is in a COBOL internal table, I would change the pic clause to comp-3, since the other fields involved are comp-3.
and sub2 should be a comp field.
either run thru xpeditor/intertest/what ever debug tool your shop has,
or
display all three fields before the IF statment.
and
you are not calculating fields, you are resolving an IF statement.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page