Page 1 of 1

SQL Command in a Routine

Posted: Thu Mar 02, 2006 9:32 am
by chowdary
People,

I need to update an existing row or insert a new row in a table after the job runs, i am tinking of writing a AFTER JOB ROUTINE, so Can i run a SQL Command in a Routine, I knwo we can run a Unix command using DSExecute('UNIX','Command','OUTPUT','ReturnCode'), is there any similar way to run a SQL command.

Please throw some ideas.

Thanks
Chowdary

Posted: Thu Mar 02, 2006 9:35 am
by ArndW
Yes, you can do this in an after-job routine. But you will need to execute a UNIX command just as you would normally - if it needs to be done in several commands (i.e. using DB/2) then you would need to issue those commands; plus your after-job routine would also need to know the relevant information (instance, schema, userid, password).