s0c7 error

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
sandra-gerber
Member
Posts: 1
Joined: Sat Feb 05, 2011 6:59 am
Location: florida

s0c7 error

Post by sandra-gerber » Sat Feb 05, 2011 7:30 am

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
Sandra Watkins

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Feb 07, 2011 3:46 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.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

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



Other References
Mainframe Tools and others