Operating System - OpenVMS
1748169 Members
4044 Online
108758 Solutions
New Discussion

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

 
abrsvc
Respected Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

I believe that the root problem is that the parameters are passed incorrectly.  In Hein's example the name_desc is listed as follows: &name_desc.  In the initially posted snippet, the same parameter is passed as: name_desc.  Please note the lack of the & character in the parameter definition.  The & indicates to pass the argument by reference.  In other words, the adderss of name_desc is passed to the QIO rather than the value of name_desc. Using this as an example, I suspect that one or more of the variables passed to the QIO should have been an address rather than a value.

 

I would check that first.

 

Dan

allin-in-one
Frequent Advisor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

Have ever heard about the product called "all-in-one" or "file cabinet server" on the OpenVMS ?  What is your experience in OpenVMS ?  for your information GBC (Global buffer count ) is not the variable causing the file creation error.

 

Can you answer me when IOSB ( one of the argument to sys$qiow )will return SYSTEM-F-BADPARAM ?

 

I think it is simple and straight forward question those who are familiar with OpenVMS.

 

abrsvc
Respected Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

A QIO will return that value when the passed parameter is invalid. Depending upon the recipient of the IO request, parameters are checked in different ways. Without knowing which of the parameters is causing the problem, I can't provide more details.


If you can create a small reproducer and post it, I will track it down.

Dan
Steven Schweda
Honored Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

 
Steven Schweda
Honored Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

 
John McL
Trusted Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

>Have ever heard about the product called "all-in-one" or "file cabinet server" on the OpenVMS ?  What is your experience >in OpenVMS ?  for your information GBC (Global buffer count ) is not the variable causing the file creation error.

 

Yes, it was an office automation package that dates from the late 1970s.  So what?

 

> Can you answer me when IOSB ( one of the argument to sys$qiow )will return SYSTEM-F-BADPARAM ?

 

As you have been told, it is when a parameter is acceptable to the $QIO routine but not to something it calls.  As you have been told, those _desc variables probably should be &xxx_desc because an address muct be passed.  (We cannot be certain because despite repeated requested you have still not posted your code or an extract from it that shows the definition of the variables, how they are set and how they are used in the call. 

 

> I think it is simple and straight forward question those who are familiar with OpenVMS.

 

Many of us are very familiar with VMS, we are not however clairvoyant.  We cannot see what your code is doing because and you haven't posted it.

 

Jur van der Burg
Respected Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

Your parameters look bad, just what the return status says. fib_desc, name_desc, res_desc and atr need addresses of descriptors so they all need to have an & in front of them (unless they are pointers already), but given the naming and normal practices it is unlikely. Posting the real code would help.

And make sure that rlen is declared as a word (short) and not an int to prevent surprises.

 

And what about this:


               (unsigned short *) iosb,   /* I/O status block */

 

That should be the pointer to a quadword. If it's declared as unsigned short then the 3 words that follow it will be overwritten with possible nasty surpirses.


From the doc:

The following are the device- or function-dependent arguments for IO$_ACCESS:

    P1--The address of the file information block (FIB) descriptor.
    P2--The address of the file name string descriptor (optional).
    P3--The address of the word that is to receive the length of the resultant file name string (optional).
    P4--The address of a descriptor for a buffer that is to receive the resultant file name string (optional).
    P5--The address of a list of attribute descriptors (optional).

Fwiw,

 

Jur.

 

 
allin-in-one
Frequent Advisor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

Thank you all for help.

 

The problem is in  P1--The address of the file information block (FIB) descriptor. Where variable "fib->fib$w_verlimit" is greater than 32767.

 

Once again Thank you.

Brad McCusker
Respected Contributor

Re: System call sys$qiow returning "SYSTEM-F-BADPARAM", i.e.. bad parameter value

>What is your experience in OpenVMS ?

 

Wow.  Someone comes to this forum asking for help and then starts to question the qualifications of those trying to provide that help?  I find that behavior to be obnoxiously arrogant.

 

For your information Mr/s. All-in-One, at least three of the people trying to help you in this very thread are known to me to have their names in the code found on the OpenVMS Masterpack.   That's right, the folks trying to help you here are the people who have written or maintained OpenVMS itself.  Don't worry about the quaifications of the folks trying to help here, you are getting some of the best OpenVMS consulting available on the planet right here in this forum (for free).

 

Brad McCusker

Brad McCusker
Software Concepts International