Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Anything cut to length will be too short.


computers / comp.os.vms / Error Handling - Fortran

SubjectAuthor
* Error Handling - FortranHCorte
`* Re: Error Handling - FortranSteven Schweda
 +- Re: Error Handling - FortranHCorte
 `* Re: Error Handling - FortranVAXman-
  `* Re: Error Handling - FortranArne Vajhøj
   `* Re: Error Handling - FortranVAXman-
    `* Re: Error Handling - FortranVAXman-
     `- Re: Error Handling - FortranHCorte

1
Error Handling - Fortran

<6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22438&group=comp.os.vms#22438

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:5b50:0:b0:2f3:ae99:8e0 with SMTP id n16-20020ac85b50000000b002f3ae9908e0mr3011916qtw.669.1651849094215;
Fri, 06 May 2022 07:58:14 -0700 (PDT)
X-Received: by 2002:a05:620a:2888:b0:699:bb36:40b2 with SMTP id
j8-20020a05620a288800b00699bb3640b2mr2598147qkp.135.1651849094016; Fri, 06
May 2022 07:58:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 6 May 2022 07:58:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=81.193.21.144; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 81.193.21.144
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>
Subject: Error Handling - Fortran
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Fri, 06 May 2022 14:58:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: HCorte - Fri, 6 May 2022 14:58 UTC

Created function handler for errors to prevent from the image/process closing when a severe error occurs something alog the lines:

INTEGER*4 FUNCTION HANDLER(SIGARGS, MECHARGS)
IMPLICIT NONE
C INCLUDE '($LIBDEF)'
INCLUDE '($STSDEF)'
INCLUDE '($SSDEF)'
C INTEGER*4 SIGARGS(*)
INTEGER*4 MECHARGS(*)
C INTEGER*4 ERRORCODE

ERRORCODE = 0
CALL MVBITS( SIGARGS(2), 0, 3, ERRORCODE, 0)

IF( ERRORCODE.EQ.STS$K_SEVERE ) THEN
CALL MVBITS( STS$K_ERROR, 0, 3, SIGARGS(2), 0)
ENDIF

HANDLER = SS$_RESIGNAL

RETURN
END

tested with a CALL LIB$SIGNAL(%VAL(4)) to force a severe error and the handler worked well that keeped the process/image running by reducing the severity of the error in case its severe.

1. Now want to log the error message to a file, so how to obtain the error message is it possible to pass SIGARGS(2) to a RTL function or other System function that returns me the message as per example the lexical function f$message(1409041) or should read the bit's of MSG_NO/Message number (3 to 15) that is refered in the "9.5 Condition Values" of "VSI_PROGRAM_CONCEPTS_VOL_I".

so basicaly from the error code get the error message text as the ones printed to console.

2. How to distinguish the error is originated from CALL LIB$SIGNAL(%VAL(4)) or CALL LIB$STOP(%VAL(0)).
Since if its LIB$STOP have to deal with the error using "Unwinding the Call Stack"
CALL SYS$UNWIND (MECHARGS(3),)
or
CALL SYS$UNWIND (,)
as refered in "9.12.4.5. Returning Control to the Program" of "VSI_PROGRAM_CONCEPTS_VOL_I"

3. last but not least when in a program occurs a error that is not handled and its fatal/severe is it treated by the system as a LIB$STOP or a LIB$SIGNAL(%VAL(4))?

note: LIB$SIGNAL(%VAL(4)) alls passing 4 to indicate that the severity of error is sever as stated in "table 9.7 Severity of Error Conditions", while LIB$STOP defaults to sever only passing 0 because yes no reason in specific....

Re: Error Handling - Fortran

<7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22441&group=comp.os.vms#22441

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:6206:b0:2f1:d7bc:7522 with SMTP id hj6-20020a05622a620600b002f1d7bc7522mr3282839qtb.556.1651850340616;
Fri, 06 May 2022 08:19:00 -0700 (PDT)
X-Received: by 2002:ac8:5f0c:0:b0:2f3:cbad:5024 with SMTP id
x12-20020ac85f0c000000b002f3cbad5024mr1122074qta.578.1651850340391; Fri, 06
May 2022 08:19:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 6 May 2022 08:19:00 -0700 (PDT)
In-Reply-To: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=76.76.60.100; posting-account=OjKUgAkAAAAXAqdVEKd-Gc8RltEUx3Xq
NNTP-Posting-Host: 76.76.60.100
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>
Subject: Re: Error Handling - Fortran
From: sms.anti...@gmail.com (Steven Schweda)
Injection-Date: Fri, 06 May 2022 15:19:00 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Steven Schweda - Fri, 6 May 2022 15:19 UTC

