06-04-2014 12:58 PM
How do I abort a job in data integration studio using the following rule:
- Check if exists a file on the sas server starting with /project/customer*
- Failing that, I need to abort the process
06-04-2014 02:14 PM
Depends on your global DI project requirements.
You clould make this part of the autoexec_usermods files or the script starting the associated app-server.
Is it only one job in your project you can do it with some user-coding in the transformation
06-04-2014 03:03 PM
To do it with user-coding transformation, does anyone have an example of how to do?
The logic is as follows:
if c=0 then
06-04-2014 04:36 PM
Check out the SAS external file functions to query directory contents.
Based on the result, use the data step statement ABORT ABEND/RETURN.
This, as Jaap mentioned, could be done in a User Written code transform, or in a Job Pre-code, which is best depends on what you intend to do if there exists files in the directory.
06-05-2014 01:54 AM
If you would do it with unix-scripting (usermods file in the appserver configuration) use the Unix manual,
for example a google-hit: http://kenfallon.com/finding-if-one-or-more-files-exist-in-a-directory-using-bash/
Would you do it in your own SAS code, see: SAS(R) 9.4 Companion for UNIX Environments, Third Edition (dinfo) orSAS(R) 9.4 Companion for UNIX Environments, Third EditionEnvironments, Third Edition (fileexist)
Contact your platform admin for what is the best thing to do in this.