Hi,
I am facing issue related to macro. I have created macro Trans_data_IncrementLoad and Business_freez_dates which contains multiple do loop and if condition. In Trans_data_IncrementLoad macro there are multiple do loop and inside one of do loop I am using oracle pass through , which insert data into trans_data table by joining 2 table.
Macro Business_freez_dates also contains multiple do loops and if condition and it create the dataset which contains the business date's for which incremental load should happen.
once dataset created which contains the business date's for which incremental load should happen, I'm calling Trans_data_IncrementLoad macro from data step.
Issue facing: Now issue is that most of the time my code running successfully but sometime it seems that code not completing it's execution. ex: suppose 100 obs needed to be inserted into trans_data but it inserting only 10 obs in trans_data table, but later if I run the code again then it properly inserting 100 obs in trans_data. I am really not able to figure out why this kind of issue coming. I am attaching the screenshot of code structure, it's not entire code but sample of code.
screenshot 1:
Screenshot 2:
screenshot 3:
Thanks in advance for your valuable solution/suggestion/advice and would be very grateful for your valuable input.
That's too much code to "dry troubleshoot".
Check the log with all possible troubleshooting options active, like:
options symbolgen mprint mlogic msglevel=i sastrace=',,,d' sastraceloc=saslog nostsuffix;
That's too much code to "dry troubleshoot".
Check the log with all possible troubleshooting options active, like:
options symbolgen mprint mlogic msglevel=i sastrace=',,,d' sastraceloc=saslog nostsuffix;
Thanks for your reply.
Yes,I have included all the option in my code which helps in macro code debugging, but the issue is that it didn't generate any kind of error in log.
Can you confirm once, Am I calling macro in correct way?(the one from datastep). any suggestion would you like to give on macro calling for which I should be careful.
Thanks
Do you ever get any errors/warnings in the log? Is there any pattern to when the code 'works'?
Can you post the full log from a run where the code works, and the full log from a run when the code doesn't work? If you can post those logs (as text) you should be able to compare them (and in particular record counts) to see where they start to differ.
Code needs to be provided as text, in the window that appears when you click on the "little running man" icon. Do not provide code as screen captures.
If there are errors in the log, show us the ENTIRE log (not selected parts of the log, not just the errors, not what you think we need, we want to see the ENTIRE log). Logs should be provided as text (not screen captures), pasted into the window that appears when you click on the </> icon.
Do not ignore these instructions.
Thanks for your valuable advice and Yes, will take of this in next post
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: