IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to delete the input file after FTP


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Thu Sep 11, 2008 4:47 pm
Reply with quote

I'm doing an FTP from server(Input) to mainframe(Output) and the job is working fine, is there any way to delete the file present on the server after the FTP step?
Back to top
View user's profile Send private message
XungoPejcao

New User


Joined: 04 Sep 2008
Posts: 5
Location: EspaƱa

PostPosted: Thu Sep 11, 2008 5:12 pm
Reply with quote

You can use the command FTP "delete" that delete remote file.

Code:

get    FILE_UNIX.TXT         
delete FILE_UNIX.TXT
close                               
end     
Back to top
View user's profile Send private message
Srinivasa Rao

New User


Joined: 21 Jun 2005
Posts: 75

PostPosted: Thu Sep 11, 2008 5:20 pm
Reply with quote

Hi,

I am not unix person... but I did not see delete command in UNIX.

rm is used for removing file...

You can use

get file.txt
rm file.txt
quit
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 11, 2008 5:29 pm
Reply with quote

FTP is not UNIX. You can use the DELETE (or even DIR) command in FTP and get the expected results.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 11, 2008 5:31 pm
Reply with quote

Clarification: DIR works in FTP just like LS -- check the Communications Server User's Guide manual for all the FTP commands. But don't think they are UNIX commands!
Back to top
View user's profile Send private message
Srinivasa Rao

New User


Joined: 21 Jun 2005
Posts: 75

PostPosted: Thu Sep 11, 2008 6:17 pm
Reply with quote

Sorry my mistake...

As Robert said these are not unix commands.

We are using windows servers and FTPing data to and from windows servers.

Please ignore my previous posting...

In windows we are using as below

IP Address
User Id
Password
cd /path name
PWD
type a
GET file name 'dataset name' (replace
delete file name
quit

Not sure about unix part...
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Sep 11, 2008 7:00 pm
Reply with quote

Normally in z/os mainframe we are using the following
Code:

(EXIT                                                       
servername                                       
username                                               
password                                                   
Type                                                 
locsi ( lrecl and file type)                             
GET Server_ file_ Name 'Mainframe File Name' (REPLACE
DELETE Server_ file_ Name
quit                                                       
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Sep 12, 2008 7:51 pm
Reply with quote

Hi Robert

can you post the link for Communications Server User's Guide manual. i tried it but could not find that manual..
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Sep 13, 2008 4:19 am
Reply with quote

http://publibz.boulder.ibm.com/epubs/pdf/f1a1b970.pdf Chapter 5 has the commands.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
Search our Forums:

Back to Top