Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to delete the input file after FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to delete the input file after FTP
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    Post subject: Reply to: How to delete the input file after FTP
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    Post subject:
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: 7996
Location: Bellevue, IA

PostPosted: Thu Sep 11, 2008 5:29 pm    Post subject:
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: 7996
Location: Bellevue, IA

PostPosted: Thu Sep 11, 2008 5:31 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: How to delete the input file after FTP
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: 7996
Location: Bellevue, IA

PostPosted: Sat Sep 13, 2008 4:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts splitting of file using XMITIP abdulrafi TSO/ISPF 3 Mon Mar 27, 2017 3:01 pm
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us