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

Hw to delete a file from a server thru FTP done 4m mainframe


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Mon Jan 23, 2006 3:08 pm
Reply with quote

Hi all,

From mainframe side, thru JCL we can FTP to pull a text file from a server.

Suppose, that a file is pulled successfully into a dataset and processing is done.
Now, i will have to delete both the dataset created on mainframe side as well as the text file from the server.
But, could anybody let me know how to delete the text file on a server to be deleted thru FTP. (If possible - ASAP) These things will be thru JCL.

Regards,
Jaya.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Jan 23, 2006 3:36 pm
Reply with quote

If u wanna to delete the file from FTP server u can use

'mdel filename' such that it will delete it from the server.

View this link to know more about the ftp commands....

www.cs.colostate.edu/helpdocs/ftp.html
www.columbia.edu/acis/eds/data_tools/ftp-man/ftp_com.html
Back to top
View user's profile Send private message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Mon Jan 23, 2006 4:11 pm
Reply with quote

Hi khamarutheen,

Thanks for the quick reply.
Link is a good one with the basic stuffs.

Regards,
Jaya
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Mon Jan 23, 2006 4:31 pm
Reply with quote

No, you use the DELEte command to delete a single file:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/5.16?DT=20050708142126

MDelete is for deleting multiple files:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/5.39?DT=20050708142126
Back to top
View user's profile Send private message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Wed Jan 25, 2006 2:55 pm
Reply with quote

Hi all,

Thanks for the above clarification Prandip.

And there are some more queries reqarding FTP:
(1)In JCL we say
step1 exec pgm=FTP
Here, is this FTP a utility program or a module?
(2) We specify the FTP commands we want to use in a parmcard. In this we specify the IP address.
So, in this process, how is the mainframe connecting to the FTP environment.
Apart from this in my shop, we need to specify some FTPDATA where we give the connect time details etc.

Could anyone explain the whole process behind this FTP through JCL.


Regards,
Jaya.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Jan 25, 2006 3:19 pm
Reply with quote

Hi Jayalakshmi,

In my shop generally i connect in two ways

1. ftp yuibm
2. ftp 155.32.4.25

like wise. if i use option one then it is connected to the mainframe server(yuibm).. if u use option two it is connected to some FTP server. So the usage of ip address conect to FTP server and the name to mainframe server. The commands are passed thru the JCL and it is recognized by the server once according to the connection specification. Then the rest goes.. Hope understood. Let me know if any....
Back to top
View user's profile Send private message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Wed Jan 25, 2006 6:37 pm
Reply with quote

Hi khamarutheen,

Just need some help in debugging this piece of FTP code:
PROC:
Code:

//FTP001  EXEC PGM=FTP,PARM='&IP (EXIT'
//SYSERR    DD SYSOUT=*
//OUTPUT    DD SYSOUT=*
//SYSFTPD   DD DISP=SHR,DSN=SYS1.TCPPARMS(FTPCLIEN)
//INPUT     DD DSN=T&AREA..GENERAL.PARMLIB(&MEMB),DISP=SHR
//*


This Parmcard has the FTP commands:
I am not able to connect to the IP i specified.
Job abends saying
"CSV026I MODULE FTP NOT ACCESSED. PROGRAM ACCESS DATA SET RESTRICTION".

Regards,
Jaya.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 25, 2006 6:49 pm
Reply with quote

Jayalakshmi wrote:

"CSV026I MODULE FTP NOT ACCESSED. PROGRAM ACCESS DATA SET RESTRICTION".


Means that you don't have RACF authority to execute FTP.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Jan 25, 2006 7:03 pm
Reply with quote

Hi jaya,

Quote:
"CSV026I MODULE FTP NOT ACCESSED. PROGRAM ACCESS DATA SET RESTRICTION".


The error itself says that u dont have sufficient rights to access the FTP procedure.
Code:

//INPUT     DD DSN=T&AREA..GENERAL.PARMLIB(&MEMB),DISP=SHR


Seems to b wrong. Either it may b &TAREA.. like that..
check it of.. Let me know if any.

Use search option and type 'FTP' and choose category as JCL u may get some program by other users....
Back to top
View user's profile Send private message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Wed Jan 25, 2006 7:45 pm
Reply with quote

Hi,

That is definitely an access problem. Trying to sort out with our operation team.

Regarding the DSN name, it can be T&AREA..GENERAL.PARMLIB
'&AREA' will be passed according to country codes. So, it works and this will not create any problem.

Regards,
Jaya.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Email attachment from mainframe is empty PC Guides & IT News 9
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts Need help In Mainframe Automation AF/... CLIST & REXX 14
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
Search our Forums:

Back to Top