Moving file from Mainframe to Unix

Hi I m an absolute dummy on UNIX, I m basically a SAP guy. but I require a file which is stored on the mainframe to be moved to Unix application server. I got the following script to do it from someone

#! /usr/local/bin/move_prom
REMOTE_HOST=158.52.246.30 # Hostname of the remote Mainframe system
export USER=LPDRP # Username on mainframe
export PASSWD=LPDRP # Passsword on mainframe
REMOTE_FILE=TB@PARTS.PROMMSTR.DEC05 # Filename on remote mainframe system
LOCAL_FILE=/data/keep/psp/sc/PROM.TXT # Local filename to be created
/usr/lbin/secftpbatch $REMOTE_HOST ascii get $REMOTE_FILE $LOCAL_FILE
exit 0

but if i run the file as follows
> csh myfilename.sh

It gives me "command not found" error for each statement. So basically I dont know how to even run this file. Could someone help.

Normally I use Connect Direct for copying files from Mainframes to UNIX systems and vice versa and I dont know whether it works the way you tried or not since Im not quite familiar with mainframes.

I think one thing you got wrong there is the She-Bang.

#! /usr/local/bin/move_prom indicates that all commands in your shell script are being processed by the binary /usr/local/bin/move_prom ... Ive never heard of something like this. You should rather try using a shell to execute a shell script.

#!/bin/ksh

for example or any other shell available.

Afterwards you need to make it executable with something like

# chmod +x yourscript.sh

and then run it

# ./yourscript.sh

...

If something doesnt work paste the output you get and I will try to help.

Good luck.

Darwin

What is SAP? Anyway that script is not in the csh language. Try sh instead of csh. If you still have trouble, run this command:
uname -a
and post the result so we know what version of unix you have.