BookmarkSubscribeRSS Feed
ThomasH
Calcite | Level 5
Dear forum,

I am facing an issue with DI Studio I cant find any documentation on.

There is 1 job which has a Lookup (missing table->abort) and a post-processing defined, which inserts a row into a "jobstatus" table containing the JOB_RC.

When running the job normally, it aborts when in case the lookup table is missing and executes the post-processing code.

When I run the job via an %include from another job, the lookup table is missing, the job aborts but does NOT run the post-processing code, thus not inserting the JOB_RC into my jobstatus table.

Why is the behaviour different?

Thanks a lot,
Thomas
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Possibly the ERRORABEND / NOERRORABEND condition may be the cause for different behavior? It would be best to share SAS log output with source code revealed for a proper diagnosis, after you have determined that the SAS behavior is different based on the two instances - check your PROC OPTIONS; settings for differences, possibly.

Scott Barry
SBBWorks, Inc.
Patrick
Opal | Level 21
Hi Thomas

"When I run the job via an %include from another job...' Does that mean you deploy the job and then in another job you're having a %include on the deployed job? If so: this wouldn't be the way you should do it in DI. Better use a loop control and embed the first job as inner object.

You have to look at the code/log to see what's going wrong. One reason could be that you use the %include statement within a macro and so all macro vars created by the pre-processing step of the included job outside of a macro are "suddenly" defined inside of a macro - they would become local instead of global (and that's one of many reasons why you should do things the DI way before writing user written code).

HTH
Patrick

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 714 views
  • 0 likes
  • 3 in conversation