After deployed SAS code to deployment directory the .lst file is created. I need to run this code paraller with different parameters.
When I run this code with different paramaters I received an error ".lts file is in use"
Is there is a way to run the same job paraller with different parameters without error ?
If you are changing "parameters" to run the code again, then also change the .lst file to have a different name for each run.
@newuser2022 wrote:
The thing is that I used different parameters. when I run paraller following codes
./ my_code X> /my_code_x
./ my_code Y> /my_code_y
./ my_code Y> /my_code_z
only the first code is completed. The next two failed due to my_code.lst is in use.
As I stated, and as @Tom has stated, you have to change the name of the .LST file for each parallel run
@newuser2022 wrote:
The thing is that I used different parameters. when I run paraller following codes
./ my_code X> /my_code_x
./ my_code Y> /my_code_y
./ my_code Y> /my_code_z
only the first code is completed. The next two failed due to my_code.lst is in use.
That does not look anything at all like a request to run SAS.
Are you saying you have some shell script name my_code that you are running that takes a single argument. If you want more help show the details of that code.
One simple way to make SAS generate different filenames is to just run it starting in different directories. Byt default SAS will create the .log and .lst files in the current working directory. Even when the SAS program you are running is coming from a different directory.
So this program will run three SAS jobs in the background at the same time. They will all write log file named myfile.log and output file named myfile.lst , but each will be in a different directory.
cd /mydir/runA
sas /mydir/myfile.sas -sysparm A &
cd /mydir/runB
sas /mydir/myfile.sas -sysparm B &
cd /mydir/runC
sas /mydir/myfile.sas -sysparm C &
However you call these parallel runs, that's where you would change it. How are you starting these parallel runs? Please be specific and detailed. And please take a look at the reply from @Tom
This is the classic error you get with a SAS program that produces printed output but then you run it in batch mode without specifying where the LST output file gets written. If you are not interested in the printed output, add this to the top of your program:
ods listing off;
This will stop the LST files being written.
No idea what a deployment directory is, but you can tell SAS what name to use for the LOG and LST file by using the LOG and PRINT options on the command line.
sas myfile.sas -log myfile_v1.log -print myfile_v1.lst
sas myfile.sas -log myfile_v2.log -print myfile_v2.lst
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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: