BookmarkSubscribeRSS Feed
Shakti_Sourav
Quartz | Level 8

Dear Team,

I am trying to show the error message from the log file through the SAS Data Integration.

Please follow the steps and Screenshots for your reference.

Step -1, 

First, I created a job and then used the Extract and Table loader for the sample.

Shakti_Sourav_0-1703679178663.png

Step 2,

In extract transformation, Select the Precode and mentioned the log path.

Shakti_Sourav_2-1703679420660.png

 

Step 3,

Store the value in the target table which is in MS Sql Server DB.

 

Step 4,

I have mentioned some code for the extract the error message in USER WRITTEN.

Please find the txt file.

 

Code is working fine but 

Problem is,  I have executed the whole job, Extract and Table Loader working fine but user written not updating. If I execute the user written separately then it's updating.

Please suggest, what's the issue ? and How to resolve it?

If any concerns, please revert back.

 

 

Thanks 

Shakti

2 REPLIES 2
s_lassen
Meteorite | Level 14

You are probably better off submitting your question in the "SAS Studio" section of SAS Communities, but here are my two cents:

 

  1. It looks like your user written step is not part of the flow. Should it not be in order to get executed?
  2. You may want to show the log file that PROC PRINTTO writes to, and the SQL server table that the user written code writes to, in the diagram. That way, it will be much clearer what the code does, and a lot easier to switch the output, e.g. if you are moving from TEST to PROD.

It's been a while since I have done any SAS Studio work, and I do not remember how to reference files and tables in user-written code (ask over at the SAS Studio section, I am sure it's not complicated).

Patrick
Opal | Level 21

Sounds like a timing problem. 

What you could try:

1. Repoint the SAS log back to original location either in the post code of the table loader or at the beginning of the user written code node

proc printto log=log;
run;

2. And just to make the flow look "nicer": Connect table object CORE_M... as input to the user written transformation.

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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