Dbaccess
Posted in 2000
Topics: Server Administration
Has anyone ever deleted a file from their home directory on a Unix server
through dbaccess?
Please reply to: beskew@dsgtech.net
Thanks in advance!
Buck Eskew
I havent directly through dbacces but if you create a stored procedure,
you can shell out and do anything you want.
The following example can be used in a stored procedure:
create procedure myprocedure()DEFINE p_runstring CHAR(100);
DEFINE new_id INTEGER;
DEFINE new_charge_id INTEGER;
DEFINE new_crt_dckno CHAR(15);
DEFINE in_ctrl_nbr CHAR(10);
DEFINE in_bkg_nbr INTEGER:
LET new_id = 10;
LET new_charge_id = 15;
LET new_crt_dckno = "MYNEWCHARGE";
LET in_ctrl_nbr = "PNEW0101";
LET in_bkg_nbr = 1212;
LET p_runstring = "/u/somedirectoryl/run_cmd.sh "||new_id ||" "||
new_charge_id||" "||new_crt_dckno||" "||in_ctrl_nbr||
" "||in_bkg_nbr||" ";
SYSTEM p_runstring;
end procedure;
----
run_ins.sh contains the following
#-- $1 new_id
#-- $2 new_charge_id
#-- $3 new_crt_dckno
#-- $4 in_ctrl_nbr
#-- $5 in_bkg_nbr
MYENVVAR="ANYTHING I NEED TO SET";export MYENVVAR
nohup fglgo my4gltodosomething $1 $2 $3 $4 $5 >> my4gl.log &
------
so basically you can shell out and do anything you need to do.
the shell script could delete the file you need to delete
rm /home/me/myfile
echo "my file deleted " >> myscript.log
---
this process is from an actual working system.
hope this helps.