Operating System - HP-UX
1844202 Members
2532 Online
110229 Solutions
New Discussion

SAP ... error message: Can't exec external program (Exec format error)

 
SOLVED
Go to solution
Manuales
Super Advisor

SAP ... error message: Can't exec external program (Exec format error)

Hi everybody !!!

the problem in question is:

In SAP has been created a job, this job is goingo to run and execute a script named patito.sh

patito.sh contains:
########################################
#sleep 5
#cp dDDDD.pay dDDDD.pay.1
#sleep 5
#chmod 775 dDDDD.pay.1
#rm dbearn.pay
#sleep 5
#sleep 5
########################################
# Modified: Dec 13 2005 by ########################################
#!/usr/bin/csh
echo TEST | mailx -s "01 ORANGE ALERT " PATITO@CCC.com.mx

When the script has been executed from SAP, in job log it can see next message:
"Exec. prog.: Can't exec external program (Exec format error) Message no. 606 ..
External program was cancelled ..."

I'm attaching The solution says

If you have seen the solution there ... there says that is the kind of shell to be used ...

I have updated the script as follows:
patito.sh contains:
########################################
#sleep 5
#cp dDDDD.pay dDDDD.pay.1
#sleep 5
#chmod 775 dDDDD.pay.1
#rm dbearn.pay
#sleep 5
#sleep 5
########################################
# Modified: Dec 13 2005 by ########################################
#! /usr/bin/csh <- HERE IS THE UPDATED
echo TEST | mailx -s "01 ORANGE ALERT " PATITO@CCC.com.mx

The job was created and run from SAP and continue without been executed ....
continue the same error:
"Exec. prog.: Can't exec external program (Exec format error) Message no. 606 ..
External program was cancelled ..."

What could be?

Thanks, Manuales.
2 REPLIES 2
Chan 007
Honored Contributor
Solution

Re: SAP ... error message: Can't exec external program (Exec format error)

Man,

Why can't your run it via SM35/6 SAP Window.

Can you login as a SAP user and run the mailx -s TEST manuales@

Chan
Manuales
Super Advisor

Re: SAP ... error message: Can't exec external program (Exec format error)

Hi everybody !!!

the problem was a basic thing in shell scripting!!!!! >:( (i'm hungry .. jajajajaj)

it must be as follows :
#!/usr/bin/csh
#
#
#
.....
.....

and not as follows:
#
#
#
#!/usr/bin/csh
....
....


BTW..... Thanks Chan !!!!!

Manuales.