View previous topic :: View next topic
|
Author |
Message |
ssuthagar
New User
Joined: 03 Oct 2017 Posts: 6 Location: United States
|
|
|
|
Hi Serniors,
My requirement is to get the number of files from UNIX MID server to OMVS. I need to concatenate these files from UNIX box or in OMVS. I tried below command to concatenate files after getting into the respective directory
cat *.csv > infile1.csv
infile1 is my output file.
I am getting an error as below
sftp> cat *.csv > infile1.csv
FOTS0822 Invalid command.
Can someone thrown some light on how to handle this situation.
Thanks,
Suthagar |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1222 Location: Bamberg, Germany
|
|
|
|
As you seem to be working interactively from within the sftp command, you should switch to the shell first.
Code: |
sftp>!
cat *.csv > infile1.csv
exit
sftp> .. whatever you need to do the put/get
|
|
|
Back to top |
|
|
ssuthagar
New User
Joined: 03 Oct 2017 Posts: 6 Location: United States
|
|
|
|
Thanks,
My original script is
Code: |
cd /nextgen/fwss_data/incoming
# List contents of mid server before getting files to OMVS
ls -l
cat *.csv > infile1.csv
ls -l
ascii
get /nextgen/fwss_data/incoming/infile1.csv /u/cscsxa/new/fwss1
rm /nextgen/fwss_data/incoming/infile1.csv
ls -l |
I am getting an error at
Code: |
cat *.csv > infile1.csv
as
sftp> cat *.csv > infile1.csv
FOTS0822 Invalid command. |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1222 Location: Bamberg, Germany
|
|
|
|
cat is not a valid sftp command (see man page). Do the concat before you call the ftp script. |
|
Back to top |
|
|
|