Proc soap not working when called from .Bat file

Reply
Super Contributor
Posts: 418

Proc soap not working when called from .Bat file

Hello. I Havee a local version of SAS on a local machine. Because of this in order for me to schedule jobs I have to create .bat files and run them through windows scheduler.

I noticed that when I try to run a proc soap to pass xml files to a web-services, it WORKS if I just open up the interface and press the run button.... However if I take the same code and wrap it into a .bat file, it actually fails and errors out. The system specifically says it cannot find a file in my c:\sas\.... drive. However I can open up the location it says it cannot find, and the specific file IS there..

Is there an option that needs to be specified when running Proc soap for a program when called from a .bat file?

ALl help is welcome, even if it is just reference to proc soap material related to this problem, as I can't seem to find the issue on this site or google!

Thank you very much!

Valued Guide
Posts: 3,208

Re: Proc soap not working when called from .Bat file

As you are only mentioning "cannot find a file in my c:\sas\...." assuming it did not start SAS at all.

could be:

- wrong syntax/coding of the batch script

- running the script with an user that cannot run SAS. or has access tot your file 

  Windows is a multi-user system like a server even on your desktop. Just see all thoses running services.

---->-- ja karman --<-----
Super Contributor
Posts: 418

Re: Proc soap not working when called from .Bat file

It actually does start sas, and I have many bat files running on a scheduler.

I know for a fact it is  100% the proc soap function that is causing the problem, as if I take the proc soap out of the SAME bat file and run it, it runs successfully... However when I put proc soap back in it fails.

The file it is looking for is "jvm.dll"  under the c:\program files\... jvm.dll

I'm not sure what jvm.dll is or how it replates to proc soap, but it seems to be causing the problem.

Valued Guide
Posts: 3,208

Re: Proc soap not working when called from .Bat file

Ok that makes it more clear. You can run SAS in batch and "proc soap" interactive is running well.
The jvm.dll is part of JAVA. "proc soap" is based on JAVA, Base SAS(R) 9.3 Procedures Guide, Second Edition (jreoptions alternative).
The question is why would "proc soap" give an error running in batch?

Would be nice when there would be a good error message.


As you say there is a pop-up coming (from JAVA) when running interactive "pushing run", that could be an indication to the issue.

When running in batch there is possible nu display connected, no pop-up possible, going to worse. An error recovery starts ending with the JVM error. 

An other issue could be the java setting (path etc) not being set correct using the batch-script.

.... (?)   Some question for TS?

---->-- ja karman --<-----
Super Contributor
Posts: 418

Re: Proc soap not working when called from .Bat file

Hello again Jaap! Thank for your help.

So I might not be explaining myself very well so sorry for that, I will try to make it more clear.

I actually don't get a pop up from java at all when running the program. What I mean is, when I open SAS itself (through it's pop up, the little icon I press on my desktop.. It's Executable file) by pressing the run button, it works....

However if I set up a bat script to call that program it fails on this step.

So it looks like the bat file cannot call this "java" library function when running in bat, but it DOES when running in 'interactive mode'...

Does that make more sense?

Thanks!

Brandon

Valued Guide
Posts: 3,208

Re: Proc soap not working when called from .Bat file

Yep that looks to be your problem. Still I do not understand the why, first option eliminated. The second you could check. Third ? 

This one could help for the second: Base SAS(R) 9.3 Procedures Guide, Second Edition (proc javainfo)  running in batch? running interactive?

---->-- ja karman --<-----
Super Contributor
Posts: 418

Re: Proc soap not working when called from .Bat file

I am attempting to check the second option using proc javainfo!

note that sas is on my local machine and i'm trying to schedule it on my local windows scheduler... so i am not sure the user (being me) would not have access =)

Also, does TS mean Technical Support?

Valued Guide
Posts: 3,208

Re: Proc soap not working when called from .Bat file

Yes, TS -> Technical Support.
I have seen a lot of troubles with Java and fore- background (batch). The one you are describing is new for me.

Java:  wrong outdated versions, mixing the webbrowser and a jpre approach, parameterconflicts with of java, missed fixes/picklist, different behavior when loaded from networked resources instead of local (network is "intranet zone" Windows not "local" or "internet").

fore-background: Other userenvironment (OS), different default settings (SAS), other system resources same user (OS), other setttings behavior same user (OS). 

---->-- ja karman --<-----
Super Contributor
Posts: 418

Re: Proc soap not working when called from .Bat file

Interestingly enough, I ran the bat file on MY computer and it worked perfectly, and then when run on a computer that is (supposed) to be identical to mine it runs into this problem.

Even though we can open and see the vml.dll file on both computers, it fails on his....  We tried copying my jvm.dll application extension onto HIS local machine and then having him re-run the bat file, and it still failed.

He uninstalled and reinstalled sas, and it still failed. So at this point I am kinda stuck on what to do, and i think it might be time to contact Technical support.

Valued Guide
Posts: 3,208

Re: Proc soap not working when called from .Bat file

In this case there is an issue: find the difference between the two desktops with their installed software.  auchh...

Yes the supposed to be identical, is a hypothesis, even twins are not fully equal.
Suppose you where working at SAS-TS and got this question. What would your answer be?

There could be something in the config.sas file (java settings)  something in the windows-registry a different java version being activated or the user/system environment.

Difficult for comparison as human you must see some light. As he has installed de-installed sas it looks you have full access to those laptops.

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 9 replies
  • 516 views
  • 0 likes
  • 2 in conversation