The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Secure File Transfer for Mainframe systems sydneymoon Security 3 01-11-2008 08:13 PM
PSI consolidates IBM mainframe, Unix, Linux and Windows on single box - Search390.com iBot UNIX and Linux RSS News 0 09-26-2007 11:30 AM
mainframe assembler file into Unix thambi Shell Programming and Scripting 1 08-23-2007 07:42 AM
USS (unix) on the Mainframe Javagate UNIX for Dummies Questions & Answers 2 04-13-2004 09:41 PM
USS (unix) on the Mainframe Javagate Post Here to Contact Site Administrators and Moderators 2 04-13-2004 05:53 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-05-2006
satyaj_99 satyaj_99 is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 1
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.
  #2 (permalink)  
Old 12-05-2006
Darwin_ Darwin_ is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 23
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

Last edited by reborg; 12-05-2006 at 06:48 PM.. Reason: get rid of the unintended smiley
  #3 (permalink)  
Old 12-05-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0