Tuesday, February 1, 2011

Working on a job vs_new...and somehow my connectivity broke..
after that started new session and tried to access the job but getting error that "job is being accessed by other user". How can we resolve? 

So opened Director to cleanup resource...but there is the error as below-
ERROR: Cannot find any process numbers for stages in job vs_new

ANS : The deadlock daemon can be started to release locks and abandoned shared memory segments for processes that are terminated via the UNIX kill command or abnormally due to an unforeseen event.
To start the dslockd process edit $DSHOME/dsdlockd.config and set the start flag to 1.
The daemon will start automatically the next time the DataStage server is started
Enter the time interval, in seconds, that the daemon should wait before rechecking for deadlock conditions. The default is 900 seconds, but you may want to select a smaller interval like 300 seconds.
start=0
timer=900
res=0
log=
         OR   
    
Under the "Locks" you select the "Show All" option, you should still be able to see the job name.
You can either do the "Release All" or "Logout" the corresponding PID.

**********************

99% of the time you will not see those types of locks nor do you see them when you use LIST LOCKS.
The best way to do this and never have to worry about it is to set the deamon value as I described before so it will run and automatically take care of this as well as other important things like lost shared memory segments.

**********************
Data Extraction Rule : The data should be extracted from the previous quarter of the year for the input date passed.
For e.g
If the input date is 14-Apr-2010 the job should extract Q1 data since the input date falls in Q2.
If the input date is 03-Sep-2010 the job should extract Q2 data since the input date fall in Q3.

ANS : Suppose stage is
seqfile --> transformer --> dataset
in transformer stage variables write logic in if then else
if ( juliandayfromdate(datecolumn) < juliandayfromdate(04-01-2011)) then display or extract data columns of first quarter else
if ( juliandayfromdate(datecolumn) < juliandayfromdate(07-01-2011)) then display or extract data columns of second quarter else
if ( juliandayfromdate(datecolumn) < juliandayfromdate(10-01-2011)) display or extract data columns of third quarter
else display or extract data columns of fourth quarter
or simply compare dd mm yy separately in transformer by extracting them and get the data or columns u need.

No comments:

Post a Comment