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:
Mark Undrill <[log in to unmask]>
Reply To:
Mark Undrill <[log in to unmask]>
Date:
Mon, 4 Aug 2003 08:47:14 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
"Peter Smithson" <[log in to unmask]> wrote in message
news:MPG.19986d14d7e54b35989778@news.cis.dfn.de...
> 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
> ....
> CALL 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

Hi Peter,

Condition codes return 3 possible values

    CCL    Less that zero
    CCE    Equal to zero
    CCG    Greater than zero

I don't know what the (2), (0), (1) are meant to denote. Perhaps someone
more knowledgeable than me will be able to enlighten us.

Regards

--
Mark Undrill
Affirm Limited

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

ATOM RSS1 RSS2