BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kiranragam
Fluorite | Level 6

Hi Team,

 

As pert of our requirement we need to load a Teradata table(COMMON_TABLE) from multiple SAS Jobs. I am using PROC APPEND (Multiload=YES TPT=YES)  to load the data into Teradata table from a sas dataset. 

While JOB-A is loading data into COMMON_TABLE, JOB-B should wait until the JOB-A passed through the loading step. If I can check the status of a table in a SAS program, I would keep the other jobs running concurrently into multiple sleep intervals and can proceed the execution as soon as the table is available to load. Could you please help me if there is way to check the status of a Teradata table while it is being loaded?

 

I tried below approach before I post the question here:

#1. While loading data I noticed a temp table _RS is being created, so I kept the existence check of _RS table before loading and tried to keep the job on sleep until the _RS tables get disappeared. But if the job that is loading data gets failed in between then _RS will remain in the database and other jobs will never get executed until _RS table gets deleted manually.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

@kiranragam  - Another option could be to have a loading tracking table (a SAS table or a Teradata table) that records when Teradata loads start and end. Then get every SAS job loading into Teradata to update this tracking table. 

 

You can then use the tracking table to check if Teradata is available for loading or not.

View solution in original post

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Surely Job-A creates a log file. Why not check that file?

SASKiwi
PROC Star

@kiranragam  - Another option could be to have a loading tracking table (a SAS table or a Teradata table) that records when Teradata loads start and end. Then get every SAS job loading into Teradata to update this tracking table. 

 

You can then use the tracking table to check if Teradata is available for loading or not.

kiranragam
Fluorite | Level 6
I have used Sas dataset as a loding track table and it solved the issue. Thank you for your suggestion.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 2094 views
  • 1 like
  • 3 in conversation