|
>> why is this so hard? Perhaps because you are wrong? There is a little thing called ANSI that defines this behavior. I don't know if you actually ran your code or just assumed it would do what you thought but ..... Forget the parms etc. that implies there is another program in the picture and if it is COBOL it has an impact. Call the version below twice from the command line and you will see: Count is: 0001 Exit program ignored Count is: 0001 Exit program ignored I have compiled and run this in OPM and ILE versions and behavior is as I predicted and as ANSI specifies. DATA DIVISION. WORKING-STORAGE SECTION. 01 MY-COUNT PIC 9999. PROCEDURE DIVISION. BEGIN-ME. ADD 1 TO MY-COUNT DISPLAY 'Count is: ' MY-COUNT. END-ME. EXIT PROGRAM. DISPLAY 'Exit program ignored'. Jon Paris Partner400
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.