12-21-2015 06:46 AM
Can you please specify what you mean by Error, every time an Error: message appears, when the rc is set to an error code. What about user (problematically) error conditions.
And how do you want to track it, store the result in log tables, in a report...?
12-21-2015 07:00 AM
Any type of error like connection problem or coding related issue. acctually we need to create bakup of particular job in precode after successful execution we need to delete bakup in postcode but in execution process we get any error that time we don't wan't execute postcode .
%if &cnt_error ^gt o
drop table biuo1.test_bkp1;
but its not working.
12-21-2015 07:23 AM
Ok, I see.
If you encounter a "hard" error situation like out of resources, lock not available etc, SAS will default enter syntax check mode, so in these situations your "not executing post code" will be no problem.
DI Studio jobs automatically updates the &job_rc macro variable throughout the job, and keeps the highest value. Perhaps you could use that one for a simple NE condition in your post code macro logic?
12-21-2015 07:32 AM
I am assuming that your problem statement is like this:-
You have taken back up for one table and you ran one job. If your job is succesful then only you have to delete back up other wise you do not have to delete this.
There are 2 probable solution for this:-
Solution 1:- You can use available transformation in DI studio called as "Return code check".
Go to "Transformations" tab-->Control--> Return code check.
PLease use the link below to get details how to use this transformation:-
Solution 2:- You can manually check value of rc in your ETL job post code and send entry in a dataset depending on success or failure. If job is successful then create a dataset having entry "Successful". This you can do it by clicking on properties on ETL job. Go to status handlling. Click on " New" and then set the condition acording to your requirement.
I hope this will help.
12-23-2015 08:34 AM
We get the solution of that problem.
in precode create the bakup of account_bal table and write the following code in postcode.
%if (&job_rc le 5) %then
drop table ACCOUNT_BAL_bkp;