HP3000-L Archives

August 2003, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Schlosser, Robert J" <[log in to unmask]>
Reply To:
Schlosser, Robert J
Date:
Mon, 4 Aug 2003 10:46:48 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
Peter

        In COBOL the condition code has to be defined in the special names paragraph
        of the configuration section. It is not a returned value of any intrinsic
        but a special set of bits set by them. 

        Example:

        ENVIRONMENT DIVISION.
        .
        .
        CONFIGURATION SECTION.
        SPECIAL-NAMES.
                CONDITION-CODE IS C-C.

        Now use C-C in the IF statement to see if it executed correctly.

        Hope this helps.

Robert Schlosser _ MPE-CSM
Ochsner Health Plan
(504) 219-8134 

-----Original Message-----
From: Peter Smithson [mailto:[log in to unmask]]
Sent: Monday, August 04, 2003 8:32 AM
To: [log in to unmask]
Subject: PRINT intrinsic condition code value


 Hi,

I'm an MPE novice. (warning!)

The HP documentation for the PRINT intrinsic is very clear, a condition
code of 2 (CCE) is for success and a simple C test program I wrote
confirms this.

Yet, I have some 'real' COBOL code that does things like this -

SPECIAL-NAMES.
    CONDITION-CODE IS C
....
CCALL INTRINSIC "PRINT" USING PTEXT PLENGTH CCODE.
IF CC NOT = 0
  DISPLAY "INTRINSIC 'PRINT' HAS FAILED

Any idea why that is? I've tried it out in COBOL with a little test
program and sure enough, PRINT is returning 0 into "CC" and it's
working.

So what's happening?  Does the COBOL interface re-define "2" to be "0" ?
What else does it do?

Thanks.

Peter
--
http://www.beluga.freeserve.co.uk

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2