Consultor Eletrônico



Kbase 15747: How to pass MULTIPLE parameters to PROGRESS batch on VMS
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to pass MULTIPLE parameters to PROGRESS batch on VMS

Sample DCL command procedure to pass multiple parameters
to PROGRESS batch command.


From inside procedure X the following can be done:
:
:
VMS SILENT @DLC:Build_Startup_Procedure.COM foo.p customer name.
VMS SILENT PROG/Batch/Startup=DLC:Startup_Procedure.P KILL1.
:

The first line runs a command procedure (see below) which writes
a .P file (named startup_procedure.p). The arguments foo.p, customer,
and name describe the procedure you really want to run (foo.p)
followed by the two arguments you'd like to pass (customer and name).

Here is what gets written to Startup_Procedure.P in this example:

$ TYPE DLC:Startup_Procedure.P
RUN FOO.P "CUSTOMER" "NAME"

The second line will perform a Progress batch startup on this
procedure (which in turn runs the procedure you really want to run,
foo.p, and passes the parameters, customer and name).

To get this to work you need a procedure like
Build_Startup_Procedure.COM. Here's an example:

$!+
$! Build_Startup_Procedure.COM
$!
$! Creates a PROGRESS procedure named Startup_Procedure.P
$! in the DLC: directory which will run another procedure
$! and pass along command line arguments.
$!
$! Use this procedure from another procedure. Example:
$!
$! VMS SILENT @Build_Startup_Procedure.COM arg1 arg2 arg3.
$! VMS SILENT @Startup_Procedure.COM.
$!
$!-
$ Open/Write PROTMP Startup_Procedure.P
$ Command = "RUN " + "''p1 " + """''p2'""" + " " + """''p3'"""
$ Write PROTMP Command
$ Close PROTMP
$ Exit $Status

Note: pay special attention to the quotes in this procedure!

Side effects: each time procedure X runs it will write a new file.
These will need to be purged ocasionally if version limits are
not set on the VMS machine.

Here's an example of the "procedure you really want to run" that
is used in this example:

$ Type Foo.P
for each {1}:
display {2}.
end.

14-may-96
jyt

Progress Software Technical Support Note # 15747