> [...] how to obtain the error message [...]

HELP SYSTEM_SERVICES $GETMSG

HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG

Re: Error Handling - Fortran

<ec5da4ad-7d0d-41af-b352-382da98786e0n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22443&group=comp.os.vms#22443

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7d4d:0:b0:2f1:fcbc:b8a1 with SMTP id h13-20020ac87d4d000000b002f1fcbcb8a1mr3257986qtb.567.1651851179279;
Fri, 06 May 2022 08:32:59 -0700 (PDT)
X-Received: by 2002:a05:6214:1bce:b0:45a:f17a:2a40 with SMTP id
m14-20020a0562141bce00b0045af17a2a40mr1104866qvc.124.1651851179133; Fri, 06
May 2022 08:32:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 6 May 2022 08:32:58 -0700 (PDT)
In-Reply-To: <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=81.193.21.144; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 81.193.21.144
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com> <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ec5da4ad-7d0d-41af-b352-382da98786e0n@googlegroups.com>
Subject: Re: Error Handling - Fortran
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Fri, 06 May 2022 15:32:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1554
 by: HCorte - Fri, 6 May 2022 15:32 UTC

A sexta-feira, 6 de maio de 2022 à(s) 16:19:02 UTC+1, Steven Schweda escreveu:
> > [...] how to obtain the error message [...]
>
> HELP SYSTEM_SERVICES $GETMSG
>
> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG

Thanks @Steven Schweda

Re: Error Handling - Fortran

<00B744CD.C38F7AF4@SendSpamHere.ORG>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22447&group=comp.os.vms#22447

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!pr9o9uw/KLhPSFYv2ok3sg.user.46.165.242.75.POSTED!not-for-mail
From: VAXm...@SendSpamHere.ORG
Newsgroups: comp.os.vms
Subject: Re: Error Handling - Fortran
Date: Fri, 06 May 2022 16:32:07 GMT
Organization: c.2022 Brian Schenkenberger. Prior employers of copyright holder and their agents must first obtain written permission to copy this posting.
Message-ID: <00B744CD.C38F7AF4@SendSpamHere.ORG>
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com> <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>
Reply-To: VAXman- @SendSpamHere.ORG
Injection-Info: gioia.aioe.org; logging-data="60706"; posting-host="pr9o9uw/KLhPSFYv2ok3sg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: VAXm...@SendSpamHere.ORG - Fri, 6 May 2022 16:32 UTC

In article <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>, Steven Schweda <sms.antinode@gmail.com> writes:
>> [...] how to obtain the error message [...]
>
> HELP SYSTEM_SERVICES $GETMSG
>
> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG

PROGRAM GETMSG_DYNSTR
IMPLICIT NONE

INCLUDE '($DSCDEF)'
INCLUDE '($SSDEF)'
INCLUDE '(LIB$ROUTINES)'
INCLUDE '(STR$ROUTINES)'

INTEGER*4 STATUS

RECORD /DSCDEF1/ DYNSTR

DYNSTR.DSC$W_MAXSTRLEN = 0
DYNSTR.DSC$B_DTYPE = DSC$K_DTYPE_T
DYNSTR.DSC$B_CLASS = DSC$K_CLASS_D
DYNSTR.DSC$A_POINTER = 0

STATUS = 2928

STATUS = LIB$SYS_GETMSG(STATUS,,DYNSTR)

STATUS = LIB$PUT_OUTPUT(DYNSTR)

STATUS = LIB$PUT_OUTPUT(DYNSTR)
STATUS = STR$FREE1_DX(DYNSTR)

END

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.

Re: Error Handling - Fortran

<6275ba1c$0$696$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22456&group=comp.os.vms#22456

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Fri, 6 May 2022 20:15:17 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.0
Subject: Re: Error Handling - Fortran
Content-Language: en-US
Newsgroups: comp.os.vms
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>
<7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>
<00B744CD.C38F7AF4@SendSpamHere.ORG>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <00B744CD.C38F7AF4@SendSpamHere.ORG>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 51
Message-ID: <6275ba1c$0$696$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: dcafedea.news.sunsite.dk
X-Trace: 1651882524 news.sunsite.dk 696 arne@vajhoej.dk/68.9.63.232:64635
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Sat, 7 May 2022 00:15 UTC

On 5/6/2022 12:32 PM, VAXman-@SendSpamHere.ORG wrote:
> In article <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>, Steven Schweda <sms.antinode@gmail.com> writes:
>>> [...] how to obtain the error message [...]
>>
>> HELP SYSTEM_SERVICES $GETMSG
>>
>> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG
>
> PROGRAM GETMSG_DYNSTR
> IMPLICIT NONE
>
> INCLUDE '($DSCDEF)'
> INCLUDE '($SSDEF)'
> INCLUDE '(LIB$ROUTINES)'
> INCLUDE '(STR$ROUTINES)'
>
> INTEGER*4 STATUS
>
> RECORD /DSCDEF1/ DYNSTR
>
> DYNSTR.DSC$W_MAXSTRLEN = 0
> DYNSTR.DSC$B_DTYPE = DSC$K_DTYPE_T
> DYNSTR.DSC$B_CLASS = DSC$K_CLASS_D
> DYNSTR.DSC$A_POINTER = 0
>
> STATUS = 2928
>
> STATUS = LIB$SYS_GETMSG(STATUS,,DYNSTR)
>
> STATUS = LIB$PUT_OUTPUT(DYNSTR)
>
> STATUS = LIB$PUT_OUTPUT(DYNSTR)
> STATUS = STR$FREE1_DX(DYNSTR)
>
> END

Cute with dynamic in Fortran.

But more oldfashioned:

PROGRAM GETMSG_FIXSTR
INCLUDE '(LIB$ROUTINES)'
INTEGER*4 STATUS,MSGLEN
CHARACTER*256 MSG
STATUS = 2928
CALL LIB$SYS_GETMSG(STATUS,MSGLEN,MSG)
CALL LIB$PUT_OUTPUT(MSG(1:MSGLEN))
END

Arne

Re: Error Handling - Fortran

<00B74568.BC1F735F@SendSpamHere.ORG>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22461&group=comp.os.vms#22461

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!pr9o9uw/KLhPSFYv2ok3sg.user.46.165.242.75.POSTED!not-for-mail
From: VAXm...@SendSpamHere.ORG
Newsgroups: comp.os.vms
Subject: Re: Error Handling - Fortran
Date: Sat, 07 May 2022 11:01:27 GMT
Organization: c.2022 Brian Schenkenberger. Prior employers of copyright holder and their agents must first obtain written permission to copy this posting.
Message-ID: <00B74568.BC1F735F@SendSpamHere.ORG>
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com> <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com> <00B744CD.C38F7AF4@SendSpamHere.ORG> <6275ba1c$0$696$14726298@news.sunsite.dk>
Reply-To: VAXman- @SendSpamHere.ORG
Injection-Info: gioia.aioe.org; logging-data="23277"; posting-host="pr9o9uw/KLhPSFYv2ok3sg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: VAXm...@SendSpamHere.ORG - Sat, 7 May 2022 11:01 UTC

In article <6275ba1c$0$696$14726298@news.sunsite.dk>, =?UTF-8?Q?Arne_Vajh=c3=b8j?= <arne@vajhoej.dk> writes:
>On 5/6/2022 12:32 PM, VAXman-@SendSpamHere.ORG wrote:
>> In article <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>, Steven Schweda <sms.antinode@gmail.com> writes:
>>>> [...] how to obtain the error message [...]
>>>
>>> HELP SYSTEM_SERVICES $GETMSG
>>>
>>> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG
>>
>> PROGRAM GETMSG_DYNSTR
>> IMPLICIT NONE
>>
>> INCLUDE '($DSCDEF)'
>> INCLUDE '($SSDEF)'
>> INCLUDE '(LIB$ROUTINES)'
>> INCLUDE '(STR$ROUTINES)'
>>
>> INTEGER*4 STATUS
>>
>> RECORD /DSCDEF1/ DYNSTR
>>
>> DYNSTR.DSC$W_MAXSTRLEN = 0
>> DYNSTR.DSC$B_DTYPE = DSC$K_DTYPE_T
>> DYNSTR.DSC$B_CLASS = DSC$K_CLASS_D
>> DYNSTR.DSC$A_POINTER = 0
>>
>> STATUS = 2928
>>
>> STATUS = LIB$SYS_GETMSG(STATUS,,DYNSTR)
>>
>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
>>
>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
>> STATUS = STR$FREE1_DX(DYNSTR)
>>
>> END
>
>Cute with dynamic in Fortran.

