How can I run multiple .gss files one after another? I have tried using the command:
tgauss -b file1.gss,file2.gss
but this gives the error:
G0008 : Syntax error '.gss'
without the .gss extension, I get the error
G0008 : Syntax error '.gss'
I have also tried to run a separate .gss file containing:
run filename1.gss;
run filename2.gss;
but when executed, this only runs the first file and then stops.
Any help would be much appreciated.
6 Answers
0
EDIT: my apologies, the second error message should refer to the operand missing.
0
You can use run -r
in your GAUSS file. So make a file main.gss
(you can call it anything, but we will use this name here).:
run -r filename_1.gss;
run -r filename_2.gss;
run -r filename_3.gss;
Then you can execute the command:
tgauss -b main.gss
from your Operating System command prompt.
0
Thank you for your swift response. I am unable to run tgauss from my Operating System command prompt. I have tried changing my working directory in the command prompt to the folder containing tgauss and also the the folder containing the main.gss file, but in both instances I am getting the error in the terminal: tgauss command not found. Sorry if I am missing something obvious - I have tried copying over the tgauss file to the main.gss file directory and vice versa, but in both instanced I get the same error.
Thank you for your help with this problem.
0
OK, I thought you could call tgauss
successfully, just not with multiple files. tgauss
is the terminal (i.e. no user interface) version of GAUSS that is provided for running batch jobs.
- HOW TO RUN YOUR FILES WITH TGAUSS
The easist way to run tgauss
is to:
a) Change the working directory of your Operating System command prompt (Windows CMD, Mac Terminal, Linux Shell/Terminal) to the GAUSS installation directory (Windows: C:/gauss17, Mac /Users/YourUserName/gauss17, Linux the location you installed it. NOTE: replace 17 above with your GAUSS version number if it is not 17).
b) On Windows enter:
tgauss.exe -b main.gss
On Mac or Linux enter:
./tgauss -b main.gss
- HOW TO RUN YOUR FILES IN THE GAUSS USER INTERFACE
From the GAUSS Program Input/Output Window, enter:
run main.gss
0
Thank you for getting back to me. I tried both methods to no avail. I used the run main.gss command in Gauss I/O window, but only the first file runs and then ends. Following steps a and b, I am not sure why the batch file wont run given all individual routines run with no problem. I have removed the end commands also but this did not solve the problem. This is the output below if it is of any use.
Thank you for your help.
campus-10-31-85-195:gauss17 Zel$ ./tgauss -b main.gss
GAUSS 17.0.1 (Nov 15 2016, 4304) 64-bit
(C)Copyright 1984-2016 Aptech Systems, Inc.
All Rights Reserved Worldwide.
Job: main.gss ( /Users/Zel/gauss17 )
Mon Jul 31 14:05:41 2017, pid=7250, tid=140736395186656, uid=501 ( Zel )
/Users/Zel/Documents/
0.0000
error G0540 : Program terminated with END
/Users/Zel/gauss17/main.gss, line 2
Program execute failed
0
From what you posted, it looks like there is an end
statement still somewhere in your first program. You can verify that the general concept of running multiple files with run -r
works, by changing your main.gss
program from running your file, to running one of the GAUSS example programs such as ols.e
. Like:
run -r ols.e;
run -r ols.e;
Here is my output from doing this. Notice that the `ols` output is printed twice, indicating that the example file was run twice.
zeus:gauss17 jim$ #Print contents of 'main.gss' to terminal zeus:gauss17 jim$ cat main.gss run -r ols.e; run -r ols.e; zeus:gauss17 jim$ ./tgauss -b main.gss GAUSS 17.0.3 (Jan 24 2017, 4328) 64-bit (C)Copyright 1984-2017 Aptech Systems, Inc. All Rights Reserved Worldwide. Job: main.gss ( /Users/jim/gauss17 ) Thu Aug 10 10:23:07 2017, pid=69509, tid=140735099920384, uid=501 ( jim ) Valid cases: 100 Dependent variable: Y Missing cases: 0 Deletion method: None Total SS: 7.658 Degrees of freedom: 94 R-squared: 0.046 Rbar-squared: -0.005 Residual SS: 7.307 Std error of est: 0.279 F(5,94): 0.901 Probability of F: 0.484 Standard Prob Standardized Cor with Variable Estimate Error t-value >|t| Estimate Dep Var ------------------------------------------------------------------------------- CONSTANT 0.523174 0.028551 18.324352 0.000 --- --- X1 0.039865 0.033480 1.190707 0.237 0.121184 0.106851 X2 -0.037269 0.028504 -1.307482 0.194 -0.132293 -0.129994 X3 -0.020150 0.030313 -0.664738 0.508 -0.067141 -0.072746 X4 -0.024109 0.027511 -0.876359 0.383 -0.088512 -0.094787 X5 0.013825 0.026378 0.524120 0.601 0.053221 0.043402 Results of this run stored in ols_output.txt file The file will be found in your working directory Valid cases: 100 Dependent variable: Y Missing cases: 0 Deletion method: None Total SS: 7.658 Degrees of freedom: 94 R-squared: 0.046 Rbar-squared: -0.005 Residual SS: 7.307 Std error of est: 0.279 F(5,94): 0.901 Probability of F: 0.484 Standard Prob Standardized Cor with Variable Estimate Error t-value >|t| Estimate Dep Var ------------------------------------------------------------------------------- CONSTANT 0.523174 0.028551 18.324352 0.000 --- --- X1 0.039865 0.033480 1.190707 0.237 0.121184 0.106851 X2 -0.037269 0.028504 -1.307482 0.194 -0.132293 -0.129994 X3 -0.020150 0.030313 -0.664738 0.508 -0.067141 -0.072746 X4 -0.024109 0.027511 -0.876359 0.383 -0.088512 -0.094787 X5 0.013825 0.026378 0.524120 0.601 0.053221 0.043402 Results of this run stored in ols_output.txt file The file will be found in your working directory zeus:gauss17 jim
Once you can confirm that this works, we can help you figure out why your first program will not run to completion.
Your Answer
6 Answers
EDIT: my apologies, the second error message should refer to the operand missing.
You can use run -r
in your GAUSS file. So make a file main.gss
(you can call it anything, but we will use this name here).:
run -r filename_1.gss;
run -r filename_2.gss;
run -r filename_3.gss;
Then you can execute the command:
tgauss -b main.gss
from your Operating System command prompt.
Thank you for your swift response. I am unable to run tgauss from my Operating System command prompt. I have tried changing my working directory in the command prompt to the folder containing tgauss and also the the folder containing the main.gss file, but in both instances I am getting the error in the terminal: tgauss command not found. Sorry if I am missing something obvious - I have tried copying over the tgauss file to the main.gss file directory and vice versa, but in both instanced I get the same error.
Thank you for your help with this problem.
OK, I thought you could call tgauss
successfully, just not with multiple files. tgauss
is the terminal (i.e. no user interface) version of GAUSS that is provided for running batch jobs.
- HOW TO RUN YOUR FILES WITH TGAUSS
The easist way to run tgauss
is to:
a) Change the working directory of your Operating System command prompt (Windows CMD, Mac Terminal, Linux Shell/Terminal) to the GAUSS installation directory (Windows: C:/gauss17, Mac /Users/YourUserName/gauss17, Linux the location you installed it. NOTE: replace 17 above with your GAUSS version number if it is not 17).
b) On Windows enter:
tgauss.exe -b main.gss
On Mac or Linux enter:
./tgauss -b main.gss
- HOW TO RUN YOUR FILES IN THE GAUSS USER INTERFACE
From the GAUSS Program Input/Output Window, enter:
run main.gss
Thank you for getting back to me. I tried both methods to no avail. I used the run main.gss command in Gauss I/O window, but only the first file runs and then ends. Following steps a and b, I am not sure why the batch file wont run given all individual routines run with no problem. I have removed the end commands also but this did not solve the problem. This is the output below if it is of any use.
Thank you for your help.
campus-10-31-85-195:gauss17 Zel$ ./tgauss -b main.gss
GAUSS 17.0.1 (Nov 15 2016, 4304) 64-bit
(C)Copyright 1984-2016 Aptech Systems, Inc.
All Rights Reserved Worldwide.
Job: main.gss ( /Users/Zel/gauss17 )
Mon Jul 31 14:05:41 2017, pid=7250, tid=140736395186656, uid=501 ( Zel )
/Users/Zel/Documents/
0.0000
error G0540 : Program terminated with END
/Users/Zel/gauss17/main.gss, line 2
Program execute failed
From what you posted, it looks like there is an end
statement still somewhere in your first program. You can verify that the general concept of running multiple files with run -r
works, by changing your main.gss
program from running your file, to running one of the GAUSS example programs such as ols.e
. Like:
run -r ols.e;
run -r ols.e;
Here is my output from doing this. Notice that the `ols` output is printed twice, indicating that the example file was run twice.
zeus:gauss17 jim$ #Print contents of 'main.gss' to terminal zeus:gauss17 jim$ cat main.gss run -r ols.e; run -r ols.e; zeus:gauss17 jim$ ./tgauss -b main.gss GAUSS 17.0.3 (Jan 24 2017, 4328) 64-bit (C)Copyright 1984-2017 Aptech Systems, Inc. All Rights Reserved Worldwide. Job: main.gss ( /Users/jim/gauss17 ) Thu Aug 10 10:23:07 2017, pid=69509, tid=140735099920384, uid=501 ( jim ) Valid cases: 100 Dependent variable: Y Missing cases: 0 Deletion method: None Total SS: 7.658 Degrees of freedom: 94 R-squared: 0.046 Rbar-squared: -0.005 Residual SS: 7.307 Std error of est: 0.279 F(5,94): 0.901 Probability of F: 0.484 Standard Prob Standardized Cor with Variable Estimate Error t-value >|t| Estimate Dep Var ------------------------------------------------------------------------------- CONSTANT 0.523174 0.028551 18.324352 0.000 --- --- X1 0.039865 0.033480 1.190707 0.237 0.121184 0.106851 X2 -0.037269 0.028504 -1.307482 0.194 -0.132293 -0.129994 X3 -0.020150 0.030313 -0.664738 0.508 -0.067141 -0.072746 X4 -0.024109 0.027511 -0.876359 0.383 -0.088512 -0.094787 X5 0.013825 0.026378 0.524120 0.601 0.053221 0.043402 Results of this run stored in ols_output.txt file The file will be found in your working directory Valid cases: 100 Dependent variable: Y Missing cases: 0 Deletion method: None Total SS: 7.658 Degrees of freedom: 94 R-squared: 0.046 Rbar-squared: -0.005 Residual SS: 7.307 Std error of est: 0.279 F(5,94): 0.901 Probability of F: 0.484 Standard Prob Standardized Cor with Variable Estimate Error t-value >|t| Estimate Dep Var ------------------------------------------------------------------------------- CONSTANT 0.523174 0.028551 18.324352 0.000 --- --- X1 0.039865 0.033480 1.190707 0.237 0.121184 0.106851 X2 -0.037269 0.028504 -1.307482 0.194 -0.132293 -0.129994 X3 -0.020150 0.030313 -0.664738 0.508 -0.067141 -0.072746 X4 -0.024109 0.027511 -0.876359 0.383 -0.088512 -0.094787 X5 0.013825 0.026378 0.524120 0.601 0.053221 0.043402 Results of this run stored in ols_output.txt file The file will be found in your working directory zeus:gauss17 jim
Once you can confirm that this works, we can help you figure out why your first program will not run to completion.