Hello everyone,
I have a shell script in unix whose name is : batching.csh
Here is the code inside this file:
#!/bin/ksh cd /Program_Directory/ sas prog_1.sas &
My problem is when I run this script it told me "Command not found"
xnzspap23x-tcsh-23$ batching.csh batching.csh: Command not found.
This is my first time create a shell script in unix, please help me!
Thank you!
First figure out the command line that you need directly in Unix.
Then you incorporate those into a sh file that you call from Unix and test
Then you test it in SAS.
Which step are you on now?
When you save it make sure it gets saved with the .sh extension and doesn't get named filename.sh.txt or something of the sort.
I would not use something as crude as Windows Notepad for programming work (which inlcudes shell scripting).
Actually, I still use vi for scripts
- is available on ALL UNIX platforms with the same syntax
- works even over a simple telnet connection, as it does not need any function keys/mousing around/etc
- can edit files of arbitrary size, although it might change to line mode with sufficiently large files.
If you are working on UNIX from Windows, I recommend using notepad++, as it can write text files in UNIX mode (LF instead of CRLF), provides a hex display mode, and lots of other features that are helpful when writing any type of code.
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.