DATA Step, Macro, Functions and more

Source database is down when reading the data, is there anyway that query can wait for sometime and re-connect again??

Reply
Occasional Contributor
Posts: 8

Source database is down when reading the data, is there anyway that query can wait for sometime and re-connect again??

Hi Everyone,

We have SAS job which is connecting to DB2 database, and the job runs every day in unix environment.

Here we are facing problem that, DB2 database is getting down quite freqently (1 or 2 times in a weekly).

For that, we are re-running the job manually.

Question is,

Can we put some logic so that when the connection fails(database is down), Query can re-connect after 15 min and till the time job need to be in ideal state.

Thanks in advance!

Super User
Posts: 5,256

Source database is down when reading the data, is there anyway that query can wait for sometime and re-connect again??

COMMAND_TIMEOUT= looks like a libname option that could help...?

Data never sleeps
Occasional Contributor
Posts: 8

Source database is down when reading the data, is there anyway that query can wait for sometime and re-connect again??

Thank You, COMMAND_TIMEOUT= is  a libname option, I am actually connecting using Proc sql( I had to use passthough only)

How this option works, is it waits for the specified seconds when the connection got failed and it tries to re-connect?

Please help!

Valued Guide
Posts: 2,175

Source database is down when reading the data, is there anyway that query can wait for sometime and re-connect again??

try using a libname statement with this option just before your CONNECT statement

Ask a Question
Discussion stats
  • 3 replies
  • 124 views
  • 0 likes
  • 3 in conversation