HP3000-L Archives

May 2005, 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:
Tony Summers <[log in to unmask]>
Reply To:
Tony Summers <[log in to unmask]>
Date:
Mon, 2 May 2005 10:51:52 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (111 lines)
Info len is both an input and output parameter to the intrinsic call -
so you have to tell it the maximum length of the string you're
expecting.  

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Ken Hirsch
Sent: 01 May 2005 23:00
To: [log in to unmask]
Subject: Re: [HP3000-L] Cobol and the GETINFO Intrinsics

Olav Kappert wrote:

> Hi again:
>
> Question.
>
> I friend called me yesterday, asking me if I knew how to use the 
> intrinsic "GETINFO".
>
> His wroking storage reads:
> 01  GETINFO-INTRINSIC.
>     02  INFO-STR PIC X(26) VALUE SPACES.
>     02  INFO-LEN PIC S9(04) COMP VALUE 26.
>     02  INFO-PARM PIC S9(09) COMP VALUE ZERO.
>     02  INFO-STATUS PIC S9(09) COMP VALUE ZERO.
>
> The call reads:
>    CALL INTRINSIC "GETINFO" USING INFO-STR, INFO-LEN, INFO-PARM
>               GIVING INFO-STATUS.
>

The INFO-PARM needs to be PIC S9(04) COMP.  Then it works fine for me.
      $CONTROL POST85
       IDENTIFICATION DIVISION.
       PROGRAM-ID. FOO.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
        01  GETINFO-INTRINSIC.
          02  INFO-STR PIC X(26) VALUE SPACES.
          02  INFO-LEN PIC S9(04) COMP VALUE 26.
          02  INFO-PARM PIC S9(04) COMP VALUE ZERO.
          02  INFO-STATUS PIC S9(09) COMP VALUE ZERO.

       PROCEDURE DIVISION.
       MAIN-SEC SECTION.
       MAIN-PARA.

          DISPLAY "START"
             CALL INTRINSIC "GETINFO" USING INFO-STR, INFO-LEN,
                            INFO-PARM
                        GIVING INFO-STATUS.
          DISPLAY "AFTER: INFO-LEN  =  ", INFO-LEN
          DISPLAY "       INFO-STR  = '", INFO-STR "'"
          DISPLAY "       INFO-PARM =  ", INFO-PARM
          DISPLAY "       INFO-STAT =  ", INFO-STATUS
          STOP RUN.

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

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




The contents of this email are confidential to the intended recipient
and may not be disclosed. Although it is believed that this email and
any attachments are virus free, it is the responsibility of the recipient to confirm this.

Smith & Williamson Corporate Finance Limited - A member of M&A
International Inc. http://www.mergers.net Registered in England No.
4533970. Authorised and regulated by the Financial Services Authority 
Smith & Williamson Investment Management Limited, Registered No. 976145. Authorised and regulated by the Financial Services Authority.
Smith & Williamson Pension Consultancy Limited - Independent
Intermediary. Registered No. 3133226. Authorised and regulated by the
Financial Services Authority.
Smith & Williamson Fund Administration Limited, Registered No. 1934644. Authorised and regulated by the Financial Services Authority.
Smith & Williamson Limited - A member of Nexia International.
Registered in England No. 4534022. Regulated by the Institute of
Chartered Accountants in England & Wales for a range of investment
business activities.

Registered Office: No 1 Riding House Street, London W1A 3AS
Telephone: 020 7637 5377 http://www.smith.williamson.co.uk

Nexia Audit Limited - A member of Nexia International. Registered in
England No. 4469576. Registered to carry on audit work and regulated by the Institute of Chartered Accountants in England & Wales for a range of investment business activities.

Registered Office: No 1 Riding House Street, London W1A 3AS
Telephone: 020 7637 5377 http://www.nexiaaudit.co.uk

NCL Investments Limited, Registered No. 1913794.
Member of the London Stock Exchange authorised and regulated by the Financial Services Authority.

Registered Office: Bartlett House, 9-12 Basinghall Street, London  EC2V 5NS
Telephone: 020 7600 2801 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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

ATOM RSS1 RSS2