If you want ot insert the contents of new_instance_number variable you need to concatenate it with the rest of the command line Dim( my_command, string ) ConcatEx( "E:\\PSOFT-TST\\HRMS751\\SQRBINW\\SQRW.EXE E:\\PSOFT-TST\\HRMS751\\SQR_CUSTOM\\AGPER099 SYSADM/%ACCESSPSWD%@HR751DEV -iE:\\PSOFT-TST\\HRMS751\\SQR\\;E:\\PSOFT-TST\\HRMS751\\SQR_CUSTOM\\ -ZIFE:\\SQRPARMS\\PSSQR.INI -mE:\\SQRPARMS\\ALLMAXES.MAX -XCB -XMB -fC:\\temp\\ ", new_instance_number, " ", SCHEDULE, " ", SCHEDULE_PERSDATA, my_command ) RunAndWait( my_command, "", 0, ntpid ) Please note that I have changed all \ to \\. Please see Special ASCII characters topic in the online help for more info. But you still have an issue with %ACCESSPSWD%. The value of the environment variable will not be inserted automatically. There are exists different methods to get the value of an environment variable. Now, for the test purposes replace it with the hard-coded value. : Hi, : I'm new to JAL,can someone help me with the RunAndWait syntax? Here is what : I've got: RunAndWait("E:\PSOFT-TST\HRMS751\SQRBINW\SQRW.EXE : E:\PSOFT-TST\HRMS751\SQR_CUSTOM\AGPER099 SYSADM/%ACCESSPSWD%@HR751DEV : -iE:\PSOFT-TST\HRMS751\SQR\;E:\PSOFT-TST\HRMS751\SQR_CUSTOM\ : -ZIFE:\SQRPARMS\PSSQR.INI -mE:\SQRPARMS\ALLMAXES.MAX -XCB -XMB : -fC:\temp\ new_instance_number SCHEDULE SCHEDULE_PERSDATA", : "", 0, ntpid) : As you can see the parameters passed to the command line a fairly long. : Additionaly the value 'new_instance_number' is variable dynamically : createdby an earlier SQL statement. Will the RunAndWait function recognize : it as such? : The entries for SCHEDULE and SCHEDULE_PERSDATA define the database username : and Run Control ID. This job is to run against a peoplesoft database. : Thanks very much! : Steve
|