Operating System - OpenVMS
1748163 Members
3822 Online
108758 Solutions
New Discussion юеВ

Re: What does the return status of 20 mean from a SYS$QIOW?

 
SOLVED
Go to solution
Eric Boyer
New Member

What does the return status of 20 mean from a SYS$QIOW?


J_STATUS = SYS$ASSIGN('_NTY109:', I_CHANNEL,,)I_FUNCTION = IO$_TTY_PORT .OR. IO$M_LT_CONNECT
J_STATUS = SYS$QIOW(,
1 %VAL(I_CHANNEL),
2 %VAL(I_FUNCTION),
3 I_IOSB,
4 ,,,,,,,)

I get a 20 from the SYS$QIOW call and I am wondering what that means?
16 REPLIES 16
Craig A Berry
Honored Contributor
Solution

Re: What does the return status of 20 mean from a SYS$QIOW?

$ write sys$output f$message(20)
%SYSTEM-F-BADPARAM, bad parameter value

It doesn't like one of your parameters. You might start by checking the return status from SYS$ASSIGN to see if you really got a channel assigned. Examining all the parameters in the debugger immediately before the call is the best way to see whether you're really giving it what you think you're giving it.

Ken Robinson
Valued Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

Is the a decimal 20 or a HEX 20. If it was a Hex 20, then the error is

%SYSTEM-W-NOPRIV, insufficient privilege or object protection violation

Check that you have the proper privileges to do what you want.

Ken
Hoff
Honored Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

Do consider verifying j_status (as an odd -- the $assign worked -- or as even -- it failed) value, before continuing; check the low bit of the $assign return. Failure to check return values can derail subsequent processing in strange and interesting ways.

Here's an example of calling $qio from Fortran:

http://h71000.www7.hp.com/wizard/wiz_6642.html

Here's an example of the LAT connection from Fortran:

http://vmsone.com/~decuslib/vmssig/vms94a/dsj/comm.vax

That file is a Fortran source file; ignore the .vax extension and open it as text.

Stephen Hoffman
HoffmanLabs LLC
Dean McGorrill
Valued Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

hi Eric,
hoff's example is a good one, careful of
the placeholder commas. As suggested, compile and link with the debugger and examine
the parameters just before stepping into the
qio call (or assign for that matter) good luck -Dean
Eric Boyer
New Member

Re: What does the return status of 20 mean from a SYS$QIOW?

The assign seems to work fine. I get a one return from the assign. When an bogus device is enter, I get a zero. So, i think it is not my problem.

Is there any special compile or linking that needs to be done.

Currently I just use fortran and link.

Any suggest on what I can try to verify assign works beside looking at return status.
Jim_McKinney
Honored Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

Migrating from LAT to IP?

Looks like your using a LAT modifier on the QIO to a telnet device - don't think that's permissible. My recollection (which could be off) is that the LAT modifiers were only valid on LAT devices. If that's the case then it's likely the cause of your "bad parameter" return status from the QIO.
Richard Brodie_1
Honored Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

If you have the TELNET device already mapped to a remote port, you might find that omitting the $QIOW is the correct fix.
Hein van den Heuvel
Honored Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

>> The assign seems to work fine. I get a one return from the assign. When an bogus device is enter, I get a zero.

fwiw, Zero is NOT a valid return status for a system service on OpenVMS. Low-bit zero is, but there has to be something in those other bits to indicate, notably 316 = IVCHAN

btw... was that 20 hex or decimal?
I suspect decimal for: %SYSTEM-F-BADPARAM, bad parameter value
The parameter being the function code.

Hein.
Richard Brodie_1
Honored Contributor

Re: What does the return status of 20 mean from a SYS$QIOW?

If you get a zero return status, you probably are implicitly typing SYS$ASSIGN as a float, and using a junk status from F0.