Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Like punning, programming is a play on words.


computers / comp.os.vms / Timeout in a write using QUIW.

SubjectAuthor
* Timeout in a write using QUIW.Jan-Erik Söderholm
+* Re: Timeout in a write using QUIW.Arne Vajhøj
|+* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
||+* Re: Timeout in a write using QUIW.Stephen Hoffman
|||`* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
||| `- Re: Timeout in a write using QUIW.Bob Gezelter
||`* Re: Timeout in a write using QUIW.Arne Vajhøj
|| `* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
||  `- Re: Timeout in a write using QUIW.Arne Vajhøj
|`* Re: Timeout in a write using QUIW.Dave Froble
| `- Re: Timeout in a write using QUIW.Jan-Erik Söderholm
+* Re: Timeout in a write using QUIW.Stephen Hoffman
|`* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
| +* Re: Timeout in a write using QUIW.Dave Froble
| |`- Re: Timeout in a write using QUIW.Dave Froble
| +- Re: Timeout in a write using QUIW.Johnny Billquist
| `* Re: Timeout in a write using QUIW.Phil Howell
|  `* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
|   +* Re: Timeout in a write using QUIW.Johnny Billquist
|   |`- Re: Timeout in a write using QUIW.Jan-Erik Söderholm
|   `* Re: Timeout in a write using QUIW.Phil Howell
|    `* Re: Timeout in a write using QUIW.Jan-Erik Söderholm
|     +- Re: Timeout in a write using QUIW.Simon Clubley
|     `* Re: Timeout in a write using QUIW.Arne Vajhøj
|      `* Re: Timeout in a write using QUIW.Simon Clubley
|       `* Re: Timeout in a write using QUIW.Dave Froble
|        `* Re: Timeout in a write using QUIW.Simon Clubley
|         +* Re: Timeout in a write using QUIW.Dave Froble
|         |`- Re: Timeout in a write using QUIW.Jan-Erik Söderholm
|         `* Re: Timeout in a write using QUIW.Dave Froble
|          `- Re: Timeout in a write using QUIW.Chris Townley
`* Re: Timeout in a write using QUIW.Simon Clubley
 `- Re: Timeout in a write using QUIW.Jan-Erik Söderholm

Pages:12
Timeout in a write using QUIW.

<u6vngo$30d1k$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 22:45:12 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <u6vngo$30d1k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Jun 2023 20:45:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24a4f6e66b88420ff7605600a602b729";
logging-data="3159092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bZdPseEJru3O05uWQ7Dta"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:R0XkCp/IEKUETj2X+AppPEk2uYY=
Content-Language: sv
 by: Jan-Erik Söderholm - Wed, 21 Jun 2023 20:45 UTC

Now, here is a technical one...

When doing a *read* from a terminal device using QIOW, one
can use IO$M_TIMED and supply a timeout value in P3. That
works perfectly and we use that a lot.

Now, we are having issues with an application when *writing*
to a terminal (TNA) device using QUIW that points to a small
label printer. If the printer is offline or not accessable on
the network, the application just hangs.

As far as I can see, QIO/QIOW does not support a timeout value
when used for writing, is that correct?

I was hoping that one could add a timeout value just as in the
read case, but it doesn't look so. So I do not see how to get
out of the hanging call to QIOW. Maybe using QIO, and doing
some extra coding to check the I/O, I guess.

So, is there a way to get out of this state, still using QIOW?

These are new printers where they decided to use Wifi
instead of wired connection. We do not see these issues
on our older label printers which are all hard wired...

I will of course again suggest that they do take the cost to
ask for wired network connections instead of using Wifi...

I also fixed a COM file that pings these 7 printers once each
10 seconds, and it clearly shows that the connections comes
and goes more or less all the time. And when that happens to
be the same time as they try to print a label, it just hangs...

Regards,
Jan-Eik.

Re: Timeout in a write using QUIW.

<u6vpcm$3101m$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 17:17:09 -0400
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <u6vpcm$3101m$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Jun 2023 21:17:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="74a6039280c2244d4a873e23c9b98b34";
logging-data="3178550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ps3r1T29f99DVvHI/GlzEVsQKvc9JIOw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:nDSe+pGQtZctTurCbmykcYas4PI=
Content-Language: en-US
In-Reply-To: <u6vngo$30d1k$1@dont-email.me>
 by: Arne Vajhøj - Wed, 21 Jun 2023 21:17 UTC

On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
> When doing a *read* from a terminal device using QIOW, one
> can use IO$M_TIMED and supply a timeout value in P3. That
> works perfectly and we use that a lot.
>
> Now, we are having issues with an application when *writing*
> to a terminal (TNA) device using QUIW that points to a small
> label printer. If the printer is offline or not accessable on
> the network, the application just hangs.
>
> As far as I can see, QIO/QIOW does not support a timeout value
> when used for writing, is that correct?

Yes.

https://vmssoftware.com/docs/VSI_IO_REF.pdf

Table 5.6 lists IO$M_TIMED for IO$_READ* while table 5.8
does not list it for IO$_WRITE*.

> I was hoping that one could add a timeout value just as in the
> read case, but it doesn't look so. So I do not see how to get
> out of the hanging call to QIOW. Maybe using QIO, and doing
> some extra coding to check the I/O, I guess.
>
> So, is there a way to get out of this state, still using QIOW?

Totally untested idea:

SYS$SETIMR with an AST routine that calls SYS$CANCEL

Arne

Re: Timeout in a write using QUIW.

<u6vpsc$311od$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 17:25:32 -0400
Organization: HoffmanLabs LLC
Lines: 27
Message-ID: <u6vpsc$311od$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="6f76dd58c281ad76cbd1830faa288b71";
logging-data="3180301"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dzjHVSgqW5XebGjWJfg60ASG411b2la0="
User-Agent: Unison/2.2
Cancel-Lock: sha1:LR98ozmmRwFOYU2TiG5WWWvX+tU=
 by: Stephen Hoffman - Wed, 21 Jun 2023 21:25 UTC

On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:

> Now, here is a technical one...
>
> When doing a *read* from a terminal device using QIOW, one
> can use IO$M_TIMED and supply a timeout value in P3. That
> works perfectly and we use that a lot...

I've never had great success with $QIO and $IO_PERFORM timeouts,
generally or particularly with network devices.

It's all gotten better by appearances, but it was long a source of app
races and of occasional app bugs.

I usually use a timer AST and a $CANCEL for the async read and write
I/O, and a $WAKE.

The AST sets an interlocked "cancel in progress" bitlock in the read or
write $HIBER loop to avoid races, and with a $SCHDWK running to clean
up any lingering $HIBER/$WAKE races lurking.

Threads would be workable here, too.

--
Pure Personal Opinion | HoffmanLabs LLC

Re: Timeout in a write using QUIW.

<u6vqhj$30d1k$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 23:36:51 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <u6vqhj$30d1k$2@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Jun 2023 21:36:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24a4f6e66b88420ff7605600a602b729";
logging-data="3159092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180aQ0uv6Wq4pZpS7HV+xWB"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:UGsWtXjx+Vk2pUfatRa2tnTOlRs=
Content-Language: sv
In-Reply-To: <u6vpsc$311od$1@dont-email.me>
 by: Jan-Erik Söderholm - Wed, 21 Jun 2023 21:36 UTC

Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
> On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:
>
>> Now, here is a technical one...
>>
>> When doing a *read* from a terminal device using QIOW, one
>> can use IO$M_TIMED and supply a timeout value in P3. That
>> works perfectly and we use that a lot...
>
> I've never had great success...

I'm sorry about that. As I wrote, it works perfectly. In the
case of reads, of course, where it is supported.

My question was about writes, and it has been confirmed that
timeout paramaters are not supported there. Thanks Arne.

Now we need to weight the coding work against getting
network cables installed to the printers. Wired printers
will also "solve" the issue with the current code. We have
15-20 older similar Zebra label printers, all wired, and
we do not see these error scenarios with those.
All using the same C routine for the QIOW calls.

Jan-Erik.

Re: Timeout in a write using QUIW.

<u6vqm7$30d1k$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 23:39:19 +0200
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <u6vqm7$30d1k$3@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Jun 2023 21:39:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24a4f6e66b88420ff7605600a602b729";
logging-data="3159092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/V8KyDQyRtWd2ORRk1zSo4"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:I2u58LZudsDUz2QGq5pEP6N9pE8=
In-Reply-To: <u6vpcm$3101m$1@dont-email.me>
Content-Language: sv
 by: Jan-Erik Söderholm - Wed, 21 Jun 2023 21:39 UTC

Den 2023-06-21 kl. 23:17, skrev Arne Vajhøj:
> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>> When doing a *read* from a terminal device using QIOW, one
>> can use IO$M_TIMED and supply a timeout value in P3. That
>> works perfectly and we use that a lot.
>>
>> Now, we are having issues with an application when *writing*
>> to a terminal (TNA) device using QUIW that points to a small
>> label printer. If the printer is offline or not accessable on
>> the network, the application just hangs.
>>
>> As far as I can see, QIO/QIOW does not support a timeout value
>> when used for writing, is that correct?
>
> Yes.
>
> https://vmssoftware.com/docs/VSI_IO_REF.pdf
>
> Table 5.6 lists IO$M_TIMED for IO$_READ* while table 5.8
> does not list it for IO$_WRITE*.
>
>> I was hoping that one could add a timeout value just as in the
>> read case, but it doesn't look so. So I do not see how to get
>> out of the hanging call to QIOW. Maybe using QIO, and doing
>> some extra coding to check the I/O, I guess.
>>
>> So, is there a way to get out of this state, still using QIOW?
>
> Totally untested idea:
>
> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>
> Arne
>
>

My thought was to just queue the I/O, wait a sec or two
using $WAIT and then check the IOSB. If not completed OK,
CANCEL and return an error to the application...

We'll see. Hopefully we can convince them to install
wired connections instead of using Wifi...

Jan-Erik.

Re: Timeout in a write using QUIW.

<u6vt13$31eb3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 18:19:15 -0400
Organization: HoffmanLabs LLC
Lines: 18
Message-ID: <u6vt13$31eb3$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me> <u6vqm7$30d1k$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="9e0b03bc8b8c6749c704f1595c6a774e";
logging-data="3193187"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kNg85Ucav9OJbZ5XANZj0DYQLPBqGxeY="
User-Agent: Unison/2.2
Cancel-Lock: sha1:7E1blkNEGUpLsv9Kb19n6qde82Q=
 by: Stephen Hoffman - Wed, 21 Jun 2023 22:19 UTC

On 2023-06-21 21:39:19 +0000, Jan-Erik Sderholm said:
>
> My thought was to just queue the I/O, wait a sec or two using $WAIT and
> then check the IOSB. If not completed OK, CANCEL and return an error to
> the application...
>
> We'll see. Hopefully we can convince them to install wired connections
> instead of using Wifi...

Yeah. I tried that in the 1980s. Learned that ASTs and threads and
completion routines avoided a whole lot of the mess that the inevitable
errors within sync I/O and networking involves. You're headed for some
races here, too.

--
Pure Personal Opinion | HoffmanLabs LLC

Re: Timeout in a write using QUIW.

<u7009g$31lq1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 19:16:10 -0400
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <u7009g$31lq1$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Jun 2023 23:14:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="088a2aace57d2e02beeab9158c4341bf";
logging-data="3200833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18q70r7ViYvAe09qZ/ajur4xr1eEz8iuUE="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:tVQzJggp6gAaC03YDY3sE+LedgY=
In-Reply-To: <u6vpcm$3101m$1@dont-email.me>
 by: Dave Froble - Wed, 21 Jun 2023 23:16 UTC

On 6/21/2023 5:17 PM, Arne Vajhøj wrote:
> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>> When doing a *read* from a terminal device using QIOW, one
>> can use IO$M_TIMED and supply a timeout value in P3. That
>> works perfectly and we use that a lot.
>>
>> Now, we are having issues with an application when *writing*
>> to a terminal (TNA) device using QUIW that points to a small
>> label printer. If the printer is offline or not accessable on
>> the network, the application just hangs.
>>
>> As far as I can see, QIO/QIOW does not support a timeout value
>> when used for writing, is that correct?
>
> Yes.
>
> https://vmssoftware.com/docs/VSI_IO_REF.pdf
>
> Table 5.6 lists IO$M_TIMED for IO$_READ* while table 5.8
> does not list it for IO$_WRITE*.
>
>> I was hoping that one could add a timeout value just as in the
>> read case, but it doesn't look so. So I do not see how to get
>> out of the hanging call to QIOW. Maybe using QIO, and doing
>> some extra coding to check the I/O, I guess.
>>
>> So, is there a way to get out of this state, still using QIOW?
>
> Totally untested idea:
>
> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>
> Arne
>
>

Damn, Arne beat me to it. However while I use that for reads, I've never used
it for a write. Don't know what would happen. Best to test.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Timeout in a write using QUIW.

<u701jn$31pfd$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 19:38:40 -0400
Organization: A noiseless patient Spider
Lines: 111
Message-ID: <u701jn$31pfd$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Jun 2023 23:37:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="088a2aace57d2e02beeab9158c4341bf";
logging-data="3204589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sNi8Eh8HsGxGpcpxMnhktt+1fVrd/5TM="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:RFZnuK9TsV/w9lOqiIsLHVU2mQ8=
In-Reply-To: <u6vqhj$30d1k$2@dont-email.me>
 by: Dave Froble - Wed, 21 Jun 2023 23:38 UTC

On 6/21/2023 5:36 PM, Jan-Erik Söderholm wrote:
> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>> On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:
>>
>>> Now, here is a technical one...
>>>
>>> When doing a *read* from a terminal device using QIOW, one
>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>> works perfectly and we use that a lot...
>>
>> I've never had great success...
>
>
> I'm sorry about that. As I wrote, it works perfectly. In the
> case of reads, of course, where it is supported.
>
> My question was about writes, and it has been confirmed that
> timeout paramaters are not supported there. Thanks Arne.
>
> Now we need to weight the coding work against getting
> network cables installed to the printers. Wired printers
> will also "solve" the issue with the current code. We have
> 15-20 older similar Zebra label printers, all wired, and
> we do not see these error scenarios with those.
> All using the same C routine for the QIOW calls.
>
>
> Jan-Erik.

Well, if you have an AST routine such as:

1 !************************************************
! Timer AST Timeout Handler to Cancel I/O
!************************************************

SUB TCP_TIMER( LONG CH% , &
LONG Z2% , &
LONG Z3% , &
LONG Z4% , &
LONG Z5% )

CALL SYS$CANCEL( Loc(CH%) By Value )

SubEnd

And then in you program define the routine as external:

EXTERNAL LONG FUNCTION TCP_TIMER ! Timer AST routine

And then queue the timer routine:

!***************** Set timer AST *****************
Stat% = SYS$SETIMR( , WAIT.PRD , ! Delta time &
LOC(TCP_TIMER) By Value , &
CH% By Value , ) ! AST rtn and channel

Stat% = SYS$QIOW( , ! Event flag &
CH% By Value, ! VMS channel &
IO$_ACCESS By Value, ! Operation &
IOSB::Stat%, ! I/O status block &
, ! AST routine &
, ! AST parameter &
, ! P1 &
, ! P2 &
SERVER.ITEMLST::LEN%, ! P3 - remote socket n^
, ! P4 - &
, ! P5 &
) ! P6

If ( Stat% And SS$_NORMAL ) = 0%
Then Call VMSERR( Stat% , E$ )
E$ = "Unable to queue connect to host - " + E$
E% = -1%
SaveStat% = Stat%
GoTo Close_Socket
End If

If ( IOSB::Stat% And SS$_NORMAL ) = 0%
Then If IOSB::Stat% = SS$_ABORT &
OR IOSB::Stat% = SS$_CANCEL
Then E$ = "Timeout"
Else Call VMSERR( IOSB::Stat% , E$ )
End If
E$ = "Unable to connect to host - " + E$
E% = -1%
SaveStat% = IOSB::Stat%
GoTo Close_Socket
End If

Note, if the QIOW exits with the IOSB status of ABORT or CANCEL then you can
assume it was the cancel in the AST routine. However, I feel that some other
reason might set that status. Never bothered to look into it further.

My planning is that if this happens, then the QIOW failed, and it's time to move
on, regardless of why it failed.

Note, the wait period can be set up with:

WW% = W% ! Set delta time
Stat% = LIB$CVT_TO_INTERNAL_TIME( LIB$K_DELTA_SECONDS , WW% , WAIT.PRD )

Should be easy to figure out by reading the docs on the various system services
and LIB$ routines.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Timeout in a write using QUIW.

<u7034l$31sb3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Wed, 21 Jun 2023 20:03:33 -0400
Organization: A noiseless patient Spider
Lines: 165
Message-ID: <u7034l$31sb3$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
<u6vqm7$30d1k$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 00:03:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9655afbbf37359f8d8feb37ada3f71a8";
logging-data="3207523"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e3iAH+P0z3U3N8nAnqEVbQrZKzrdefZ8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:Rc4qULfoXKIub1GoYt48FzOQxbg=
In-Reply-To: <u6vqm7$30d1k$3@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Thu, 22 Jun 2023 00:03 UTC

On 6/21/2023 5:39 PM, Jan-Erik Söderholm wrote:
> Den 2023-06-21 kl. 23:17, skrev Arne Vajhøj:
>> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>>> I was hoping that one could add a timeout value just as in the
>>> read case, but it doesn't look so. So I do not see how to get
>>> out of the hanging call to QIOW. Maybe using QIO, and doing
>>> some extra coding to check the I/O, I guess.
>>>
>>> So, is there a way to get out of this state, still using QIOW?
>>
>> Totally untested idea:
>>
>> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>
> My thought was to just queue the I/O, wait a sec or two
> using $WAIT and then check the IOSB. If not completed OK,
> CANCEL and return an error to the application...

That is always an option.

Just for fun I tried writing some code.

I tested with read, because it is easy to recreate timeout
for read.

First the standard IO$M_TIMED as baseline:

program r
implicit none
include '($ssdef)'
include '($iodef)'
integer*1 buf(1)
integer*2 chan, iosb(4)
integer*4 stat, tmo
integer*4 sys$assign, sys$qiow, sys$dassgn
external sys$assign, sys$qiow, sys$dassgn
stat = sys$assign('TT:', chan, , , )
if(stat.ne.SS$_NORMAL) call ooops(stat)
tmo = 10
write(*,*) 'Press a key within ', tmo, ' seconds'
stat = sys$qiow(, %val(chan), %val(IO$_READVBLK+IO$M_TIMED),
+ iosb, , ,
+ buf, %val(1), %val(tmo), , , )
if(stat.eq.SS$_NORMAL.and.iosb(1).eq.SS$_TIMEOUT) then
write(*,*) 'Arne you are too slow'
goto 100
end if
if(stat.ne.SS$_NORMAL) call ooops(stat)
if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
write(*,*) 'You entered code: ', buf
100 stat = sys$dassgn(%val(chan))
if(stat.ne.SS$_NORMAL) call ooops(stat)
end
c subroutine ooops(stat)
implicit none
integer*4 stat
write(*,*) 'status = ', stat
stop
end

Now an implementation of my idea:

program r1
implicit none
include '($ssdef)'
include '($iodef)'
integer*1 buf(1)
integer*2 chan, iosb(4)
integer*4 stat, tmo
integer*8 tmo2
integer*4 sys$assign, sys$qiow, sys$dassgn
external sys$assign, sys$qiow, sys$dassgn
external done
stat = sys$assign('TT:', chan, , , )
if(stat.ne.SS$_NORMAL) call ooops(stat)
tmo = 10
write(*,*) 'Press a key within ', tmo, ' seconds'
tmo2 = -tmo * 10000000
call sys$setimr(, tmo2, done, chan, )
stat = sys$qiow(, %val(chan), %val(IO$_READVBLK),
+ iosb, , ,
+ buf, %val(1), , , , )
if(stat.eq.SS$_NORMAL.and.iosb(1).eq.SS$_ABORT) then
write(*,*) 'Arne you are too slow'
goto 100
end if
if(stat.ne.SS$_NORMAL) call ooops(stat)
if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
call sys$cantim(0, )
write(*,*) 'You entered code: ', buf
100 stat = sys$dassgn(%val(chan))
if(stat.ne.SS$_NORMAL) call ooops(stat)
end
c subroutine ooops(stat)
implicit none
integer*4 stat
write(*,*) 'status = ', stat
stop
end
c subroutine done(chan)
implicit none
integer*2 chan
call sys$cancel(%val(chan))
return
end

And then how I interpret your suggestion:

program r2
implicit none
include '($ssdef)'
include '($iodef)'
integer*1 buf(1)
integer*2 chan, iosb(4)
integer*4 stat, tmo
integer*8 tmo2
integer*4 sys$assign, sys$qio, sys$dassgn
external sys$assign, sys$qio, sys$dassgn
external done
stat = sys$assign('TT:', chan, , , )
if(stat.ne.SS$_NORMAL) call ooops(stat)
tmo = 10
write(*,*) 'Press a key within ', tmo, ' seconds'
stat = sys$qio(, %val(chan), %val(IO$_READVBLK),
+ iosb, done, ,
+ buf, %val(1), , , , )
if(stat.ne.SS$_NORMAL) call ooops(stat)
tmo2 = -tmo * 10000000
call sys$schdwk(, , tmo2, )
call sys$hiber()
if(iosb(1).eq.0) then
write(*,*) 'Arne you are too slow'
goto 100
end if
if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
write(*,*) 'You entered code: ', buf
100 stat = sys$dassgn(%val(chan))
if(stat.ne.SS$_NORMAL) call ooops(stat)
end
c subroutine ooops(stat)
implicit none
integer*4 stat
write(*,*) 'status = ', stat
stop
end
c subroutine done
implicit none
call sys$wake(, )
return
end

And sorry for doing it in Fortran. But it would have taken me
way more time to do in Cobol. And translating from Fortran to
Cobol is probably easier than from C to Cobol. So Fortran
it is.

Arne

Re: Timeout in a write using QUIW.

<u70qrh$37ig7$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 08:48:17 +0200
Organization: A noiseless patient Spider
Lines: 186
Message-ID: <u70qrh$37ig7$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
<u6vqm7$30d1k$3@dont-email.me> <u7034l$31sb3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 06:48:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XcOCFjmudrRIZ3oLfVIan"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:MDAulvxP5vAEp5t2G0zs7h8/gas=
Content-Language: sv
In-Reply-To: <u7034l$31sb3$1@dont-email.me>
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 06:48 UTC

Den 2023-06-22 kl. 02:03, skrev Arne Vajhøj:
> On 6/21/2023 5:39 PM, Jan-Erik Söderholm wrote:
>> Den 2023-06-21 kl. 23:17, skrev Arne Vajhøj:
>>> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>>>> I was hoping that one could add a timeout value just as in the
>>>> read case, but it doesn't look so. So I do not see how to get
>>>> out of the hanging call to QIOW. Maybe using QIO, and doing
>>>> some extra coding to check the I/O, I guess.
>>>>
>>>> So, is there a way to get out of this state, still using QIOW?
>>>
>>> Totally untested idea:
>>>
>>> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>>
>> My thought was to just queue the I/O, wait a sec or two
>> using $WAIT and then check the IOSB. If not completed OK,
>> CANCEL and return an error to the application...
>
> That is always an option.
>
> Just for fun I tried writing some code.
>
> I tested with read, because it is easy to recreate timeout
> for read.
>
> First the standard IO$M_TIMED as baseline:
>
>       program r
>       implicit none
>       include '($ssdef)'
>       include '($iodef)'
>       integer*1 buf(1)
>       integer*2 chan, iosb(4)
>       integer*4 stat, tmo
>       integer*4 sys$assign, sys$qiow, sys$dassgn
>       external sys$assign, sys$qiow, sys$dassgn
>       stat = sys$assign('TT:', chan, , , )
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       tmo = 10
>       write(*,*) 'Press a key within ', tmo, ' seconds'
>       stat = sys$qiow(, %val(chan), %val(IO$_READVBLK+IO$M_TIMED),
>      +                iosb, , ,
>      +                buf, %val(1), %val(tmo), , , )
>       if(stat.eq.SS$_NORMAL.and.iosb(1).eq.SS$_TIMEOUT) then
>         write(*,*) 'Arne you are too slow'
>         goto 100
>       end if
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
>       write(*,*) 'You entered code: ', buf
> 100   stat = sys$dassgn(%val(chan))
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       end
> c
>       subroutine ooops(stat)
>       implicit none
>       integer*4 stat
>       write(*,*) 'status = ', stat
>       stop
>       end
>
> Now an implementation of my idea:
>
>       program r1
>       implicit none
>       include '($ssdef)'
>       include '($iodef)'
>       integer*1 buf(1)
>       integer*2 chan, iosb(4)
>       integer*4 stat, tmo
>       integer*8 tmo2
>       integer*4 sys$assign, sys$qiow, sys$dassgn
>       external sys$assign, sys$qiow, sys$dassgn
>       external done
>       stat = sys$assign('TT:', chan, , , )
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       tmo = 10
>       write(*,*) 'Press a key within ', tmo, ' seconds'
>       tmo2 = -tmo * 10000000
>       call sys$setimr(, tmo2, done, chan, )
>       stat = sys$qiow(, %val(chan), %val(IO$_READVBLK),
>      +                iosb, , ,
>      +                buf, %val(1), , , , )
>       if(stat.eq.SS$_NORMAL.and.iosb(1).eq.SS$_ABORT) then
>         write(*,*) 'Arne you are too slow'
>         goto 100
>       end if
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
>       call sys$cantim(0, )
>       write(*,*) 'You entered code: ', buf
> 100   stat = sys$dassgn(%val(chan))
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       end
> c
>       subroutine ooops(stat)
>       implicit none
>       integer*4 stat
>       write(*,*) 'status = ', stat
>       stop
>       end
> c
>       subroutine done(chan)
>       implicit none
>       integer*2 chan
>       call sys$cancel(%val(chan))
>       return
>       end
>
> And then how I interpret your suggestion:
>
>       program r2
>       implicit none
>       include '($ssdef)'
>       include '($iodef)'
>       integer*1 buf(1)
>       integer*2 chan, iosb(4)
>       integer*4 stat, tmo
>       integer*8 tmo2
>       integer*4 sys$assign, sys$qio, sys$dassgn
>       external sys$assign, sys$qio, sys$dassgn
>       external done
>       stat = sys$assign('TT:', chan, , , )
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       tmo = 10
>       write(*,*) 'Press a key within ', tmo, ' seconds'
>       stat = sys$qio(, %val(chan), %val(IO$_READVBLK),
>      +               iosb, done, ,
>      +               buf, %val(1), , , , )
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       tmo2 = -tmo * 10000000
>       call sys$schdwk(, , tmo2, )
>       call sys$hiber()
>       if(iosb(1).eq.0) then
>         write(*,*) 'Arne you are too slow'
>         goto 100
>       end if
>       if(iosb(1).ne.SS$_NORMAL) call ooops(iosb(1))
>       write(*,*) 'You entered code: ', buf
> 100   stat = sys$dassgn(%val(chan))
>       if(stat.ne.SS$_NORMAL) call ooops(stat)
>       end
> c
>       subroutine ooops(stat)
>       implicit none
>       integer*4 stat
>       write(*,*) 'status = ', stat
>       stop
>       end
> c
>       subroutine done
>       implicit none
>       call sys$wake(, )
>       return
>       end
>
> And sorry for doing it in Fortran. But it would have taken me
> way more time to do in Cobol. And translating from Fortran to
> Cobol is probably easier than from C to Cobol. So Fortran
> it is.
>
> Arne
>
>
>

Will check, but yes, it sounds as we are on the same track.
And our I/O routines are in C and called from Cobol. But yes,
as far as I know, one could also write it in pure Cobol. :-)

The benefit with your timer/ast based solution is of course that,
when everything works fine (as it does in most cases), there is
no added delay in the routine. AS I thought, there would always
be the same delay no matter if it works or not.

Most doc examples are in C, so that is probably why the I/O
routine was written in C (in 1993 in this case).

We'll have a discussion. Now, even with wired connections, there
can be cases with powered off printers and such, so a better
error handling could be good apart from the Wifi issues.

Jan-Erik.

Re: Timeout in a write using QUIW.

<u70qv9$37ig7$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 08:50:17 +0200
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <u70qv9$37ig7$2@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
<u7009g$31lq1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 06:50:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189VlwXa98YBy03uMfgq0yd"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:I6LxHCF5TsYyS4sZovdCBK4JKQo=
In-Reply-To: <u7009g$31lq1$1@dont-email.me>
Content-Language: sv
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 06:50 UTC

Den 2023-06-22 kl. 01:16, skrev Dave Froble:
> On 6/21/2023 5:17 PM, Arne Vajhøj wrote:
>> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>>> When doing a *read* from a terminal device using QIOW, one
>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>> works perfectly and we use that a lot.
>>>
>>> Now, we are having issues with an application when *writing*
>>> to a terminal (TNA) device using QUIW that points to a small
>>> label printer. If the printer is offline or not accessable on
>>> the network, the application just hangs.
>>>
>>> As far as I can see, QIO/QIOW does not support a timeout value
>>> when used for writing, is that correct?
>>
>> Yes.
>>
>> https://vmssoftware.com/docs/VSI_IO_REF.pdf
>>
>> Table 5.6 lists IO$M_TIMED for IO$_READ* while table 5.8
>> does not list it for IO$_WRITE*.
>>
>>> I was hoping that one could add a timeout value just as in the
>>> read case, but it doesn't look so. So I do not see how to get
>>> out of the hanging call to QIOW. Maybe using QIO, and doing
>>> some extra coding to check the I/O, I guess.
>>>
>>> So, is there a way to get out of this state, still using QIOW?
>>
>> Totally untested idea:
>>
>> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>>
>> Arne
>>
>>
>
> Damn, Arne beat me to it.  However while I use that for reads, I've never
> used it for a write.  Don't know what would happen.  Best to test.
>

But for reads, it is easier to just add the timeout to the QIOW
call directly. No added code.

And thanks for you input!

Jan-Erik.

Re: Timeout in a write using QUIW.

<u70r6m$37ig7$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 08:54:15 +0200
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <u70r6m$37ig7$3@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
<u6vqm7$30d1k$3@dont-email.me> <u6vt13$31eb3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 22 Jun 2023 06:54:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vcPkJ3nZGFo2SqgtxxC4q"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:v5OltRctto73p9RvvcTu6h9ADy0=
Content-Language: sv
In-Reply-To: <u6vt13$31eb3$1@dont-email.me>
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 06:54 UTC

Den 2023-06-22 kl. 00:19, skrev Stephen Hoffman:
> On 2023-06-21 21:39:19 +0000, Jan-Erik Sderholm said:
>>
>> My thought was to just queue the I/O, wait a sec or two using $WAIT and
>> then check the IOSB. If not completed OK, CANCEL and return an error to
>> the application...
>>
>> We'll see. Hopefully we can convince them to install wired connections
>> instead of using Wifi...
>
> Yeah. I tried that in the 1980s. Learned that ASTs and threads and
> completion routines avoided a whole lot of the mess that the inevitable
> errors within sync I/O and networking involves. You're headed for some
> races here, too.
>
>

Yes, there are some "unknowns" in this. :-)
Equipment gets restarted or powered off. Network is "flaky".

Most of the reconnect issues are handled by the telnet driver
by creating TNA devices that are used for the communication.

The connections are reconnected after a equipment restart or
network autage automatically with no application involvment.

And the programming is easier by just pretending that all network
equipment are "terminals" having a TNA device.

Thanks for your input!

Jan-Erik.

Re: Timeout in a write using QUIW.

<b43923d3-93c2-4fca-9a98-f33bff05ab6an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ad4:57b2:0:b0:62d:e6f7:8e6a with SMTP id g18-20020ad457b2000000b0062de6f78e6amr3319369qvx.11.1687426725080;
Thu, 22 Jun 2023 02:38:45 -0700 (PDT)
X-Received: by 2002:ac8:5ac6:0:b0:3fd:e953:74e3 with SMTP id
d6-20020ac85ac6000000b003fde95374e3mr5086057qtd.4.1687426724863; Thu, 22 Jun
2023 02:38:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.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: Thu, 22 Jun 2023 02:38:44 -0700 (PDT)
In-Reply-To: <u70r6m$37ig7$3@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=100.2.137.132; posting-account=r2_qcwoAAACbIdit5Eka3ivGvrYZz7UQ
NNTP-Posting-Host: 100.2.137.132
References: <u6vngo$30d1k$1@dont-email.me> <u6vpcm$3101m$1@dont-email.me>
<u6vqm7$30d1k$3@dont-email.me> <u6vt13$31eb3$1@dont-email.me> <u70r6m$37ig7$3@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b43923d3-93c2-4fca-9a98-f33bff05ab6an@googlegroups.com>
Subject: Re: Timeout in a write using QUIW.
From: gezel...@rlgsc.com (Bob Gezelter)
Injection-Date: Thu, 22 Jun 2023 09:38:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2991
 by: Bob Gezelter - Thu, 22 Jun 2023 09:38 UTC

On Thursday, June 22, 2023 at 2:54:18 AM UTC-4, Jan-Erik Söderholm wrote:
> Den 2023-06-22 kl. 00:19, skrev Stephen Hoffman:
> > On 2023-06-21 21:39:19 +0000, Jan-Erik S derholm said:
> >>
> >> My thought was to just queue the I/O, wait a sec or two using $WAIT and
> >> then check the IOSB. If not completed OK, CANCEL and return an error to
> >> the application...
> >>
> >> We'll see. Hopefully we can convince them to install wired connections
> >> instead of using Wifi...
> >
> > Yeah. I tried that in the 1980s. Learned that ASTs and threads and
> > completion routines avoided a whole lot of the mess that the inevitable
> > errors within sync I/O and networking involves. You're headed for some
> > races here, too.
> >
> >
> Yes, there are some "unknowns" in this. :-)
> Equipment gets restarted or powered off. Network is "flaky".
>
> Most of the reconnect issues are handled by the telnet driver
> by creating TNA devices that are used for the communication.
>
> The connections are reconnected after a equipment restart or
> network autage automatically with no application involvment.
>
> And the programming is easier by just pretending that all network
> equipment are "terminals" having a TNA device.
>
> Thanks for your input!
>
> Jan-Erik.
Jan-Erik,

Definition of "network": Connections are subject to random/non-random interference.

Otherwise, I concur with Hoff. Use a Timer AST and cancel; with the "cancel pending" bit to avoid race conditions. The IO completion will occur, with the appropriate IO completion code in the IOSB.

- Bob Gezelter, http://www.rlgsc.com

Re: Timeout in a write using QUIW.

<u719n1$jk7$2@news.misty.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.10.184.180.213.static.wline.lns.sme.cust.swisscom.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 13:01:53 +0200
Organization: MGT Consulting
Message-ID: <u719n1$jk7$2@news.misty.com>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 11:01:53 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="10.184.180.213.static.wline.lns.sme.cust.swisscom.ch:213.180.184.10";
logging-data="20103"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.12.0
In-Reply-To: <u6vqhj$30d1k$2@dont-email.me>
 by: Johnny Billquist - Thu, 22 Jun 2023 11:01 UTC

On 2023-06-21 23:36, Jan-Erik Söderholm wrote:
> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>> On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:
>>
>>> Now, here is a technical one...
>>>
>>> When doing a *read* from a terminal device using QIOW, one
>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>> works perfectly and we use that a lot...
>>
>> I've never had great success...
>
>
> I'm sorry about that. As I wrote, it works perfectly. In the
> case of reads, of course, where it is supported.
>
> My question was about writes, and it has been confirmed that
> timeout paramaters are not supported there. Thanks Arne.
>
> Now we need to weight the coding work against getting
> network cables installed to the printers. Wired printers
> will also "solve" the issue with the current code. We have
> 15-20 older similar Zebra label printers, all wired, and
> we do not see these error scenarios with those.
> All using the same C routine for the QIOW calls.

I would think/hope the following works in VMS. It's a fairly common
trick in RSX anyway.

Issue the QIOW, as usual. But before, issue a mark time for the timeout
you want. For both of these, use the same event flag. The QIOW will wake
up either because the QIO completed, or the mark time expired. Check the
IOSB to see if the QIO completed.
Cancel the mark time anyway, so you don't have one lingering around in
case you want to do the same again. And if the QIO hadn't completed,
cancel it.

Johnny

Re: Timeout in a write using QUIW.

<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:8607:0:b0:763:a3e9:ba5e with SMTP id i7-20020a378607000000b00763a3e9ba5emr1163915qkd.3.1687433136738;
Thu, 22 Jun 2023 04:25:36 -0700 (PDT)
X-Received: by 2002:a05:622a:180f:b0:3ff:31c6:4a82 with SMTP id
t15-20020a05622a180f00b003ff31c64a82mr2513514qtc.2.1687433136368; Thu, 22 Jun
2023 04:25:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.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: Thu, 22 Jun 2023 04:25:36 -0700 (PDT)
In-Reply-To: <u6vqhj$30d1k$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=159.196.168.133; posting-account=ljjXiAgAAAA3eWtNZYnEiwKxkHjOOX9r
NNTP-Posting-Host: 159.196.168.133
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me> <u6vqhj$30d1k$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
Subject: Re: Timeout in a write using QUIW.
From: phow9...@gmail.com (Phil Howell)
Injection-Date: Thu, 22 Jun 2023 11:25:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3285
 by: Phil Howell - Thu, 22 Jun 2023 11:25 UTC

On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
> > On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
> >
> >> Now, here is a technical one...
> >>
> >> When doing a *read* from a terminal device using QIOW, one
> >> can use IO$M_TIMED and supply a timeout value in P3. That
> >> works perfectly and we use that a lot...
> >
> > I've never had great success...
>
>
> I'm sorry about that. As I wrote, it works perfectly. In the
> case of reads, of course, where it is supported.
>
> My question was about writes, and it has been confirmed that
> timeout paramaters are not supported there. Thanks Arne.
>
> Now we need to weight the coding work against getting
> network cables installed to the printers. Wired printers
> will also "solve" the issue with the current code. We have
> 15-20 older similar Zebra label printers, all wired, and
> we do not see these error scenarios with those.
> All using the same C routine for the QIOW calls.
>
>
> Jan-Erik.
While you cannot request a timeout on a WRITEVBLK
you may be able to workaround this by using READPROMPT
With this you get two i/o's in one call,
the first is a write of your "prompt" followed by a read on the same channel.
If you set up your "prompt" as the content of your label then do the qio call
it should write this to the device, then do the read, which you can check or ignore.
If you get a tt_timeout, then wait a bit and retry.
The most concise explanation of this is in wikipedia on the qio page.
The I/O user manual just goes on and on
You may have to increase the size of the typeahead buffer to cater for the size of your label
as well as managing all the usual qio stuff like buffer lengths, IOSBs, terminator masks, ASTs, etc.

If I was retiring in a couple of weeks I would recommend cabling up all the printers,
but it could be an interesting way of getting your successor to hate you?

Phil

Re: Timeout in a write using QUIW.

<u71df7$37ig7$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 14:05:59 +0200
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <u71df7$37ig7$4@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 12:05:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BrOsjXgN/3ajbZmoymWp8"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:OVgRQf3v+E9N7NEEITo/5/py8H4=
In-Reply-To: <b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
Content-Language: sv
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 12:05 UTC

Den 2023-06-22 kl. 13:25, skrev Phil Howell:
> On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
>> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>>> On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
>>>
>>>> Now, here is a technical one...
>>>>
>>>> When doing a *read* from a terminal device using QIOW, one
>>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>>> works perfectly and we use that a lot...
>>>
>>> I've never had great success...
>>
>>
>> I'm sorry about that. As I wrote, it works perfectly. In the
>> case of reads, of course, where it is supported.
>>
>> My question was about writes, and it has been confirmed that
>> timeout paramaters are not supported there. Thanks Arne.
>>
>> Now we need to weight the coding work against getting
>> network cables installed to the printers. Wired printers
>> will also "solve" the issue with the current code. We have
>> 15-20 older similar Zebra label printers, all wired, and
>> we do not see these error scenarios with those.
>> All using the same C routine for the QIOW calls.
>>
>>
>> Jan-Erik.
> While you cannot request a timeout on a WRITEVBLK
> you may be able to workaround this by using READPROMPT
> With this you get two i/o's in one call,
> the first is a write of your "prompt" followed by a read on the same channel.
> If you set up your "prompt" as the content of your label then do the qio call
> it should write this to the device, then do the read, which you can check or ignore.
> If you get a tt_timeout, then wait a bit and retry.
> The most concise explanation of this is in wikipedia on the qio page.
> The I/O user manual just goes on and on
> You may have to increase the size of the typeahead buffer to cater for the size of your label
> as well as managing all the usual qio stuff like buffer lengths, IOSBs, terminator masks, ASTs, etc.
>
> If I was retiring in a couple of weeks I would recommend cabling up all the printers,
> but it could be an interesting way of getting your successor to hate you?
>
> Phil
>
>

Hi. That was a nice way of "using" (or "mis-using" ? ) QIOW!
I'm actually leaving this place Friday next week, 30 June.

Right now, it seems as we'll simply get the printers hard-wired.
It is 6 printers that are on Wifi now, and our other 15-20 label
printers (all hard-wired) do not show the same error scenario.

Jan-Erik.

Re: Timeout in a write using QUIW.

<u71e70$peu$3@news.misty.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.10.184.180.213.static.wline.lns.sme.cust.swisscom.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 14:18:40 +0200
Organization: MGT Consulting
Message-ID: <u71e70$peu$3@news.misty.com>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
<u71df7$37ig7$4@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 12:18:40 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="10.184.180.213.static.wline.lns.sme.cust.swisscom.ch:213.180.184.10";
logging-data="26078"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.12.0
In-Reply-To: <u71df7$37ig7$4@dont-email.me>
 by: Johnny Billquist - Thu, 22 Jun 2023 12:18 UTC

On 2023-06-22 14:05, Jan-Erik Söderholm wrote:
> Den 2023-06-22 kl. 13:25, skrev Phil Howell:
>> On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
>>> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>>>> On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
>>>>
>>>>> Now, here is a technical one...
>>>>>
>>>>> When doing a *read* from a terminal device using QIOW, one
>>>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>>>> works perfectly and we use that a lot...
>>>>
>>>> I've never had great success...
>>>
>>>
>>> I'm sorry about that. As I wrote, it works perfectly. In the
>>> case of reads, of course, where it is supported.
>>>
>>> My question was about writes, and it has been confirmed that
>>> timeout paramaters are not supported there. Thanks Arne.
>>>
>>> Now we need to weight the coding work against getting
>>> network cables installed to the printers. Wired printers
>>> will also "solve" the issue with the current code. We have
>>> 15-20 older similar Zebra label printers, all wired, and
>>> we do not see these error scenarios with those.
>>> All using the same C routine for the QIOW calls.
>>>
>>>
>>> Jan-Erik.
>> While you cannot request a timeout on a WRITEVBLK
>> you may be able to workaround this by using READPROMPT
>> With this you get two i/o's in one call,
>> the first is a write of your "prompt" followed by a read on the same
>> channel.
>> If you set up your "prompt" as the content of your label then do the
>> qio call
>> it should write this to the device, then do the read, which you can
>> check or ignore.
>> If you get a tt_timeout, then wait a bit and retry.
>> The most concise explanation of this is in wikipedia on the qio page.
>> The I/O user manual just goes on and on
>> You may have to increase the size of the typeahead buffer to cater for
>> the size of your label
>> as well as managing all the usual qio stuff like buffer lengths,
>> IOSBs, terminator masks, ASTs, etc.
>>
>> If I was retiring in a couple of weeks I would recommend cabling up
>> all the printers,
>> but it could be an interesting way of getting your successor to hate you?
>>
>> Phil
>>
>
> Hi. That was a nice way of "using" (or "mis-using" ? ) QIOW!
> I'm actually leaving this place Friday next week, 30 June.
>
> Right now, it seems as we'll simply get the printers hard-wired.
> It is 6 printers that are on Wifi now, and our other 15-20 label
> printers (all hard-wired) do not show the same error scenario.

Unless you are expecting some input, won't this mean you *always* get a
timeout. So even something that prints, and completes in no time, will
only return when the timeout happens.

Seems the wrong way to go about it. Not to mention you better be sure
the read timeout applies even if the write part haven't completed.

(I much prefer using the same EF for both mark time and read. :) )

Johnny

Re: Timeout in a write using QUIW.

<u71ehf$39uls$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 12:24:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <u71ehf$39uls$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 12:24:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f9729fff18e552e69d25208f8b6f120";
logging-data="3472060"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+t5Qjmp7GaZPVO+fUISA6AZLNIL+X0CUI="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:hIxFCB5X+x6an4T5uCIRmqutv3s=
 by: Simon Clubley - Thu, 22 Jun 2023 12:24 UTC

On 2023-06-21, Jan-Erik Söderholm <jan-erik.soderholm@telia.com> wrote:
>
> Now, we are having issues with an application when *writing*
> to a terminal (TNA) device using QUIW that points to a small
> label printer. If the printer is offline or not accessable on
> the network, the application just hangs.
>

[snip]

>
> These are new printers where they decided to use Wifi
> instead of wired connection. We do not see these issues
> on our older label printers which are all hard wired...
>
> I will of course again suggest that they do take the cost to
> ask for wired network connections instead of using Wifi...
>
> I also fixed a COM file that pings these 7 printers once each
> 10 seconds, and it clearly shows that the connections comes
> and goes more or less all the time. And when that happens to
> be the same time as they try to print a label, it just hangs...
>

Others have given you some excellent workarounds, but I am more
interested in _why_ you have the problem in the first place.

First off, it's not fully clear, but are these label printers
directly on the network, with their own IP address, instead of
via a terminal server ? I am assuming they are directly on the
network for the rest of this post.

It sounds like you have a permanent TCP/IP connection to the
printers via reverse telnet. In that case, do you have keepalive
packets from VMS enabled on the connection ?

If you do, but the keepalive interval is 75 seconds or greater,
try reducing it to 30 seconds in case the printers are going into
some wireless low-power mode after a short period of time of network
inactivity.

(30 seconds is what I tell ssh to use for keepalive packets when
I use WAN connections, and it seems like a reasonable value to me.)

If that works, look to see if the printers have some low-power settings
that can be adjusted or disabled.

The keepalives should end up with the telnet connection being dropped
by VMS on failure, so that you can reconnect.

Is there anyway you can do the telnet connection on demand and then
tear it down again immediately afterwards, instead of keeping it open
all the time, even when you are not printing labels ?

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Timeout in a write using QUIW.

<u71fgm$37ig7$5@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 14:40:54 +0200
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <u71fgm$37ig7$5@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
<u71df7$37ig7$4@dont-email.me> <u71e70$peu$3@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 12:40:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eFzdDUOMlKeOkCyB3wD+T"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:u7UDNOr60jEvPacljOxS3GnhiBk=
Content-Language: sv
In-Reply-To: <u71e70$peu$3@news.misty.com>
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 12:40 UTC

Den 2023-06-22 kl. 14:18, skrev Johnny Billquist:
> On 2023-06-22 14:05, Jan-Erik Söderholm wrote:
>> Den 2023-06-22 kl. 13:25, skrev Phil Howell:
>>> On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
>>>> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>>>>> On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
>>>>>
>>>>>> Now, here is a technical one...
>>>>>>
>>>>>> When doing a *read* from a terminal device using QIOW, one
>>>>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>>>>> works perfectly and we use that a lot...
>>>>>
>>>>> I've never had great success...
>>>>
>>>>
>>>> I'm sorry about that. As I wrote, it works perfectly. In the
>>>> case of reads, of course, where it is supported.
>>>>
>>>> My question was about writes, and it has been confirmed that
>>>> timeout paramaters are not supported there. Thanks Arne.
>>>>
>>>> Now we need to weight the coding work against getting
>>>> network cables installed to the printers. Wired printers
>>>> will also "solve" the issue with the current code. We have
>>>> 15-20 older similar Zebra label printers, all wired, and
>>>> we do not see these error scenarios with those.
>>>> All using the same C routine for the QIOW calls.
>>>>
>>>>
>>>> Jan-Erik.
>>> While you cannot request a timeout on a WRITEVBLK
>>> you may be able to workaround this by using READPROMPT
>>> With this you get two i/o's in one call,
>>> the first is a write of your "prompt" followed by a read on the same
>>> channel.
>>> If you set up your "prompt" as the content of your label then do the qio
>>> call
>>> it should write this to the device, then do the read, which you can
>>> check or ignore.
>>> If you get a tt_timeout, then wait a bit and retry.
>>> The most concise explanation of this is in wikipedia on the qio page.
>>> The I/O user manual just goes on and on
>>> You may have to increase the size of the typeahead buffer to cater for
>>> the size of your label
>>> as well as managing all the usual qio stuff like buffer lengths, IOSBs,
>>> terminator masks, ASTs, etc.
>>>
>>> If I was retiring in a couple of weeks I would recommend cabling up all
>>> the printers,
>>> but it could be an interesting way of getting your successor to hate you?
>>>
>>> Phil
>>>
>>
>> Hi. That was a nice way of "using" (or "mis-using" ? ) QIOW!
>> I'm actually leaving this place Friday next week, 30 June.
>>
>> Right now, it seems as we'll simply get the printers hard-wired.
>> It is 6 printers that are on Wifi now, and our other 15-20 label
>> printers (all hard-wired) do not show the same error scenario.
>
> Unless you are expecting some input, won't this mean you *always* get a
> timeout. So even something that prints, and completes in no time, will only
> return when the timeout happens.
>
> Seems the wrong way to go about it. Not to mention you better be sure the
> read timeout applies even if the write part haven't completed.
>
> (I much prefer using the same EF for both mark time and read. :) )
>
>   Johnny
>

Yes, right. That is a problem.
On the other hard wired printers we simply do a WRITEVBLK.
We have very few issues, since the network is always "up".

Re: Timeout in a write using QUIW.

<u71g3n$37ig7$6@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 14:51:03 +0200
Organization: A noiseless patient Spider
Lines: 97
Message-ID: <u71g3n$37ig7$6@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u71ehf$39uls$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 12:51:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wY3FTK+tM01cFWHuZ15tZ"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:u8t+fZsmb7KLADUIYfK3fh/ImlU=
Content-Language: sv
In-Reply-To: <u71ehf$39uls$1@dont-email.me>
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 12:51 UTC

Den 2023-06-22 kl. 14:24, skrev Simon Clubley:
> On 2023-06-21, Jan-Erik Söderholm <jan-erik.soderholm@telia.com> wrote:
>>
>> Now, we are having issues with an application when *writing*
>> to a terminal (TNA) device using QUIW that points to a small
>> label printer. If the printer is offline or not accessable on
>> the network, the application just hangs.
>>
>
> [snip]
>
>>
>> These are new printers where they decided to use Wifi
>> instead of wired connection. We do not see these issues
>> on our older label printers which are all hard wired...
>>
>> I will of course again suggest that they do take the cost to
>> ask for wired network connections instead of using Wifi...
>>
>> I also fixed a COM file that pings these 7 printers once each
>> 10 seconds, and it clearly shows that the connections comes
>> and goes more or less all the time. And when that happens to
>> be the same time as they try to print a label, it just hangs...
>>
>
> Others have given you some excellent workarounds, but I am more
> interested in _why_ you have the problem in the first place.
>
> First off, it's not fully clear, but are these label printers
> directly on the network, with their own IP address, instead of
> via a terminal server ? I am assuming they are directly on the
> network for the rest of this post.

Sure, there own IP addresses (on one of the Wifi subnets).

>
> It sounds like you have a permanent TCP/IP connection to the
> printers via reverse telnet. In that case, do you have keepalive
> packets from VMS enabled on the connection ?

We use the "reconnect" options when creating the TNA device. So that
(at least normally) any activity from VMS will init an automatic
re-connect, should the link have been disconnected.
But that of course depends on that the other end is available
at that point in time.

>
> If you do, but the keepalive interval is 75 seconds or greater,
> try reducing it to 30 seconds in case the printers are going into
> some wireless low-power mode after a short period of time of network
> inactivity.

I do not think it is that kind of issues. We have a ping routine
that is pinging these addresses in a loop each 10 seconds.
And that shows that they sometimes gets anavailable. No specific
pattern, just that it happens all over the day.

>
> (30 seconds is what I tell ssh to use for keepalive packets when
> I use WAN connections, and it seems like a reasonable value to me.)
>
> If that works, look to see if the printers have some low-power settings
> that can be adjusted or disabled.
>
> The keepalives should end up with the telnet connection being dropped
> by VMS on failure, so that you can reconnect.
>
> Is there anyway you can do the telnet connection on demand and then
> tear it down again immediately afterwards, instead of keeping it open
> all the time, even when you are not printing labels ?

The TCP connection as such is opened when VMS has anything to send and
disconnected aftarwards. So each label printout involves a full
connect/print/disconnect on the TCP level (as can be seen in OPERATOR.LOG).

The issue seems to be if one of the (short) Wifi outages happens to
be at the same time as VMS tries to print a label. Then it looks up.

Anyway, it seems as hard wiring these printers seems to be the
route forward right now.

Thanks for you points!

And as I said before, after Friday next week, this is not my problem
anymore... :-) And again, VMS was never replaced with anything, that
is not why I'm leaving. My contract was simply not renewed.

Jan-Erik.

>
> Simon.
>

Re: Timeout in a write using QUIW.

<73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:bc4:b0:62f:f2de:47f0 with SMTP id ff4-20020a0562140bc400b0062ff2de47f0mr3043465qvb.10.1687438481162;
Thu, 22 Jun 2023 05:54:41 -0700 (PDT)
X-Received: by 2002:a05:620a:84c3:b0:763:a36e:19bc with SMTP id
pq3-20020a05620a84c300b00763a36e19bcmr1195656qkn.5.1687438480807; Thu, 22 Jun
2023 05:54:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.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: Thu, 22 Jun 2023 05:54:40 -0700 (PDT)
In-Reply-To: <u71df7$37ig7$4@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=159.196.168.133; posting-account=ljjXiAgAAAA3eWtNZYnEiwKxkHjOOX9r
NNTP-Posting-Host: 159.196.168.133
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me> <b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
<u71df7$37ig7$4@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com>
Subject: Re: Timeout in a write using QUIW.
From: phow9...@gmail.com (Phil Howell)
Injection-Date: Thu, 22 Jun 2023 12:54:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4964
 by: Phil Howell - Thu, 22 Jun 2023 12:54 UTC

On Thursday, 22 June 2023 at 10:06:02 pm UTC+10, Jan-Erik Söderholm wrote:
> Den 2023-06-22 kl. 13:25, skrev Phil Howell:
> > On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
> >> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
> >>> On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
> >>>
> >>>> Now, here is a technical one...
> >>>>
> >>>> When doing a *read* from a terminal device using QIOW, one
> >>>> can use IO$M_TIMED and supply a timeout value in P3. That
> >>>> works perfectly and we use that a lot...
> >>>
> >>> I've never had great success...
> >>
> >>
> >> I'm sorry about that. As I wrote, it works perfectly. In the
> >> case of reads, of course, where it is supported.
> >>
> >> My question was about writes, and it has been confirmed that
> >> timeout paramaters are not supported there. Thanks Arne.
> >>
> >> Now we need to weight the coding work against getting
> >> network cables installed to the printers. Wired printers
> >> will also "solve" the issue with the current code. We have
> >> 15-20 older similar Zebra label printers, all wired, and
> >> we do not see these error scenarios with those.
> >> All using the same C routine for the QIOW calls.
> >>
> >>
> >> Jan-Erik.
> > While you cannot request a timeout on a WRITEVBLK
> > you may be able to workaround this by using READPROMPT
> > With this you get two i/o's in one call,
> > the first is a write of your "prompt" followed by a read on the same channel.
> > If you set up your "prompt" as the content of your label then do the qio call
> > it should write this to the device, then do the read, which you can check or ignore.
> > If you get a tt_timeout, then wait a bit and retry.
> > The most concise explanation of this is in wikipedia on the qio page.
> > The I/O user manual just goes on and on
> > You may have to increase the size of the typeahead buffer to cater for the size of your label
> > as well as managing all the usual qio stuff like buffer lengths, IOSBs, terminator masks, ASTs, etc.
> >
> > If I was retiring in a couple of weeks I would recommend cabling up all the printers,
> > but it could be an interesting way of getting your successor to hate you?
> >
> > Phil
> >
> >
> Hi. That was a nice way of "using" (or "mis-using" ? ) QIOW!
> I'm actually leaving this place Friday next week, 30 June.
>
> Right now, it seems as we'll simply get the printers hard-wired.
> It is 6 printers that are on Wifi now, and our other 15-20 label
> printers (all hard-wired) do not show the same error scenario.
>
> Jan-Erik.
That does seem the more expedient solution.
Of the regular posters here, you must be one of the few that has
a real live job running VMS, so I'm sorry to see another one go,
soon it will only be retirees, hobbyists, consultants and contractors here.
Funnily enough I have a long history with label printers,
firstly on VAX with LA75 used with VT. terminals as "slave" printers,
then high speed Zebra printers for long print runs.
On Alpha we used various brands with varying success but eventually
standardised on "Blaster Advantage" RJ45 networked printers.
These were expensive, but pretty rugged and reliable
These printers also were able to interpret the Zebra language (ZPL)
so our label print files were about 8 lines of ascii test sent via telnet.
Barcodes and QR codes were able to be added easily as the printer did all the work!
Phil

Re: Timeout in a write using QUIW.

<u71h5p$37ig7$7@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 15:09:13 +0200
Organization: A noiseless patient Spider
Lines: 98
Message-ID: <u71h5p$37ig7$7@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
<u71df7$37ig7$4@dont-email.me>
<73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 13:09:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5193f4f5a6a8e97a1ff0f2318fa0809";
logging-data="3394055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+imqWgibLehOOE6GllguI8"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:H4arv8EiPBNi0cZpQHuC+kTosuc=
In-Reply-To: <73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com>
Content-Language: sv
 by: Jan-Erik Söderholm - Thu, 22 Jun 2023 13:09 UTC

Den 2023-06-22 kl. 14:54, skrev Phil Howell:
> On Thursday, 22 June 2023 at 10:06:02 pm UTC+10, Jan-Erik Söderholm wrote:
>> Den 2023-06-22 kl. 13:25, skrev Phil Howell:
>>> On Thursday, 22 June 2023 at 7:36:54 am UTC+10, Jan-Erik Söderholm wrote:
>>>> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>>>>> On 2023-06-21 20:45:12 +0000, Jan-Erik S derholm said:
>>>>>
>>>>>> Now, here is a technical one...
>>>>>>
>>>>>> When doing a *read* from a terminal device using QIOW, one
>>>>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>>>>> works perfectly and we use that a lot...
>>>>>
>>>>> I've never had great success...
>>>>
>>>>
>>>> I'm sorry about that. As I wrote, it works perfectly. In the
>>>> case of reads, of course, where it is supported.
>>>>
>>>> My question was about writes, and it has been confirmed that
>>>> timeout paramaters are not supported there. Thanks Arne.
>>>>
>>>> Now we need to weight the coding work against getting
>>>> network cables installed to the printers. Wired printers
>>>> will also "solve" the issue with the current code. We have
>>>> 15-20 older similar Zebra label printers, all wired, and
>>>> we do not see these error scenarios with those.
>>>> All using the same C routine for the QIOW calls.
>>>>
>>>>
>>>> Jan-Erik.
>>> While you cannot request a timeout on a WRITEVBLK
>>> you may be able to workaround this by using READPROMPT
>>> With this you get two i/o's in one call,
>>> the first is a write of your "prompt" followed by a read on the same channel.
>>> If you set up your "prompt" as the content of your label then do the qio call
>>> it should write this to the device, then do the read, which you can check or ignore.
>>> If you get a tt_timeout, then wait a bit and retry.
>>> The most concise explanation of this is in wikipedia on the qio page.
>>> The I/O user manual just goes on and on
>>> You may have to increase the size of the typeahead buffer to cater for the size of your label
>>> as well as managing all the usual qio stuff like buffer lengths, IOSBs, terminator masks, ASTs, etc.
>>>
>>> If I was retiring in a couple of weeks I would recommend cabling up all the printers,
>>> but it could be an interesting way of getting your successor to hate you?
>>>
>>> Phil
>>>
>>>
>> Hi. That was a nice way of "using" (or "mis-using" ? ) QIOW!
>> I'm actually leaving this place Friday next week, 30 June.
>>
>> Right now, it seems as we'll simply get the printers hard-wired.
>> It is 6 printers that are on Wifi now, and our other 15-20 label
>> printers (all hard-wired) do not show the same error scenario.
>>
>> Jan-Erik.
> That does seem the more expedient solution.
> Of the regular posters here, you must be one of the few that has
> a real live job running VMS, so I'm sorry to see another one go,
> soon it will only be retirees, hobbyists, consultants and contractors here.
> Funnily enough I have a long history with label printers,
> firstly on VAX with LA75 used with VT. terminals as "slave" printers,
> then high speed Zebra printers for long print runs.
> On Alpha we used various brands with varying success but eventually
> standardised on "Blaster Advantage" RJ45 networked printers.
> These were expensive, but pretty rugged and reliable
> These printers also were able to interpret the Zebra language (ZPL)
> so our label print files were about 8 lines of ascii test sent via telnet.
> Barcodes and QR codes were able to be added easily as the printer did all the work!
> Phil
>

I have used (written ZPL code to) Zebra printers since early 90s.
Quite nice printers. I have been in the manufacturing business,
first 20 years at an Ericsson factory as employed and the last
17 years as a contractor at another factory.

Always with production support incl. label printers, barcode
scanners, traceability, reporting from lines and so on.

When I started at this site in 2006, the VMS system was going
to be replaced “in 3-4 years”. That have stayed like that all up
to today when it now is “in 4-5 years”.

If we in 2006 had known that we would still be running the same
system, we might have taken some other decisions over the years, and
not still run the same (physically) servers that I installed in 2006.

They now have said that the VMS systems can be left to the Indian
company that they have an agreement with.
I’d say that “the jury is still out” on that one… 😊

I will not close my company yet, I’ll keep it “live” if something pops up.
First there is a summer vacation and after that we’ll see…

Jan-Erik.

Re: Timeout in a write using QUIW.

<u71i1p$3acoq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 13:24:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u71i1p$3acoq$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me> <u6vqhj$30d1k$2@dont-email.me> <b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com> <u71df7$37ig7$4@dont-email.me> <73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com> <u71h5p$37ig7$7@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 13:24:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f9729fff18e552e69d25208f8b6f120";
logging-data="3486490"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ymMD/Xq9gLo5K8mSbCyX5AbGaEn+OQe4="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:TnnBEynJdmLd1JeAhZm1Ch1t9g0=
 by: Simon Clubley - Thu, 22 Jun 2023 13:24 UTC

On 2023-06-22, Jan-Erik Söderholm <jan-erik.soderholm@telia.com> wrote:
>
> They now have said that the VMS systems can be left to the Indian
> company that they have an agreement with.
> I?d say that ?the jury is still out? on that one? ?
>

Hmmm. I would suggest you find some way to permanently document the
system and network configuration at the time you left, so that if they
screw it up, they can't try blaming it on you.

> I will not close my company yet, I?ll keep it ?live? if something pops up.
> First there is a summer vacation and after that we?ll see?
>

Whatever you do next, make sure you enjoy yourself. :-)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Timeout in a write using QUIW.

<u7204v$3c7iq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 13:25:59 -0400
Organization: A noiseless patient Spider
Lines: 121
Message-ID: <u7204v$3c7iq$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me> <u701jn$31pfd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 17:24:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="088a2aace57d2e02beeab9158c4341bf";
logging-data="3546714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196vUf5Q/eF5cK2QyaKvA2Xbp7BiUr8w6k="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:eQ6H9RP6Jof9bjTJc3AHmD7K7ls=
In-Reply-To: <u701jn$31pfd$1@dont-email.me>
 by: Dave Froble - Thu, 22 Jun 2023 17:25 UTC

On 6/21/2023 7:38 PM, Dave Froble wrote:
> On 6/21/2023 5:36 PM, Jan-Erik Söderholm wrote:
>> Den 2023-06-21 kl. 23:25, skrev Stephen Hoffman:
>>> On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:
>>>
>>>> Now, here is a technical one...
>>>>
>>>> When doing a *read* from a terminal device using QIOW, one
>>>> can use IO$M_TIMED and supply a timeout value in P3. That
>>>> works perfectly and we use that a lot...
>>>
>>> I've never had great success...
>>
>>
>> I'm sorry about that. As I wrote, it works perfectly. In the
>> case of reads, of course, where it is supported.
>>
>> My question was about writes, and it has been confirmed that
>> timeout paramaters are not supported there. Thanks Arne.
>>
>> Now we need to weight the coding work against getting
>> network cables installed to the printers. Wired printers
>> will also "solve" the issue with the current code. We have
>> 15-20 older similar Zebra label printers, all wired, and
>> we do not see these error scenarios with those.
>> All using the same C routine for the QIOW calls.
>>
>>
>> Jan-Erik.
>
>
> Well, if you have an AST routine such as:
>
> 1 !************************************************
> ! Timer AST Timeout Handler to Cancel I/O
> !************************************************
>
> SUB TCP_TIMER( LONG CH% , &
> LONG Z2% , &
> LONG Z3% , &
> LONG Z4% , &
> LONG Z5% )
>
> CALL SYS$CANCEL( Loc(CH%) By Value )
>
> SubEnd
>
> And then in you program define the routine as external:
>
> EXTERNAL LONG FUNCTION TCP_TIMER ! Timer AST routine
>
> And then queue the timer routine:
>
> !***************** Set timer AST *****************
> Stat% = SYS$SETIMR( , WAIT.PRD , ! Delta time &
> LOC(TCP_TIMER) By Value , &
> CH% By Value , ) ! AST rtn and channel

This code has been working well for years, and I hadn't looked at it until
recently. I find the lack of testing the completion status of the system
service to be sloppy. One might ask, "what can go wrong?", and probably will
not, but it is possible, I think. So, a better practice would be to at least
test Stat% AND SS$_NORMAL. Just saying ...

> Stat% = SYS$QIOW( , ! Event flag &
> CH% By Value, ! VMS channel &
> IO$_ACCESS By Value, ! Operation &
> IOSB::Stat%, ! I/O status block &
> , ! AST routine &
> , ! AST parameter &
> , ! P1 &
> , ! P2 &
> SERVER.ITEMLST::LEN%, ! P3 - remote socket n^
> , ! P4 - &
> , ! P5 &
> ) ! P6
>
> If ( Stat% And SS$_NORMAL ) = 0%
> Then Call VMSERR( Stat% , E$ )
> E$ = "Unable to queue connect to host - " + E$
> E% = -1%
> SaveStat% = Stat%
> GoTo Close_Socket
> End If
>
> If ( IOSB::Stat% And SS$_NORMAL ) = 0%
> Then If IOSB::Stat% = SS$_ABORT &
> OR IOSB::Stat% = SS$_CANCEL
> Then E$ = "Timeout"
> Else Call VMSERR( IOSB::Stat% , E$ )
> End If
> E$ = "Unable to connect to host - " + E$
> E% = -1%
> SaveStat% = IOSB::Stat%
> GoTo Close_Socket
> End If
>
> Note, if the QIOW exits with the IOSB status of ABORT or CANCEL then you can
> assume it was the cancel in the AST routine. However, I feel that some other
> reason might set that status. Never bothered to look into it further.
>
> My planning is that if this happens, then the QIOW failed, and it's time to move
> on, regardless of why it failed.
>
> Note, the wait period can be set up with:
>
> WW% = W% ! Set delta time
> Stat% = LIB$CVT_TO_INTERNAL_TIME( LIB$K_DELTA_SECONDS , WW% , WAIT.PRD )
>
> Should be easy to figure out by reading the docs on the various system services
> and LIB$ routines.
>

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Timeout in a write using QUIW.

<u72ldd$3ep8v$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Timeout in a write using QUIW.
Date: Thu, 22 Jun 2023 19:27:43 -0400
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <u72ldd$3ep8v$1@dont-email.me>
References: <u6vngo$30d1k$1@dont-email.me> <u6vpsc$311od$1@dont-email.me>
<u6vqhj$30d1k$2@dont-email.me>
<b3f31de9-c61d-427c-a4f3-4a4dd592a3f7n@googlegroups.com>
<u71df7$37ig7$4@dont-email.me>
<73543a1d-2c00-44d9-88fb-742a30859ee4n@googlegroups.com>
<u71h5p$37ig7$7@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Jun 2023 23:27:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e3dbc36b43a6bef2356ade564a923cb7";
logging-data="3630367"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R6HUgl0Aoz88CKdQiVku3SjbVsvbkJkE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:1VVaHWgaUUHL2C8hQLP7XEA/29w=
Content-Language: en-US
In-Reply-To: <u71h5p$37ig7$7@dont-email.me>
 by: Arne Vajhøj - Thu, 22 Jun 2023 23:27 UTC

On 6/22/2023 9:09 AM, Jan-Erik Söderholm wrote:
> They now have said that the VMS systems can be left to the Indian
> company that they have an agreement with.
> I’d say that “the jury is still out” on that one… 😊

I predict problems.

Based on what you have posted over the years then they will
need people with skills in: VMS system management,
Cobol, Rdb, VMS programming (system services), Python,
WASD, message queues.

That means either a rare skill combo or a mid size team.

Arne

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor