Good afternoon, I need to run a .bat from SAS EG where I create 2 .txt files. The same ones that are created empty when executing of SAS EG but if the same .bat is executed from the server from the CMD is executed normally and creates the files with information: Attached as executing from SAS EG and .bat code
data _null_;
x "x:\1prueba.bat > x:\log.txt ";
run;
@echo off
Handle64 DIM_IP_TP.mdf.0.0.0.spds9 > x:\tabla.txt
for /f "tokens=3,6 skip=5 delims= " %%p in (x:\tabla.txt) do (
echo %%p %%q
)
Handle64 DIM_IP_TP.data.spds_lock9 > x:\tabla1.txt
for /f "tokens=3,6 skip=5 delims= " %%r in (x:\tabla1.txt) do (
echo %%r %%s
)
the .bat is to find the sessions (pid) that have taken an SPDS table to then kill the process
the user with whom I run is the sas admin and server admin
Es necesario ya que SAS no tiene herramientas solidas de monitoreo, es la única solución fiable para el desbloqueo de tablas a menos que SAS al día de hoy ya cuente herramienta o solución- tecnología al tema de bloqueos de tablas ya que por el momento es desastroso.
Con todo ya encontré la solución al llamar al .bat desde SAS solo toca poner la ruta exacta y funciona.
Con todo gracias
Perhaps there's another side of the story.
Could it be that you have problem with locking when you try to update the tables?
If you mainly do inserts you could easily solve this by using Dynamic Locking, and with almost no performance penalty at all.
Se aplica la opción Dynamic Locking pero solo eso aplica cuando 2 o mas personas consultan datos (selects) a la tabla mas no cuando una persona ocupa la tabla y otra quiere actualizar, por eso es que se necesita aplicar el .bat no hay otra solución.
Con todo Gracias
Was du hier schreibst ist spanisch für mich.
Your problem is because SAS Guide is executing in your operating system instead server operating system. It could be solved only running your .sas from the server with sasbatch user. Try to automatize your code with cron, for example, and your problem will be solved.
🙂
@Rodrigo_Aegon Discussion from 3 years ago!
Yes. I realized it was in September but I didn't check in what year ... 😞
On the other hand, I don't like having open issues... XD
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.