Operating System - OpenVMS
1752488 Members
5404 Online
108788 Solutions
New Discussion юеВ

Re: 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 18
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