Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Don't panic.


computers / comp.os.vms / Re: Command Procedure pass value to program READ

SubjectAuthor
* Command Procedure pass value to program READHCorte
+* Re: Command Procedure pass value to program READArne Vajhøj
|`* Re: Command Procedure pass value to program READHCorte
| `* Re: Command Procedure pass value to program READHein RMS van den Heuvel
|  `* Re: Command Procedure pass value to program READHCorte
|   +* Re: Command Procedure pass value to program READabrsvc
|   |`* Re: Command Procedure pass value to program READHCorte
|   | +* Re: Command Procedure pass value to program READHCorte
|   | |`* Re: Command Procedure pass value to program READHCorte
|   | | `- Re: Command Procedure pass value to program READVolker Halle
|   | +- Re: Command Procedure pass value to program READStephen Hoffman
|   | `* Re: Command Procedure pass value to program READArne Vajhøj
|   |  `* Re: Command Procedure pass value to program READHCorte
|   |   +* Re: Command Procedure pass value to program READArne Vajhøj
|   |   |`* Re: Command Procedure pass value to program READHCorte
|   |   | `- Re: Command Procedure pass value to program READArne Vajhøj
|   |   `* Re: Command Procedure pass value to program READArne Vajhøj
|   |    `- Re: Command Procedure pass value to program READHCorte
|   `* Re: Command Procedure pass value to program READDennis Boone
|    `* Re: Command Procedure pass value to program READHCorte
|     `* Re: Command Procedure pass value to program READabrsvc
|      `- Re: Command Procedure pass value to program READHCorte
`- Re: Command Procedure pass value to program READHein RMS van den Heuvel

1
Command Procedure pass value to program READ

<905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ad4:596b:: with SMTP id eq11mr226593qvb.70.1644249094651;
Mon, 07 Feb 2022 07:51:34 -0800 (PST)
X-Received: by 2002:a05:620a:228a:: with SMTP id o10mr224137qkh.503.1644249094362;
Mon, 07 Feb 2022 07:51:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 7 Feb 2022 07:51:34 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
Subject: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Mon, 07 Feb 2022 15:51:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 20
 by: HCorte - Mon, 7 Feb 2022 15:51 UTC

Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN.
This way avoiding the user to manualy insert in the terminal a filename for example or someother parameter.

script.com
$!example
$! DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
$RUN PROGRAM_EXAMPLE
---inject the input value to the READ FILENAME---

program_example.for
IMPLICIT NONE
CHARACTER*60 FILENAME
.....

WRITE(*,*) 'ENTER FILE NAME:'
READ(*,*) FILENAME
C write(*,*) 'File Name is: ',FILENAME
.....

Re: Command Procedure pass value to program READ

<62014428$0$703$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Mon, 7 Feb 2022 11:09:12 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: Command Procedure pass value to program READ
Content-Language: en-US
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 33
Message-ID: <62014428$0$703$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 9195141d.news.sunsite.dk
X-Trace: 1644250152 news.sunsite.dk 703 arne@vajhoej.dk/68.9.63.232:61166
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 7 Feb 2022 16:09 UTC

On 2/7/2022 10:51 AM, HCorte wrote:
> Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN.
> This way avoiding the user to manualy insert in the terminal a filename for example or someother parameter.
>
> script.com
> $!example
> $! DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
> $RUN PROGRAM_EXAMPLE
> ---inject the input value to the READ FILENAME---
>
>
>
> program_example.for
> IMPLICIT NONE
> CHARACTER*60 FILENAME
> ....
>
>
> WRITE(*,*) 'ENTER FILE NAME:'
> READ(*,*) FILENAME
> C write(*,*) 'File Name is: ',FILENAME
> ....

$!** keep this outcommented ** DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
$ RUN PROGRAM_EXAMPLE
foobar.dat
$ $! continue with whatever

should work.

Arne

Re: Command Procedure pass value to program READ

<f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:a47:: with SMTP id j7mr331258qka.146.1644250437724;
Mon, 07 Feb 2022 08:13:57 -0800 (PST)
X-Received: by 2002:a37:e30a:: with SMTP id y10mr332533qki.54.1644250437515;
Mon, 07 Feb 2022 08:13:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 7 Feb 2022 08:13:57 -0800 (PST)
In-Reply-To: <62014428$0$703$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com> <62014428$0$703$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Mon, 07 Feb 2022 16:13:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 38
 by: HCorte - Mon, 7 Feb 2022 16:13 UTC

A segunda-feira, 7 de fevereiro de 2022 à(s) 16:09:15 UTC, Arne Vajhøj escreveu:
> On 2/7/2022 10:51 AM, HCorte wrote:
> > Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN.
> > This way avoiding the user to manualy insert in the terminal a filename for example or someother parameter.
> >
> > script.com
> > $!example
> > $! DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
> > $RUN PROGRAM_EXAMPLE
> > ---inject the input value to the READ FILENAME---
> >
> >
> >
> > program_example.for
> > IMPLICIT NONE
> > CHARACTER*60 FILENAME
> > ....
> >
> >
> > WRITE(*,*) 'ENTER FILE NAME:'
> > READ(*,*) FILENAME
> > C write(*,*) 'File Name is: ',FILENAME
> > ....
> $!** keep this outcommented ** DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
> $ RUN PROGRAM_EXAMPLE
> foobar.dat
> $
> $! continue with whatever
>
> should work.
>
> Arne

Thanks @Arne thats it, also so in https://community.hpe.com/t5/Operating-System-OpenVMS/VMS-How-to-pass-parameters-to-to-an-executable-through-DCL/td-p/5129590#.YgFD9OrP2Uk.

Re: Command Procedure pass value to program READ

<4aa7d1b3-fe78-45eb-9594-e9bc5a2f17dcn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:665:: with SMTP id a5mr318970qkh.500.1644250525768;
Mon, 07 Feb 2022 08:15:25 -0800 (PST)
X-Received: by 2002:a05:6214:1025:: with SMTP id k5mr165219qvr.61.1644250525510;
Mon, 07 Feb 2022 08:15:25 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 7 Feb 2022 08:15:25 -0800 (PST)
In-Reply-To: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.147.72.155; posting-account=U1iMPAoAAAC9r8wm0KaW63EcF8sfjFeH
NNTP-Posting-Host: 24.147.72.155
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4aa7d1b3-fe78-45eb-9594-e9bc5a2f17dcn@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: heinvand...@gmail.com (Hein RMS van den Heuvel)
Injection-Date: Mon, 07 Feb 2022 16:15:25 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 19
 by: Hein RMS van den Heu - Mon, 7 Feb 2022 16:15 UTC

On Monday, February 7, 2022 at 10:51:35 AM UTC-5, HCorte wrote:
> Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN.
> This way avoiding the user to manualy insert in the terminal a filename for example or someother parameter.

Symbol substitution doe NOT work for dataline, so that's a non-starter.
Specifically for filenames, logical names will work in the program, so the script could define a logical name value before the run, then provide the logical name as input.

PIPE should work.

The classical OpenVMS workaround is to generate a self deleting helper command line with the DEFIN/USER sys$input sys$command; the run; and the datalines all prepared.

Can you change the program at all?

If so you can see is a logical name or symbol is defined with the required answer and only prompt when not provided already.

Or for simple input I like to just use something line: ISTAT = LIB$GET_FOREIGN (FILE_NAME, 'File name: ')

Good luck,
Hein

Re: Command Procedure pass value to program READ

<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:44f:: with SMTP id o15mr181776qtx.556.1644250817807;
Mon, 07 Feb 2022 08:20:17 -0800 (PST)
X-Received: by 2002:ad4:5949:: with SMTP id eo9mr189943qvb.95.1644250817571;
Mon, 07 Feb 2022 08:20:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 7 Feb 2022 08:20:17 -0800 (PST)
In-Reply-To: <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.147.72.155; posting-account=U1iMPAoAAAC9r8wm0KaW63EcF8sfjFeH
NNTP-Posting-Host: 24.147.72.155
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: heinvand...@gmail.com (Hein RMS van den Heuvel)
Injection-Date: Mon, 07 Feb 2022 16:20:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 24
 by: Hein RMS van den Heu - Mon, 7 Feb 2022 16:20 UTC

On Monday, February 7, 2022 at 11:13:59 AM UTC-5, HCorte wrote:
> A segunda-feira, 7 de fevereiro de 2022 à(s) 16:09:15 UTC, Arne Vajhøj escreveu:
> > On 2/7/2022 10:51 AM, HCorte wrote:
> > > Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN.

> > $ RUN PROGRAM_EXAMPLE
> > foobar.dat
> > $
> > $! continue with whatever

> Thanks @Arne thats it,

Ah cool. I was overthinking it.
You just needed the simple static case where you can indeed just provide the parameter. DCL 101 :-).
I thought you tried to figure out the more tricky dynamic case where a fixed script tries to provide variable data.

Glad you hear your problem is solved.
Cheers,
Hein.

Re: Command Procedure pass value to program READ

<92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:1348:: with SMTP id w8mr3433280qtk.216.1644333415803;
Tue, 08 Feb 2022 07:16:55 -0800 (PST)
X-Received: by 2002:a05:620a:22d5:: with SMTP id o21mr2958616qki.218.1644333415373;
Tue, 08 Feb 2022 07:16:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 07:16:55 -0800 (PST)
In-Reply-To: <7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Tue, 08 Feb 2022 15:16:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 29
 by: HCorte - Tue, 8 Feb 2022 15:16 UTC

Well the project that am working multiple executables the source code is using in the WRITE statements unit=5 instead of correct unit=6 that originates the following error when running the script to inject the params needed for the input's...

%FOR-F-ERRDURWRI, error during write
unit 5 file SYS$INPUT:.;
user PC 00000000

Since it detects that its a unit 5 assumes that is READ/SYS$INPUT when in fact for this specific cases its a Write... can't change the source code since this value is passed as parameter in multiple source code file, so gona have to give up the ideia of automatizing the running of a group of programs.

Is there any reason one would use unit=5 for Write??

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Three unit numbers are automatically associated with specific standard I/O files at the start of program execution. These preconnected units are standard input, standard output, and standard error:

Standard input is logical unit 5 (also Fortran 90 unit 100)

Standard output is logical unit 6 (also Fortran 90 unit 101)

Standard error is logical unit 0 (also Fortran 90 unit 102)

Re: Command Procedure pass value to program READ

<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:1399:: with SMTP id k25mr2953826qki.662.1644333575019;
Tue, 08 Feb 2022 07:19:35 -0800 (PST)
X-Received: by 2002:ac8:5f8a:: with SMTP id j10mr3275656qta.120.1644333574862;
Tue, 08 Feb 2022 07:19:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 07:19:34 -0800 (PST)
In-Reply-To: <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.230.211.194; posting-account=Ysq9BAoAAACGX1EcMMPkdNg4YcTg0TxG
NNTP-Posting-Host: 96.230.211.194
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: dansabrs...@yahoo.com (abrsvc)
Injection-Date: Tue, 08 Feb 2022 15:19:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: abrsvc - Tue, 8 Feb 2022 15:19 UTC

On Tuesday, February 8, 2022 at 10:16:57 AM UTC-5, HCorte wrote:
> Well the project that am working multiple executables the source code is using in the WRITE statements unit=5 instead of correct unit=6 that originates the following error when running the script to inject the params needed for the input's...
>
> %FOR-F-ERRDURWRI, error during write
> unit 5 file SYS$INPUT:.;
> user PC 00000000
>
> Since it detects that its a unit 5 assumes that is READ/SYS$INPUT when in fact for this specific cases its a Write... can't change the source code since this value is passed as parameter in multiple source code file, so gona have to give up the ideia of automatizing the running of a group of programs.
>
> Is there any reason one would use unit=5 for Write??
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Three unit numbers are automatically associated with specific standard I/O files at the start of program execution. These preconnected units are standard input, standard output, and standard error:
>
> Standard input is logical unit 5 (also Fortran 90 unit 100)
>
> Standard output is logical unit 6 (also Fortran 90 unit 101)
>
> Standard error is logical unit 0 (also Fortran 90 unit 102)
In older FORTRAN programs, writes to unit 5 were usually prompts to the user. I haven't seen this in many years though.

Re: Command Procedure pass value to program READ

<e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:192:: with SMTP id s18mr3581279qtw.43.1644338281169;
Tue, 08 Feb 2022 08:38:01 -0800 (PST)
X-Received: by 2002:ac8:66da:: with SMTP id m26mr3584940qtp.536.1644338280950;
Tue, 08 Feb 2022 08:38:00 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 08:38:00 -0800 (PST)
In-Reply-To: <64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Tue, 08 Feb 2022 16:38:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 107
 by: HCorte - Tue, 8 Feb 2022 16:38 UTC

A terça-feira, 8 de fevereiro de 2022 à(s) 15:19:36 UTC, abrsvc escreveu:
> On Tuesday, February 8, 2022 at 10:16:57 AM UTC-5, HCorte wrote:
> > Well the project that am working multiple executables the source code is using in the WRITE statements unit=5 instead of correct unit=6 that originates the following error when running the script to inject the params needed for the input's...
> >
> > %FOR-F-ERRDURWRI, error during write
> > unit 5 file SYS$INPUT:.;
> > user PC 00000000
> >
> > Since it detects that its a unit 5 assumes that is READ/SYS$INPUT when in fact for this specific cases its a Write... can't change the source code since this value is passed as parameter in multiple source code file, so gona have to give up the ideia of automatizing the running of a group of programs.
> >
> > Is there any reason one would use unit=5 for Write??
> >
> > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > Three unit numbers are automatically associated with specific standard I/O files at the start of program execution. These preconnected units are standard input, standard output, and standard error:
> >
> > Standard input is logical unit 5 (also Fortran 90 unit 100)
> >
> > Standard output is logical unit 6 (also Fortran 90 unit 101)
> >
> > Standard error is logical unit 0 (also Fortran 90 unit 102)
> In older FORTRAN programs, writes to unit 5 were usually prompts to the user. I haven't seen this in many years though.

The source code of this subroutine is from the 90's, gona try later changing this subroutine itself and put a condition if its unit=5 change the value to unit=6.

Getting a behaviour when the WRITE uses format with editor descriptor $ when the script injects the input:

>@script
ENTER FILE NAME:
File Name is:
good
ENTER FILE NAME2: >
File Name is:
well

when the program run directly puts well
>r program_example
ENTER FILE NAME:
good
File Name is:
good
ENTER FILE NAME2: >well
File Name is:
well

is there a way to provide in the script to ignore the $ edit descriptor?
(https://docs.oracle.com/cd/E19957-01/805-4939/z400074387ff/index.html)

-----------------------------------------------------------------------------------------
the script
$!example
$!DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
$RUN PROGRAM_EXAMPLE
good
well
-----------------------------------------------------------------------------------------
the program
PROGRAM PROGRAM_EXAMPLE
IMPLICIT NONE

CHARACTER*60 FILENAME,FILENAME2

WRITE(6,102) 'ENTER FILE NAME:'
READ(5,101) FILENAME
write(6,102) 'File Name is: ',FILENAME
C-------second Read-------------------------
C PAUSE
C WRITE(6,102) 'ENTER FILE NAME2:'
CALL WRITE_TEST(6,'ENTER FILE NAME2:')
READ(5,101) FILENAME2
write(6,102) 'File Name is: ',FILENAME2
101 FORMAT(' ',A)
102 FORMAT(' ',A)

------------------------------------------------------------------------------------------
the subroutine
SUBROUTINE WRITE_TEST(LUN, STRING)
IMPLICIT NONE
C INTEGER*4 LUN
CHARACTER STRING*(*)
C C
WRITE(LUN, 1001) ,STRING
1001 FORMAT(' ',A,' >',$)
C RETURN
END

Re: Command Procedure pass value to program READ

<16609b26-c0fc-444a-b12e-9dd5dbc5026en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:c6:: with SMTP id p6mr3552415qtw.191.1644339095776;
Tue, 08 Feb 2022 08:51:35 -0800 (PST)
X-Received: by 2002:a05:622a:2ca:: with SMTP id a10mr3613098qtx.298.1644339095054;
Tue, 08 Feb 2022 08:51:35 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 08:51:34 -0800 (PST)
In-Reply-To: <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <16609b26-c0fc-444a-b12e-9dd5dbc5026en@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Tue, 08 Feb 2022 16:51:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 117
 by: HCorte - Tue, 8 Feb 2022 16:51 UTC

A terça-feira, 8 de fevereiro de 2022 à(s) 16:38:02 UTC, HCorte escreveu:
> A terça-feira, 8 de fevereiro de 2022 à(s) 15:19:36 UTC, abrsvc escreveu:
> > On Tuesday, February 8, 2022 at 10:16:57 AM UTC-5, HCorte wrote:
> > > Well the project that am working multiple executables the source code is using in the WRITE statements unit=5 instead of correct unit=6 that originates the following error when running the script to inject the params needed for the input's...
> > >
> > > %FOR-F-ERRDURWRI, error during write
> > > unit 5 file SYS$INPUT:.;
> > > user PC 00000000
> > >
> > > Since it detects that its a unit 5 assumes that is READ/SYS$INPUT when in fact for this specific cases its a Write... can't change the source code since this value is passed as parameter in multiple source code file, so gona have to give up the ideia of automatizing the running of a group of programs.
> > >
> > > Is there any reason one would use unit=5 for Write??
> > >
> > > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > > Three unit numbers are automatically associated with specific standard I/O files at the start of program execution. These preconnected units are standard input, standard output, and standard error:
> > >
> > > Standard input is logical unit 5 (also Fortran 90 unit 100)
> > >
> > > Standard output is logical unit 6 (also Fortran 90 unit 101)
> > >
> > > Standard error is logical unit 0 (also Fortran 90 unit 102)
> > In older FORTRAN programs, writes to unit 5 were usually prompts to the user. I haven't seen this in many years though.
> The source code of this subroutine is from the 90's, gona try later changing this subroutine itself and put a condition if its unit=5 change the value to unit=6.
>
> Getting a behaviour when the WRITE uses format with editor descriptor $ when the script injects the input:
>
> >@script
> ENTER FILE NAME:
> File Name is:
> good
> ENTER FILE NAME2: >
> File Name is:
> well
>
> when the program run directly puts well
> >r program_example
> ENTER FILE NAME:
> good
> File Name is:
> good
> ENTER FILE NAME2: >well
> File Name is:
> well
>
> is there a way to provide in the script to ignore the $ edit descriptor?
> (https://docs.oracle.com/cd/E19957-01/805-4939/z400074387ff/index.html)
>
> -----------------------------------------------------------------------------------------
> the script
> $!example
> $!DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
> $RUN PROGRAM_EXAMPLE
> good
> well
> -----------------------------------------------------------------------------------------
> the program
> PROGRAM PROGRAM_EXAMPLE
> IMPLICIT NONE
>
> CHARACTER*60 FILENAME,FILENAME2
>
> WRITE(6,102) 'ENTER FILE NAME:'
> READ(5,101) FILENAME
> write(6,102) 'File Name is: ',FILENAME
> C-------second Read-------------------------
> C PAUSE
> C WRITE(6,102) 'ENTER FILE NAME2:'
> CALL WRITE_TEST(6,'ENTER FILE NAME2:')
> READ(5,101) FILENAME2
> write(6,102) 'File Name is: ',FILENAME2
> 101 FORMAT(' ',A)
> 102 FORMAT(' ',A)
>
> ------------------------------------------------------------------------------------------
> the subroutine
> SUBROUTINE WRITE_TEST(LUN, STRING)
> IMPLICIT NONE
> C
> INTEGER*4 LUN
> CHARACTER STRING*(*)
> C
> C
> WRITE(LUN, 1001) ,STRING
> 1001 FORMAT(' ',A,' >',$)
> C
> RETURN
> END

**the script output is the follow:
@script
ENTER FILE NAME:
File Name is:
good
ENTER FILE NAME2: >
File Name is:
well

Re: Command Procedure pass value to program READ

<47c289d2-b8fa-4905-a14e-1bb48063205fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:dad:: with SMTP id h13mr3707722qvh.7.1644339234653;
Tue, 08 Feb 2022 08:53:54 -0800 (PST)
X-Received: by 2002:ad4:5e88:: with SMTP id jl8mr1784246qvb.33.1644339234472;
Tue, 08 Feb 2022 08:53:54 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 08:53:54 -0800 (PST)
In-Reply-To: <16609b26-c0fc-444a-b12e-9dd5dbc5026en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.115.249.100; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 89.115.249.100
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<16609b26-c0fc-444a-b12e-9dd5dbc5026en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47c289d2-b8fa-4905-a14e-1bb48063205fn@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Tue, 08 Feb 2022 16:53:54 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: HCorte - Tue, 8 Feb 2022 16:53 UTC

@script
ENTER FILE NAME:
File Name is:
good
ENTER FILE NAME2: >
***********************File Name is:
well

the * are white space but keeps removing in the post...

Re: Command Procedure pass value to program READ

<c3612402-86e8-4bff-88d4-ff2ff75d81cdn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:eb4f:: with SMTP id b76mr3200380qkg.690.1644340216781;
Tue, 08 Feb 2022 09:10:16 -0800 (PST)
X-Received: by 2002:ad4:5ba6:: with SMTP id 6mr3832965qvq.122.1644340216462;
Tue, 08 Feb 2022 09:10:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Tue, 8 Feb 2022 09:10:16 -0800 (PST)
In-Reply-To: <47c289d2-b8fa-4905-a14e-1bb48063205fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:c0:8f0d:9b43:95ed:ce3e:2283:1b7a;
posting-account=cHmS7AoAAACMYAFH9kP9m4l8qjrXLvte
NNTP-Posting-Host: 2003:c0:8f0d:9b43:95ed:ce3e:2283:1b7a
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<16609b26-c0fc-444a-b12e-9dd5dbc5026en@googlegroups.com> <47c289d2-b8fa-4905-a14e-1bb48063205fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c3612402-86e8-4bff-88d4-ff2ff75d81cdn@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: volker_h...@hotmail.com (Volker Halle)
Injection-Date: Tue, 08 Feb 2022 17:10:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: Volker Halle - Tue, 8 Feb 2022 17:10 UTC

From the HP Fortran for OpenVMS Language Reference Manual BA368-90004

11.4.8 Dollar Sign ($) and Backslash (\) Editing
....
If the first character of the record is a blank or a plus sign ( + ), the dollar sign
and backslash descriptors suppress carriage return (after printing the record)

Volker.

Re: Command Procedure pass value to program READ

<stuaep$tm3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: Command Procedure pass value to program READ
Date: Tue, 8 Feb 2022 12:49:13 -0500
Organization: HoffmanLabs LLC
Lines: 19
Message-ID: <stuaep$tm3$1@dont-email.me>
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com> <62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com> <7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com> <64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="adf3a2dd685e5def9060a5d2f8cc4ffe";
logging-data="30403"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18t9t6LOktGfESwAM5SEJE4BDghlJneiUM="
User-Agent: Unison/2.2
Cancel-Lock: sha1:vTxWoQF9ZsK6YI2IGItQoAWluUo=
 by: Stephen Hoffman - Tue, 8 Feb 2022 17:49 UTC

On 2022-02-08 16:38:00 +0000, HCorte said:

> The source code of this subroutine is from the 90's, gona try later
> changing this subroutine itself and put a condition if its unit=5
> change the value to unit=6.

I'd use an explicit OPEN and your own chosen unit, and use FILE and
DEFAULTFILE for the file specification on the explicit OPEN. This gives
you direct control over all of this.

The file unit selected is best not 5 or 6 (nor 100, 101, nor 102), and
either manually coordinated with all other units used in the app, or
automatically coordinated with other units via ubiquitous usage of
LIB$GET_LUN within the app.

--
Pure Personal Opinion | HoffmanLabs LLC

Re: Command Procedure pass value to program READ

<94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 08 Feb 2022 14:40:41 -0600
Sender: Dennis Boone <drb@yagi.h-net.org>
From: drb...@ihatespam.msu.edu (Dennis Boone)
Subject: Re: Command Procedure pass value to program READ
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com> <62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com> <7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
User-Agent: tin/2.4.5-20201224 ("Glen Albyn") (FreeBSD/13.0-RELEASE-p6 (amd64))
Message-ID: <94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.com>
Date: Tue, 08 Feb 2022 14:40:41 -0600
Lines: 8
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-Ad3rGCrY072FTozFjHkoqrg6yk371ofwc339loeq2KLu6oGcy07naqnlsJy6DR36OyrBZkDW04x3Pa8!/WJ8G0jKAsbEeVGMbeXnKhQb9YCsvdutVqE77BG4N+Cgwr7fFHJp8MqlMTCasdd7Ty8QPq0=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1596
 by: Dennis Boone - Tue, 8 Feb 2022 20:40 UTC

> Well the project that am working multiple executables the source code is
> using in the WRITE statements unit=5 instead of correct unit=6 that
> originates the following error when running the script to inject the
> params needed for the input's...

Is this program being ported from some non-VMS origin platform?

De

Re: Command Procedure pass value to program READ

<71957d3b-44dc-410b-aabc-e140bc3eb796n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:57d0:: with SMTP id w16mr5501103qta.171.1644512542037;
Thu, 10 Feb 2022 09:02:22 -0800 (PST)
X-Received: by 2002:a05:622a:1445:: with SMTP id v5mr5509185qtx.127.1644512541854;
Thu, 10 Feb 2022 09:02:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 10 Feb 2022 09:02:21 -0800 (PST)
In-Reply-To: <94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.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: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <71957d3b-44dc-410b-aabc-e140bc3eb796n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Thu, 10 Feb 2022 17:02:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 13
 by: HCorte - Thu, 10 Feb 2022 17:02 UTC

A terça-feira, 8 de fevereiro de 2022 à(s) 20:40:48 UTC, Dennis Boone escreveu:
> > Well the project that am working multiple executables the source code is
> > using in the WRITE statements unit=5 instead of correct unit=6 that
> > originates the following error when running the script to inject the
> > params needed for the input's...
> Is this program being ported from some non-VMS origin platform?
>
> De

No, its all been in OpenVMS. Nerver the less its a project with quite some time and in Fortran77.

Re: Command Procedure pass value to program READ

<9fba64c1-730b-48ac-a9af-4df628a7ced9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:514:: with SMTP id l20mr5676163qtx.187.1644513009671;
Thu, 10 Feb 2022 09:10:09 -0800 (PST)
X-Received: by 2002:ac8:66da:: with SMTP id m26mr5558455qtp.536.1644513009521;
Thu, 10 Feb 2022 09:10:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 10 Feb 2022 09:10:09 -0800 (PST)
In-Reply-To: <71957d3b-44dc-410b-aabc-e140bc3eb796n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.230.211.194; posting-account=Ysq9BAoAAACGX1EcMMPkdNg4YcTg0TxG
NNTP-Posting-Host: 96.230.211.194
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.com> <71957d3b-44dc-410b-aabc-e140bc3eb796n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9fba64c1-730b-48ac-a9af-4df628a7ced9n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: dansabrs...@yahoo.com (abrsvc)
Injection-Date: Thu, 10 Feb 2022 17:10:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 25
 by: abrsvc - Thu, 10 Feb 2022 17:10 UTC

On Thursday, February 10, 2022 at 12:02:23 PM UTC-5, HCorte wrote:
> A terça-feira, 8 de fevereiro de 2022 à(s) 20:40:48 UTC, Dennis Boone escreveu:
> > > Well the project that am working multiple executables the source code is
> > > using in the WRITE statements unit=5 instead of correct unit=6 that
> > > originates the following error when running the script to inject the
> > > params needed for the input's...
> > Is this program being ported from some non-VMS origin platform?
> >
> > De
> No, its all been in OpenVMS. Nerver the less its a project with quite some time and in Fortran77.

As I stated, this was a very common "feature" in many FORTRAN programs that provided prompts to users. Both channel 5 and 6 were the screen for interactive applications and often the programmers would differentiate prompts from "output" this way. I didn't agree, but it was a convention in some places. With direct execution, there was no problem. As you found, command procedure wrappers create problems. I believe that you can get around this by assigning both FOR005 and FOR006 to TT: (I haven't tried this, but it may work.)

Dan

Re: Command Procedure pass value to program READ

<ec1b739e-d85a-49c9-9aab-d2996d768452n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:11ca:: with SMTP id n10mr5644457qtk.42.1644514732346;
Thu, 10 Feb 2022 09:38:52 -0800 (PST)
X-Received: by 2002:ae9:c014:: with SMTP id u20mr4387012qkk.476.1644514732164;
Thu, 10 Feb 2022 09:38:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 10 Feb 2022 09:38:51 -0800 (PST)
In-Reply-To: <9fba64c1-730b-48ac-a9af-4df628a7ced9n@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: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<94OdnQcjz4XUSJ__nZ2dnUU7-SudnZ2d@giganews.com> <71957d3b-44dc-410b-aabc-e140bc3eb796n@googlegroups.com>
<9fba64c1-730b-48ac-a9af-4df628a7ced9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ec1b739e-d85a-49c9-9aab-d2996d768452n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Thu, 10 Feb 2022 17:38:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 35
 by: HCorte - Thu, 10 Feb 2022 17:38 UTC

A quinta-feira, 10 de fevereiro de 2022 à(s) 17:10:11 UTC, abrsvc escreveu:
> On Thursday, February 10, 2022 at 12:02:23 PM UTC-5, HCorte wrote:
> > A terça-feira, 8 de fevereiro de 2022 à(s) 20:40:48 UTC, Dennis Boone escreveu:
> > > > Well the project that am working multiple executables the source code is
> > > > using in the WRITE statements unit=5 instead of correct unit=6 that
> > > > originates the following error when running the script to inject the
> > > > params needed for the input's...
> > > Is this program being ported from some non-VMS origin platform?
> > >
> > > De
> > No, its all been in OpenVMS. Nerver the less its a project with quite some time and in Fortran77.
> As I stated, this was a very common "feature" in many FORTRAN programs that provided prompts to users. Both channel 5 and 6 were the screen for interactive applications and often the programmers would differentiate prompts from "output" this way. I didn't agree, but it was a convention in some places. With direct execution, there was no problem. As you found, command procedure wrappers create problems. I believe that you can get around this by assigning both FOR005 and FOR006 to TT: (I haven't tried this, but it may work.)
>
> Dan

Yes @Dan it seems to be the case where direct execution there isn't any probleam only now that am trying to wrapping in command procedure that arised this situation, thanks for the feedback about this being a convention.

Gona Try to see if there exists a symbol to differentiate when this subroutine is called from a script or the normal direct execution.

what do you mean by assigning both FOR005 and FOR006 to TT?

Re: Command Procedure pass value to program READ

<6205ad6b$0$703$14726298@news.sunsite.dk>

  copy mid

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

  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: Thu, 10 Feb 2022 19:27:15 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: Command Procedure pass value to program READ
Content-Language: en-US
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk>
<f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
<92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
<e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 61
Message-ID: <6205ad6b$0$703$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: c4a2319c.news.sunsite.dk
X-Trace: 1644539243 news.sunsite.dk 703 arne@vajhoej.dk/68.9.63.232:60739
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 11 Feb 2022 00:27 UTC

On 2/8/2022 11:38 AM, HCorte wrote:
> A terça-feira, 8 de fevereiro de 2022 à(s) 15:19:36 UTC, abrsvc escreveu:
>> On Tuesday, February 8, 2022 at 10:16:57 AM UTC-5, HCorte wrote:
>>> Well the project that am working multiple executables the source
>>> code is using in the WRITE statements unit=5 instead of correct
>>> unit=6 that originates the following error when running the
>>> script to inject the params needed for the input's...
>>>
>>> %FOR-F-ERRDURWRI, error during write unit 5 file SYS$INPUT:.;
>>> user PC 00000000
>>>
>>> Since it detects that its a unit 5 assumes that is READ/SYS$INPUT
>>> when in fact for this specific cases its a Write... can't change
>>> the source code since this value is passed as parameter in
>>> multiple source code file, so gona have to give up the ideia of
>>> automatizing the running of a group of programs.
>>>
>>> Is there any reason one would use unit=5 for Write??

>> In older FORTRAN programs, writes to unit 5 were usually prompts to
>> the user. I haven't seen this in many years though.
>
> The source code of this subroutine is from the 90's, gona try later
> changing this subroutine itself and put a condition if its unit=5
> change the value to unit=6.

It is what it is.

read unit * means read unit 5

write unit * means write unit 6

unit 5 points default to SYS$INPUT

unit 6 points default to SYS$OUTPUT

if SYS$INPUT and SYS$OUTPUT both points to the terminal then 5 and 6
points to the same and you can both read and write from and to both

if SYS$INPUT points to an input file then you cannot write to 5

if SYS$OUTPUT points to an output file then you cannot read from 6

Demo:

program io
character*1 dummy
write(*,*) '*'
c this fails if SYS$INPUT is a file:
write(5,*) '5'
write(6,*) '6'
write(*,'(1x,a,$)') 'Read from *: '
read(*,*) dummy
write(*,'(1x,a,$)') 'Read from 5: '
read(5,*) dummy
write(*,'(1x,a,$)') 'Read from 6: '
c this fails if SYS$OUTPUT is a file:
read(6,*) dummy
end

Arne

Re: Command Procedure pass value to program READ

<458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7457:: with SMTP id h23mr1387714qtr.528.1644592361622;
Fri, 11 Feb 2022 07:12:41 -0800 (PST)
X-Received: by 2002:ac8:5f47:: with SMTP id y7mr1405583qta.418.1644592361435;
Fri, 11 Feb 2022 07:12:41 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 11 Feb 2022 07:12:41 -0800 (PST)
In-Reply-To: <6205ad6b$0$703$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=81.193.21.144; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 81.193.21.144
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Fri, 11 Feb 2022 15:12:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 2
 by: HCorte - Fri, 11 Feb 2022 15:12 UTC

Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.

for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?

Re: Command Procedure pass value to program READ

<62067ec0$0$695$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Fri, 11 Feb 2022 10:20:28 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.0
Subject: Re: Command Procedure pass value to program READ
Content-Language: en-US
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk>
<f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
<92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
<e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk>
<458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 8
Message-ID: <62067ec0$0$695$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 5348e8bf.news.sunsite.dk
X-Trace: 1644592832 news.sunsite.dk 695 arne@vajhoej.dk/68.9.63.232:58563
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 11 Feb 2022 15:20 UTC

On 2/11/2022 10:12 AM, HCorte wrote:
> Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.
>
> for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?

A single call? No.

Arne

Re: Command Procedure pass value to program READ

<6206817c$0$696$14726298@news.sunsite.dk>

  copy mid

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

  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, 11 Feb 2022 10:32:08 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.0
Subject: Re: Command Procedure pass value to program READ
Content-Language: en-US
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk>
<f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
<92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
<e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk>
<458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 25
Message-ID: <6206817c$0$696$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 5348e8bf.news.sunsite.dk
X-Trace: 1644593532 news.sunsite.dk 696 arne@vajhoej.dk/68.9.63.232:58944
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 11 Feb 2022 15:32 UTC

On 2/11/2022 10:12 AM, HCorte wrote:
> Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.
>
> for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?

So you are setting a symbol to indicate what to do.

Why not just test on what SYS$INPUT is?

Demo:

program dvi
include '($dvidef)'
include '($dcdef)'
integer*4 devclz
call lib$getdvi(DVI$_DEVCLASS, %VAL(0), 'SYS$INPUT', devclz)
if (devclz.eq.DC$_TERM) then
write(*,*) 'You can write to unit 5'
else
write(*,*) 'Do not try to write to unit 5'
end if
end

Arne

Re: Command Procedure pass value to program READ

<0a16cbc8-2c25-47f5-ab9d-e88a1f472f26n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:514:: with SMTP id l20mr1524182qtx.187.1644593796594;
Fri, 11 Feb 2022 07:36:36 -0800 (PST)
X-Received: by 2002:ac8:5f8a:: with SMTP id j10mr1479263qta.120.1644593796403;
Fri, 11 Feb 2022 07:36:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 11 Feb 2022 07:36:36 -0800 (PST)
In-Reply-To: <62067ec0$0$695$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=81.193.21.144; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 81.193.21.144
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk> <458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
<62067ec0$0$695$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0a16cbc8-2c25-47f5-ab9d-e88a1f472f26n@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Fri, 11 Feb 2022 15:36:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 15
 by: HCorte - Fri, 11 Feb 2022 15:36 UTC

A sexta-feira, 11 de fevereiro de 2022 à(s) 15:20:35 UTC, Arne Vajhøj escreveu:
> On 2/11/2022 10:12 AM, HCorte wrote:
> > Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.
> >
> > for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?
> A single call? No.
>
> Arne

This subroutine is called in quite some programs/executables but since its alls to prompt the user for some kind of input, expect that any point in time would only be running one of this executables at a time, but could call this subroutine some times never the less each exe.

Re: Command Procedure pass value to program READ

<40fe75ee-7d73-4dbb-be86-60c7830ac64en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:eb4f:: with SMTP id b76mr1042939qkg.690.1644593887697;
Fri, 11 Feb 2022 07:38:07 -0800 (PST)
X-Received: by 2002:a05:620a:22d5:: with SMTP id o21mr1078411qki.218.1644593887530;
Fri, 11 Feb 2022 07:38:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 11 Feb 2022 07:38:07 -0800 (PST)
In-Reply-To: <6206817c$0$696$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=81.193.21.144; posting-account=HDxk_QoAAABHOnxohqRjEL16UDUgop5K
NNTP-Posting-Host: 81.193.21.144
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk> <f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com> <92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com> <e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk> <458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
<6206817c$0$696$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <40fe75ee-7d73-4dbb-be86-60c7830ac64en@googlegroups.com>
Subject: Re: Command Procedure pass value to program READ
From: hmmbco...@gmail.com (HCorte)
Injection-Date: Fri, 11 Feb 2022 15:38:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 28
 by: HCorte - Fri, 11 Feb 2022 15:38 UTC

A sexta-feira, 11 de fevereiro de 2022 à(s) 15:32:15 UTC, Arne Vajhøj escreveu:
> On 2/11/2022 10:12 AM, HCorte wrote:
> > Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.
> >
> > for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?
> So you are setting a symbol to indicate what to do.
>
> Why not just test on what SYS$INPUT is?
>
> Demo:
>
> program dvi
> include '($dvidef)'
> include '($dcdef)'
> integer*4 devclz
> call lib$getdvi(DVI$_DEVCLASS, %VAL(0), 'SYS$INPUT', devclz)
> if (devclz.eq.DC$_TERM) then
> write(*,*) 'You can write to unit 5'
> else
> write(*,*) 'Do not try to write to unit 5'
> end if
> end
>
> Arne

thanks @Arne gona try that.

Re: Command Procedure pass value to program READ

<62069100$0$700$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Fri, 11 Feb 2022 11:38:20 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.0
Subject: Re: Command Procedure pass value to program READ
Content-Language: en-US
Newsgroups: comp.os.vms
References: <905de93e-e78b-467c-b4fb-1547b57982f1n@googlegroups.com>
<62014428$0$703$14726298@news.sunsite.dk>
<f31356f6-e145-4d35-82fa-337cbf35eab1n@googlegroups.com>
<7d08e247-f9c0-4a2a-8960-493ca9be87b8n@googlegroups.com>
<92257c9d-4fb2-4eda-8af4-11a1b6fc660bn@googlegroups.com>
<64f31442-9532-4b5a-a1a7-5166fd75014bn@googlegroups.com>
<e465ed27-468e-4625-b565-3d65b63424den@googlegroups.com>
<6205ad6b$0$703$14726298@news.sunsite.dk>
<458fa81d-c2de-4d29-a399-c62d0b8cc096n@googlegroups.com>
<62067ec0$0$695$14726298@news.sunsite.dk>
<0a16cbc8-2c25-47f5-ab9d-e88a1f472f26n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <0a16cbc8-2c25-47f5-ab9d-e88a1f472f26n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 40
Message-ID: <62069100$0$700$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: b2254218.news.sunsite.dk
X-Trace: 1644597504 news.sunsite.dk 700 arne@vajhoej.dk/68.9.63.232:61694
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 11 Feb 2022 16:38 UTC

On 2/11/2022 10:36 AM, HCorte wrote:
> A sexta-feira, 11 de fevereiro de 2022 à(s) 15:20:35 UTC, Arne Vajhøj
> escreveu:
>> On 2/11/2022 10:12 AM, HCorte wrote:
>>> Its working added a condition
>>> IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses
>>> unit=6.
>>>
>>> for performance purposes
>>> LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have
>>> impact right?
>> A single call? No.
>
> This subroutine is called in quite some programs/executables but
> since its alls to prompt the user for some kind of input, expect that
> any point in time would only be running one of this executables at a
> time, but could call this subroutine some times never the less each
> exe.

Measure!

program gsoh
integer*8 N
parameter (N=10000000)
character*256 s
integer*4 slen, i
integer*8 t1,t2
call lib$get_symbol('X', s, slen)
write(*,*) s(1:slen)
call sys$gettim(t1)
do 100 i = 1,n
call lib$get_symbol('X', s, slen)
100 continue
call sys$gettim(t2)
write(*,*) N * 10000000 / (t2 - t1), ' calls per second'
end

Arne

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor