Problem Note 49643: Script files that are built by the SAS® Management Console Schedule Manager fail and generate the error "command not found"
In SAS® Management Console, the Schedule Manager connects to a SAS Workspace Server to generate a shell script. This shell script runs SAS® jobs that are targeted to a UNIX scheduling server. When you run the workspace server with UTF–8 or a similar encoding, the shell script files might be generated with a UTF–8 byte–order mark (BOM). This mark causes the script to fail with one of the following messages (or possibly, other messages) in the job e–mail:
Error 1
Subject: Output from your job nn
/bin/bash: line 2: #!: command not found
Error 2
Subject: Output from your job nn
zsh: command not found: \M-o\M-;\M-?#!
Later in the job e–mail, you might receive a copy of the script that shows odd characters such as the following, similar to those in Error 2 above.
#! /bin/sh
If you examine the script in an ASCII text editor, you do not see anything unusual. You only see the following line:
#! /bin/sh
However, if you examine the script file with a hexadecimal display editor, you see the following characters:
EF BB BF 23 21 20 2F 62 69 6E 2F 73 68
The character string EF BB BF is the Unicode BOM. When you remove these characters from the file, the script runs. If the SAS jobs that you are scheduling do not require UTF-8 support, a workaround is available. This workaround sets the workspace server that is associated with the scheduler so that it uses a normal ASCII encoding.
To enable the workaround:
- Open the sasv9_usermods.cfg file in the SchedulingServer folder or directory. Look for SchedulingServer under the appropriate server context for your system.
- Add the ENCODING option with the encoding value that you want to use, as shown in this example:
-encoding latin1
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Operating System Services Scheduling Server | 64-bit Enabled AIX | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
HP-UX IPF | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
Linux | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
Linux for x64 | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
Solaris for x64 | 9.3 | 9.4 | 9.3 TS1M1 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2013-04-12 12:56:02 |
Date Created: | 2013-04-12 08:36:07 |