ONSIZE 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
reddynlr
Member
Posts: 4
Joined: Mon Feb 22, 2016 1:33 pm

ONSIZE ERROR

Post by reddynlr » Mon Feb 22, 2016 1:51 pm

01 WS-A PIC 9(2)V9(2) VALUE 55.35.
01 WS-B PIC 9(2)V9(3) VLAUE 32.754.
PROCEDURE DIVISION.
ADD WS-B TO WS-A ONSIZE ERROR DISPLAY "ERROR".
DISPLAY WS-A.
DISPLAY WS-B.

PLZ HELP ME THE RESULT?

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Feb 22, 2016 3:30 pm

WS-B will be unchanged. WS-A will be 88.10. If the total which would otherwise be in WS-A was greater than 99.99, then the ON SIZE ERROR would be actioned.

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