Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

DCL With more than 8 Parameters

Rob Hirschbeck
Occasional Advisor

DCL With more than 8 Parameters

Hi,

I have a third party product that automatically generates a DCL command file and tries to execute it. The problem is that it tries to pass 10 parameters to the DCL command procedure so it never executes and fails with DCL-W-DEFOVF. Since it is a third party product (Oracle 10gR2 actually), I can not change the way it generates or tries to execute the command procedure.

Does anyone know of a way to make DCL just ignore parameters after 8 and execute the procedure anyway? Or is there some way to redefine the @ symbol so that it does something other than execute a DCL command procedure? Or any other ideas?

Thanks,
Rob
18 REPLIES
Hoff
Honored Contributor

Re: DCL With more than 8 Parameters

AFAIK, this is a hard limit in all versions of DCL.

You get eight.

There's no solution here that doesn't involve either packaging the parameters passed into DCL into a comma-separated quoted list or such (and using the available eight parameters more densely), or writing the data into a file and passing that to the procedure, or replacing the DCL procedure invocation call in the application with an image invocation.

If you have some control over the parameters and want to truncate the list, pass in a ! character.

As for resolving this through Oracle or OpenVMS enhancements or modifications, you're left to contact the vendors. That's going to take a while, though I might toss this at Oracle and ask them how to work around the limit.
Robert Gezelter
Honored Contributor

Re: DCL With more than 8 Parameters

Rob,

I more or less concur with Hoff.

If it is an unmodified packaged product, it is the vendor's (e.g., Oracle's) problem. Other than the length of the command line, this has not changed since the beginning (of VMS in any form). In essence, since this is the functionality of the system from the beginning (not a change in releases or patches), the code in question COULD NEVER HAVE WORKED OR BEEN TESTED successfully.

If one has access to sources of the components involved, it may be possible to work out a circumvention, but as noted, the responsibility clearly lies with the vendor.

- Bob Gezelter, http://www.rlgsc.com
Rob Hirschbeck
Occasional Advisor

Re: DCL With more than 8 Parameters

Thanks guys,

I pretty much thought that too. Oracle has confirmed it to be a bug in their current release for OpenVMS and they are working to resolve it. I was just hoping there might be some alternative...

Rob
Craig A
Valued Contributor

Re: DCL With more than 8 Parameters

As Robert states above - How on earth did this product get through any sort of testing?

My gast is well and truly flabbered (and that is not something that happens everyday!)

Craig
Wim Van den Wyngaert
Honored Contributor

Re: DCL With more than 8 Parameters

If you are able to change the name of the script from x to x " (e.g. when the name is in config). Then all parameters are passed to P1. You parse the first 8 params and drop the others.

This is based upon DCL adding the missing closing ".

fwiw

Wim
Wim
Thomas Ritter
Respected Contributor

Re: DCL With more than 8 Parameters

Rob, are you sure ? Are you able to extract the command procedure and post here. Is is possible the procedure was broken by say some symbol scoping problem ?
Hoff
Honored Contributor

Re: DCL With more than 8 Parameters

