Note: If you arrived at this page directly
using a search engine such as Google then this may not be the "Spectre"
you are looking for. There are a few software packages of this name. This
"Spectre" is to do with clinical trials reporting.
There are a number of steps to installing Spectre. Some changes to a shell script are needed. Other changes require a lot of thought, such as how to allocate libraries for your sas programs as Spectre might need this to be done differently to your established method. I will be updating this page as I get feedback from users who have attempted to do this installation. There will be things I have missed out and places where I have given unclear instructions so please send me feedback by email on what is missing or what is wrong so that I can improve this page. There is a contact link for me at the bottom of this page.
If you are doing this installation yourself and you have never done an installation like this before then use the following guidelines:
echo .* |
When I installed Cygwin on my PC it automatically put my .bashrc member in my home directory. This is the correct situation. However, I am hearing of plenty of cases where a Cygwin installation was done but this .bashrc member was found to be missing. This is an error and how to correct this will be explained here.
If your .bashrc member is missing or empty then you should copy it from /etc/defaults/etc/skel/.bashrc
To test that your .bashrc in your home directory is being called
then add the following command near the top of the file:
echo Hello from my .bashrc |
....then when you start up your Cygwin session next time this "Hello from my .bashrc" message should be displayed. If it is, then that is good. You can delete this test message from your .bashrc member when you make the edits to it as detailed in the next section "Changes to .bashrc".
If you do not see this message when you start Cygwin, even though you put the above command in your .bashrc member, then something is wrong. You will be given instructions here to resolve this situation to make sure your .bashrc member in your home directory is actually being run (sourced) when you start Cygwin.
First check your home directory and what shell is defined to you in
the /etc/passwd file. Browse this file and take a look. I have an
"Roland" entry shown below. The last two field members (separated by colons)
are "/home/Roland" that says where my home directory is and "/bin/bash"
that says my start-up shell is "bash".
If your home directory entry
is not in the form /home/something then edit this file to correct it
(after making a backup). Also, your start-up shell must be "/bin/bash"
otherwise it will not call your .bashrc member so change it to this
if it is not.
Roland:unused_by_nt/2000/xp:1006:513:U-DELL1\Roland,S-1-5-21-2888820645-753754486-1581935503-1006:/home/Roland:/bin/bash |
Your .bashrc member is "sourced" from your .bash_profile member in your home directory. If your .bash_profile member is missing or empty then you should copy it from /etc/defaults/etc/skel/.bash_profile
It could be that the problem is in your .bash_profile member.
Near the top of that member you should see it "sourcing" the .bashrc
file as follows:
# source the users bashrc if it exists
if [ -e "${HOME}/.bashrc" ] ; then source "${HOME}/.bashrc" fi |
Maybe you see something like that in your .bash_profile member
but for some reason it is commented out. Try uncommenting it by removing
the leading "#" from the script code so it looks the same as above. Also,
make sure your system environment variable HOME is resolving OK by using
this command.
$ echo $HOME
/home/Roland |
Do you get a "/home/something" result like I do? If you get nothing then your HOME environment variable is not set and bash will look for the .bashrc file in the top directory /.bashrc
You must get your .bashrc member active and working before you can continue with the Spectre installation. I believe the actions above will resolve all situations where your .bashrc is not being sourced. I am no Cygwin expert, though, so if you have tried the above and you still can not get out your "Hello from my .bashrc" test message from the command you put in your .bashrc member then you will have to ask for help on the Cygwin mailing list aimed at getting your .bashrc member sourced, after you have tried searching through the archives at www.cygwin.com to try to resolve your problem. Nothing less than this will get your problem resolved. Do not continue with the installation of Spectre until this has been resolved. When you do resolve it fully, in the sense that you get your .bashrc working, rather than using a workaround, then please let me know by email what your problem was and how it was resolved so I can expand this section to help other installers.
# Add Spectre scripts to the path as well as the sas executables
# For SAS Learning Edition 1.0 on Windows 98 #PATH=$PATH:/cygdrive/c/spectre/scripts:/cygdrive/c/PROGRA~1/SASINS~1/SAS/v8 # For SAS Learning Edition 4.1 on Windows XP - note that file names
containing spaces must be quoted
# Set up HOMEW as a Windows path so SAS on Windows knows where my
home directory is
export HOMEW |
I do not like any of the editors that come with Cygwin so for editing
a file I use Wordpad and for browsing a file I use "less". I have
no problem accessing "less" but in order to be able to use Wordpad I have
to define its location to my PATH as shown below. You might choose to do
the same. Note that if you use Wordpad as an editor or browser then it
will not understand unix-style path names. It will only work properly for
files without a path that are in the current directory.
# Make Wordpad available as an editor
PATH=$PATH:/cygdrive/c/"Program Files"/"Windows NT"/Accessories |
Before any changes....
@echo off
C:
bash --login -i |
Here is my edited version. Note that you must have the CYGWIN variable set up for Spectre scripts to work correctly. This may be set even though there is no entry in cygwin.bat. To find out, use the command "set | grep CYGWIN" to see if you get a line that starts with "CYGWIN=". Also, if you are going to use Wordpad as an editor, then you must define its location to the PATH statement as I showed you above in the changes to .bashrc . You can also assign Wordpad to VISUAL but I do not like to this this as it allows the user to edit the file they open which I do not want. There is no option you can use with Wordpad to open it in read-only mode, which is a shame. Note that if you use Wordpad as an editor or browser then it will not understand unix-style path names. It will only work properly for files without a path that are in the current directory.
After the changes I made....
@echo off
C: chdir C:\cygwin\bin set EDITOR=wordpad set VISUAL=less set CYGWIN=codepage:oem tty binmode title rxvt -e bash --login -i |
Allocation of Libraries for Spectre
Once you know the names of the two libraries then you are ready to download. Both the macros and scripts come as zip files and the links to download them are highlighted in this sentence. Some of the files are not wanted and you will be told which ones to delete after you have unzipped them into their folders.
For the macros you should delete any html and text files so delete "*.html" and "*.txt".
For the scripts you do not need any of the html or text files so delete "*.html", "*.txt"..
Note that the scripts have to be executable. The following command should
make them so if issued from the same directory.
chmod +x * |
newix |
What happened? Is the "@index.txt" file correctly created when you run the "newix" command? This is the first hurdle to overcome in the installation process. The supplied @index.txt for macros looks like this and for scripts it looks like this. Is that what you got? Did you get any file created? You might have got a script error, in which case you can probably fix it. If you got an error within the SAS software code that caused it to stop then there is no log file. The reason there is no log file is because it gets deleted at the end of the script. To stop it being deleted then put a "#" in front of the log file name. That turns the rest of the line into a commant. Once it is working then remove the "#" you added. When you have got over this hurdle then relax. The first hurdle has been overcome.
showfmts |
What happened? If you got nothing then keep the sas log by putting a "#" in front of its name in the delete statement at the end of the script. You may have to add the "mprint" option to the SAS software code in that script to help work out what is wrong.
When you get it working then try out the "showfmt" script as well on one of the formats listed out by the "showfmts" script. Character formats will need to have the dollar sign preceded by a "\" escape character to stop Unix assuming it is a Unix variable. Try showfmt on a numeric variable if need be. Does it work?
This is the second hurdle. Once this has been overcome then the rest should be easy.
chmod g-w * |
It would be a good idea if the directory itself had no update access for the users otherwise one of them might manage to delete one or two of the members.
Use the "Back" button of your browser to return to the previous page.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.