Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triggering problem when defining the Porcess Definition

Status
Not open for further replies.

Jimguld

Programmer
Mar 4, 2003
26
0
0
DK
Hi everybody

I have a strange problem trying to setup a trigger in MQS on Windows XP. I have the server installation and client on same machine.

I know the requirements are
:to setup a trigger monitor
:to setup an init queue
:to setup an application queue
:to setup process identifier

I have done all that. However I can't seem to get the command right in the process Indentifier. I think that is the problem.

I want to supply the following command in order start SAS software and run program. Imagine this is the command line argument:

c:\>"c:\program files\sas\sas.exe" -sysin "C:\myfile.sas"

how do I write this command in the GUI. MQseries wont let me write it. It complains. It only accepts everything in to quotes, which wont work...like this

"c:\program files\sas\sas.exe -sysin C:\myfile.sas"

Why ?? How do I write it..does anybody know...??

Jim

jimguldbrandsen@hotmail.com
 
Ok, i assume that sas.exe is the program that you want to trigger and myfile.sas is the file you want this program to open it when it gets triggered.

If this is what you are looking for, then You need to pass the arguments to your process definition APPLICID in the following way. Bear in mind you dont need to set either userdata or envrdata.

APPLICID('start "C:\program files\sas\sas.exe" "c:\myfile.sas"')

Hope this helps.

Cheers.
KK
 

Thanks for your input..

however it still wont work.

when I type

'start "C:\program files\sas\sas.exe" "c:\myfile.sas"'

MQseries puts another set of quotes around it
" 'start "C:\program files\sas\sas.exe" "c:\myfile.sas"' "

I don't understand why..

Jim
 
Could you post your complete process definition here. And you forgot to mention whats the error that you are encountering. What happens when MQ puts those quotes around, because you shouldnt be bothered about that at all.

What version of Mq. What platform. What level.

cheers
KK
 
Hi mqonnet..
thanks for looking into this.
I am running version 5.3, from september 2002. Don't know what level. I am running the server and client on same machine windows XP.

I am quite new to MQseries...so I don't know what you mean about the complete process definition. So I am guession this:

Remember I have defined it ion the GUI of mQseries

Process definition name:MYSAS
Description ""
Application Type: Windows NT
Application Identifier: my command
Environment Data: "
User Data:""

The error is that I can only seem to start a background process of SAS..and MQseries seems to ignore the parameters I supply..

this command here works in DOS, with the quotes that need to be on due to the spaces in the path..

"c:\program files\sas\sas.exe" -sysin "C:\myfile.sas"

the -sysin is a parameter that tells SAS software to execute a specific file.

when I write what you suggetsed

'start "C:\program files\sas\sas.exe" "c:\myfile.sas"'

or with the -sysin

'start "C:\program files\sas\sas.exe" -sysin "c:\myfile.sas"'


MQseris puts more quotes around...maybee I should not worry about this since this could be internal stuff from MQ that does.
THe result is this in the GUI after saving the Process definition:


"start ""C:\program files\sas\sas.exe"" - sysin ""c:\myfile.sas"""


And thst does not even start a SAS background process.
In the MQseries Event Viwer I get the following error that i don't understand.
---------------
SAS Error Event: SAS is aborting through vaterm() with this error code: 11
----------------

However when I just type:
"start C:\program files\sas\sas.exe"

I can start a background. But when I start to add the -sysin without quotes it does not work...and that is my problem.

how do I write the command so that it gets executed in the same way as from the DOS promt ??

"start c:\program files\sas\sas.exe" -sysin "C:\myfile.sas"

Hope you still can help

Jim
 
I have not tried this myself. Shall do it when i get a chance. But this should work. Try this.

APPLICID('start "C:\program files\sas\sas.exe" " -sysin c:\myfile.sas"')


Cheers
KK
 
Cheers
KK

I actually found a workaround. I made a bat file instead where I wrote the dos command

start c:\mystartfile.bat

this works..

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top