Craig, do you really want the answer to the question that flummed your ox? (I'm guessing not...)
Rob Hirschbeck
Occasional Advisor

Re: DCL With more than 8 Parameters

For anyone interested, here is the script in question. The way this is supposed to work is you place a script file in a dedicated location and when certain events occur, an oracle process scans the directory and executes any scripts it finds there.

I placed a DCL command file called LOG_TEST1.COM in the [racg.usrco] directory and here is the script generated by oracle to execute it:

$! Script automatically generated
$ SET NOON
$ DELETE := DELETE
$ DEBUG := FALSE
$ ECHO := WRITE SYS$OUTPUT
$ SYSOUT = F$TRNLNM("SYS$OUTPUT")
$ IF F$TRNLNM("ORA_SCLS_LOGGING") .EQS. "TRUE"
$ THEN
$ DEBUG := TRUE
$ DEFINE /NOLOG /PROCESS SYS$OUTPUT LOG_DISK:[ORACLE.SCLS_SCR]naa_274a14.log
$ ECHO "PROCESS NAME: ""''F$GETJPI("","PRCNAM")'"" PROCESS ID: ''F$GETJPI("","PID")'"
$ ECHO "IMAGE_NAME: ""user_disk:[oracle.oracle10gr2.cluster.racg.usrco]log_test1.com;2"""
$ ECHO "PARAM_STRING: ""SERVICE VERSION=1.0 service=GRADE.AMERICAS.MITTALCO.COM database=SPRTD instance= host=spbas1 status=up reason=boot timestamp=03-Jun-2009 01:20:26 """
$ SET VERIFY
$ ELSE
$ DEFINE/NOLOG SYS$OUTPUT NL:
$ ENDIF
$ DEFINE /NOLOG /PROCESS ORA_CRS_HOME "user_disk:[oracle.oracle10gr2.cluster]"
$ DEFINE /NOLOG /PROCESS ORACLE_HOME "user_disk:[oracle.oracle10gr2.database]"
$ IF .NOT. DEBUG
$ THEN
$ SET ON
$ ON ERROR THEN GOTO ERROR_HANDLER
$ DEFINE /NOLOG /PROCESS SYS$ERROR LOG_DISK:[ORACLE.SCLS_SCR]naa_274a14.err
$ ENDIF
$ verify$$ = f$verify(0)
$ @ORA_CRS_HOME:ORAUSER.COM
$ ignore$$ = f$verify(verify$$)
$ sclsimg :== @user_disk:[oracle.oracle10gr2.cluster.racg.usrco]log_test1.com;2
$ IF DEBUG THEN SET NOVERIFY
$ IF "''SYSOUT'" .NES. "" THEN DEFINE/NOLOG SYS$OUTPUT 'SYSOUT'
$ sclsimg SERVICE VERSION=1.0 service=GRADE.AMERICAS.MITTALCO.COM database=SPRTD instance= host=spbas1 status=up reason=boot timestamp=03-Jun-2009 01:20:26
$ STS = '$STATUS'
$ IF .NOT. DEBUG
$ THEN
$ DELETE LOG_DISK:[ORACLE.SCLS_SCR]naa_274a14.;0
$ IF F$SEARCH("LOG_DISK:[ORACLE.SCLS_SCR]naa_274a14.err") .NES. "" THEN DELETE LOG_DISK:[ORACLE.SCLS_SCR]naa_274a14.err;*
$ ENDIF
$ EXIT STS
$!
$ERROR_HANDLER:
$ STS = '$STATUS'
$ SET NOON
$ EXIT STS

You can see that the LOG_TEST1.COM script will be called with 10 parameters. This causes DCL to report "%DCL-W-DEFOVF, too many command procedure parameters - limit to eight" and not execute the procedure.

And flabbered or ghasted or not, they obviously never tested this feature on their VMS product - I guess they spend too much time with UNIX...

Rob
Robert Gezelter
Honored Contributor

Re: DCL With more than 8 Parameters

Rob,

I do not have an installation that I can test on, but have you checked that this is actually meant to be used with command files? (As opposed to actual images.)

Parameter processing from C/C++ would, I suspect, work correctly.

Also, as has been noted, putting the entire parameter in quotes would also address the problem (although, to be fair, it would require a code change).

- Bob Gezelter, http://www.rlgsc.com
Craig A
Valued Contributor

Re: DCL With more than 8 Parameters

What is the contents of LOG_TEST1.COM?

IF this procedure gets called with either a /OUTPUT= or in BATCH there is a good chance that unless there is a specific check then the:

%DCL-W-DEFOVF, too many command procedure parameters - limit to eight

Would never be noticed (I guess I'm stating the bleeding obvious in that statement)

If LOG_TEST1.COM doesn't do anything much then maybe the coder simply made some assumptions.

Undoubtedly still crap DCL - Definitely a case of a little knowledge being a dangerous thing.

Craig.
Rob Hirschbeck
Occasional Advisor

Re: DCL With more than 8 Parameters

Hi Bob,

As of now, the callout scripts look only for ".com" files. In fact (I tried it), if you put any other kind of file in the "user callout" directory [.usrco], the oracle process foolishly appends ".com" to it and tries to @ it (ie. "@log_test1.exe;2.com") - not kidding!

This issue is now classified as a severity 3 bug and is being addressed by the oracle VMS development team...

Rob
Robert Gezelter
Honored Contributor

Re: DCL With more than 8 Parameters

Rob,

Ok, had to offer that possibility.

- Bob Gezelter, http://www.rlgsc.com
shahina shaik
Occasional Visitor

Re: DCL With more than 8 Parameters

Hi Rob,

DCL has a limitation of 8 parameters. VMS engineering has extended the support to more than 8 parameters, which would be available in the future release.

Regards,
Shahina.
Willem Grooters
Honored Contributor

Re: DCL With more than 8 Parameters

Problem here is white-space - and whitespace acts as a delimiter in DCL paramaters.

Count the parameters as delimited by whitespace, and you'll find 10 parameters:

$ sclsimg SERVICE VERSION=1.0 service=GRADE.AMERICAS.MITTALCO.COM database=SPRTD instance= host=spbas1 status=up reason=boot timestamp=03-Jun-2009 01:20:26

Above should be coded as:

$ sclsimg "SERVICE VERSION=1.0" service=GRADE.AMERICAS.MITTALCO.COM database=SPRTD instance= host=spbas1 status=up reason=boot "timestamp=03-Jun-2009 01:20:26"

Now you get 8 parameters.

Because of this, I tend to pass all string parameters as quoted strings - if not all. Or disallow whitespace within string-parameters. In this case, that could also be a solution: SERVICE_VERSION, and 03-Jun-2009:01:20:26 in stead of "SERVICE VERSION" and "03-Jun-2009 01:20:26"

The solution of engineering to simply raising the number of parameters (which really is a good thing) will NOT help in this matter. Though LOG_TEST1.COM will start executing now, it will stil fail if the parameters are passed the wrong way:

P1 = SERVICE
P2 = VERSION=1.0
P3 = service=GRADE.AMERICAS.MITTALCO.COM
...

where (my deduction) it should be read as:

P1 = SERVICE VERSION=1.0
P2 = service=GRADE.AMERICAS.MITTALCO.COM
...

Of course this could be handled, but why add complexity when it can easily be avoided...
Willem Grooters
OpenVMS Developer & System Manager
Derek Garson
Frequent Advisor

Re: DCL With more than 8 Parameters

>Or any other ideas?

How hacky do you want it to be? ;-)

Close examination of the generated procedure suggests a couple of ways of attacking it.

(some code from it follows)

$ @ORA_CRS_HOME:ORAUSER.COM
$ ignore$$ = f$verify(verify$$)
$ sclsimg :== @user_disk:[oracle.oracle10gr2.cluster.racg.usrco]log_test1.com;2
$ IF DEBUG THEN SET NOVERIFY
$ IF "''SYSOUT'" .NES. "" THEN DEFINE/NOLOG SYS$OUTPUT 'SYSOUT'
$ sclsimg SERVICE VERSION=1.0 service=GRADE.AMERICAS.MITTALCO.COM database=SPRTD instance= host=spbas1 status=up reason=boot timestamp=03-Jun-2009 01:20:26

1. You will note that it (erroneously?) defines sclsimg as a global symbol. Hence if you can inject an outer level local symbol of the same name that runs a program that amends its argument list and then invokes the real command procedure, you may avoid the problem.

OR

2. You will note that it invokes ORAUSER.COM. If that procedure can be modified (but modified so that it only affects invocations in this context) then ORAUSER.COM could create a new, fixed version of the generated command procedure and invoke it. (Work needed to flesh this out into something that works.)

Sure, it would be better for Oracle just to fix the problem.
Richard W Hunt
Valued Contributor

Re: DCL With more than 8 Parameters

We are also preparing to install ORACLE 10gR2, but as you know, there are flavors of ORACLE - as stand-alone server, enterprise server, RAC server, client-only, etc.

Which flavor of ORACLE were you installing. Does ORACLE have any comment on the flavor(s) to which this bug applies? And if you have called ORACLE, there is a TAR number or a TIR number or something like that. (I forget what they call it because my ORACLE team usually handles that, not me.)

Can you please post the trouble report number so that my ORACLE gurus can look it up and see if this is going to be a show stopper for us, too? Also, if ORACLE acknowledges the bug, we need to be able to know when a fix is available.

We are on OpenVMS 8.3, just installed this month and patched up-to-date through July 2009. Our next upgrade step was going to be the ORACLE installation. We really appreciate any details you can give on this subject.

Richard
Sr. Systems Janitor
Rob Hirschbeck
Occasional Advisor

Re: DCL With more than 8 Parameters

Hi Richard,

There was a bug causing Oracle FAN callouts not to work. There is a patch now. See the following note on Metalink:

How to implement Fast Application Notification (FAN) Callouts on OpenVMS
Doc ID: 846327.1

As far as installing and configuring, we have a four node Integrity Server cluster with Oracle 10.2.0.4 RAC installed on all four nodes. Install is NOT easy. Careful review of the notes in the following Metalink note will be very helpful:

Index of install related notes for Oracle 10.2 on hp OpenVMS
Doc ID: 726914.1

Unfortunately, 10.2.0.4 seems to still have some bugs on OpenVMS - 10.2.0.5 I think (hope?) is due out soon.

Hope this helps...

Rob
Richard W Hunt
Valued Contributor

Re: DCL With more than 8 Parameters

Yes, it does. Thanks much, Rob. And good luck!
Sr. Systems Janitor