04-03-2018 11:50 AM
Is there a way to execute multiple SAS programs from one program with the use of macro variables in the path and the log?
1. I want dynamic dates in the log name
2. The location where the program resides and the log locations are different and both should employ a macro variable.
To achieve this, if I use a call command, I am guessing I cannot use dynamic paths or dates. If I use a %include statement, there is a restriction on the number of characters (LRECL should be <=6000).
Is there any way to trigger them in data null step or using a macro?
04-03-2018 11:52 AM
If I use a %include statement, there is a restriction on the number of characters (LRECL should be <=6000).
You have lines with more than 6000 characters? That seems like a problem in itself. %INCLUDE is always the method I've used.
Use PROC PRINTTO in your programs for the log and add the date using %SYSFUNC().
04-04-2018 10:57 AM - edited 04-04-2018 10:58 AM
@Reeza My bad, I thought the restriction was overall. Thank you very much for your suggestions
I used %include but there are two issues I am facing. (I am running using putty)
1. I used Printto, but the log file has only "Notes:" but doesn't show the actual lines of the code in log. Is that supposed to be that way? Usually on a log we see both lines of code and the Notes and Warnings.
2. If there is a Proc Import step in the sas program that we are calling using %include, the main program doesn't seem to run at all. It runs for a long time, the log file also stands still. Sample proc import that has been used:
PROC IMPORT OUT = WORK.ABC
04-03-2018 11:54 AM
LRECL is not a restriction on the number of characters.
It is a restriction on the number of characters on a single line of code. Are you writing code that has 6000 characters on one line?
I think %include will work fine.