Moreso than cute, it was disturbingly eye-opening! There is no SS$_FISH in the
$SSDEF module in FORSYSDEF.TLB.

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.

Re: Error Handling - Fortran

<00B74569.9F63EF01@SendSpamHere.ORG>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22462&group=comp.os.vms#22462

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!pr9o9uw/KLhPSFYv2ok3sg.user.46.165.242.75.POSTED!not-for-mail
From: VAXm...@SendSpamHere.ORG
Newsgroups: comp.os.vms
Subject: Re: Error Handling - Fortran
Date: Sat, 07 May 2022 11:07:48 GMT
Organization: c.2022 Brian Schenkenberger. Prior employers of copyright holder and their agents must first obtain written permission to copy this posting.
Message-ID: <00B74569.9F63EF01@SendSpamHere.ORG>
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com> <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com> <00B744CD.C38F7AF4@SendSpamHere.ORG> <6275ba1c$0$696$14726298@news.sunsite.dk> <00B74568.BC1F735F@SendSpamHere.ORG>
Reply-To: VAXman- @SendSpamHere.ORG
Injection-Info: gioia.aioe.org; logging-data="30555"; posting-host="pr9o9uw/KLhPSFYv2ok3sg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: VAXm...@SendSpamHere.ORG - Sat, 7 May 2022 11:07 UTC

In article <00B74568.BC1F735F@SendSpamHere.ORG>, VAXman- @SendSpamHere.ORG writes:
>In article <6275ba1c$0$696$14726298@news.sunsite.dk>, =?UTF-8?Q?Arne_Vajh=c3=b8j?= <arne@vajhoej.dk> writes:
>>On 5/6/2022 12:32 PM, VAXman-@SendSpamHere.ORG wrote:
>>> In article <7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com>, Steven Schweda <sms.antinode@gmail.com> writes:
>>>>> [...] how to obtain the error message [...]
>>>>
>>>> HELP SYSTEM_SERVICES $GETMSG
>>>>
>>>> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG
>>>
>>> PROGRAM GETMSG_DYNSTR
>>> IMPLICIT NONE
>>>
>>> INCLUDE '($DSCDEF)'
>>> INCLUDE '($SSDEF)'
>>> INCLUDE '(LIB$ROUTINES)'
>>> INCLUDE '(STR$ROUTINES)'
>>>
>>> INTEGER*4 STATUS
>>>
>>> RECORD /DSCDEF1/ DYNSTR
>>>
>>> DYNSTR.DSC$W_MAXSTRLEN = 0
>>> DYNSTR.DSC$B_DTYPE = DSC$K_DTYPE_T
>>> DYNSTR.DSC$B_CLASS = DSC$K_CLASS_D
>>> DYNSTR.DSC$A_POINTER = 0
>>>
>>> STATUS = 2928
>>>
>>> STATUS = LIB$SYS_GETMSG(STATUS,,DYNSTR)
>>>
>>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
>>>
>>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
>>> STATUS = STR$FREE1_DX(DYNSTR)
>>>
>>> END
>>
>>Cute with dynamic in Fortran.
>
>Moreso than cute, it was disturbingly eye-opening! There is no SS$_FISH in the
>$SSDEF module in FORSYSDEF.TLB.

Nevermind. I checked on EISNER (a newer FORTRAN) and SS$_FISH is there.

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.

Re: Error Handling - Fortran

<ce54dede-f918-4077-8fa3-9f2911dcefd4n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22522&group=comp.os.vms#22522

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:2886:b0:699:bab7:ae78 with SMTP id j6-20020a05620a288600b00699bab7ae78mr19040744qkp.618.1652282358513;
Wed, 11 May 2022 08:19:18 -0700 (PDT)
X-Received: by 2002:a05:622a:448:b0:2f3:d76d:7b98 with SMTP id
o8-20020a05622a044800b002f3d76d7b98mr15284400qtx.679.1652282358309; Wed, 11
May 2022 08:19:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 11 May 2022 08:19:18 -0700 (PDT)
In-Reply-To: <00B74569.9F63EF01@SendSpamHere.ORG>
Injection-Info: google-groups.googlegroups.com; posting-host=193.126.119.59; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 193.126.119.59
References: <6c1af05f-094a-46af-a6f9-b04717e38222n@googlegroups.com>
<7fbd1db1-3e38-433c-8749-df011e4e7884n@googlegroups.com> <00B744CD.C38F7AF4@SendSpamHere.ORG>
<6275ba1c$0$696$14726298@news.sunsite.dk> <00B74568.BC1F735F@SendSpamHere.ORG>
<00B74569.9F63EF01@SendSpamHere.ORG>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ce54dede-f918-4077-8fa3-9f2911dcefd4n@googlegroups.com>
Subject: Re: Error Handling - Fortran
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Wed, 11 May 2022 15:19:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3887
 by: HCorte - Wed, 11 May 2022 15:19 UTC

A sábado, 7 de maio de 2022 à(s) 13:09:12 UTC+1, VAXman- escreveu:
> In article <00B74568...@SendSpamHere.ORG>, VAXman- @SendSpamHere.ORG writes:
> >In article <6275ba1c$0$696$1472...@news.sunsite.dk>, =?UTF-8?Q?Arne_Vajh=c3=b8j?= <ar...@vajhoej.dk> writes:
> >>On 5/6/2022 12:32 PM, VAX...@SendSpamHere.ORG wrote:
> >>> In article <7fbd1db1-3e38-433c...@googlegroups.com>, Steven Schweda <sms.an...@gmail.com> writes:
> >>>>> [...] how to obtain the error message [...]
> >>>>
> >>>> HELP SYSTEM_SERVICES $GETMSG
> >>>>
> >>>> HELP RTL_ROUTINES LIB$ LIB$SYS_GETMSG
> >>>
> >>> PROGRAM GETMSG_DYNSTR
> >>> IMPLICIT NONE
> >>>
> >>> INCLUDE '($DSCDEF)'
> >>> INCLUDE '($SSDEF)'
> >>> INCLUDE '(LIB$ROUTINES)'
> >>> INCLUDE '(STR$ROUTINES)'
> >>>
> >>> INTEGER*4 STATUS
> >>>
> >>> RECORD /DSCDEF1/ DYNSTR
> >>>
> >>> DYNSTR.DSC$W_MAXSTRLEN = 0
> >>> DYNSTR.DSC$B_DTYPE = DSC$K_DTYPE_T
> >>> DYNSTR.DSC$B_CLASS = DSC$K_CLASS_D
> >>> DYNSTR.DSC$A_POINTER = 0
> >>>
> >>> STATUS = 2928
> >>>
> >>> STATUS = LIB$SYS_GETMSG(STATUS,,DYNSTR)
> >>>
> >>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
> >>>
> >>> STATUS = LIB$PUT_OUTPUT(DYNSTR)
> >>> STATUS = STR$FREE1_DX(DYNSTR)
> >>>
> >>> END
> >>
> >>Cute with dynamic in Fortran.
> >
> >Moreso than cute, it was disturbingly eye-opening! There is no SS$_FISH in the
> >$SSDEF module in FORSYSDEF.TLB.
> Nevermind. I checked on EISNER (a newer FORTRAN) and SS$_FISH is there.
> --
> VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
>
> I speak to machines with the voice of humanity.

Thanks @VaxMan and @Arne for the examples,

CHARACTER*256 MSG
INTEGER*4 ERR_NUM
INTEGER*4 LIB$SYS_GETMSG

CALL MVBITS( SIGARGS(2), 0, 32, ERR_NUM, 0)
CALL LIB$SYS_GETMSG(ERR_NUM,MSGLEN,MSG)

tried reading only bit 3 to 15 of SIGARGS(2) but concluded that needed to read the full 4 bytes since
$ write sys$output "FOR$_FILNOTFOU(1605868):",f$message(1605868)
$ write sys$output "FOR$_NO_SUCDEV(1605972):",f$message(1605972)
$ write sys$output "FOR$_FILNAMSPE(1605980):",f$message(1605980)
$ write sys$output "FOR$_OPEFAI(1605876):",f$message(1605876)
$ write sys$output "FOR$_NOTFORSPE(1605644):",f$message(1605644)

the examples that used are all 3 bytes at least (a litle bit less but who cares...)

and its working well.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor