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

How to specify PC directory to perform FTP


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

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Tue Dec 27, 2005 3:20 pm
Reply with quote

Hi guys..
I already create JCL FTP to ftp dataset from mainframe to PC..
But, i stuck to specify the directory on my PC.i got error ""C:\MEPS" contains an invalid character". How can i specify it?
Below is the error after i compile my JCL..

EZA1460I Command:
EZA1736I LCD FTP
EZA2081I Local directory name set to partitioned data set PEP1001.FTP
EZA1460I Command:
EZA1736I CD C:\MEPS
EZA1701I >>> CWD C:\MEPS
501 A qualifier in "C:\MEPS" contains an invalid character
EZA1460I Command:
EZA1736I PUT //DD:SYSUT1
EZA1685W Invalid local file identifier
EZA1460I Command:
EZA1736I QUIT
EZA1701I >>> QUIT
221 Quit command received. Goodbye.

TQ..
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Dec 27, 2005 3:23 pm
Reply with quote

I'm not an expert, but from what a quick Google search found, the >cd command only supports a change to a directory name, not to a drive. You should investigate the FTP protocol standards further, but my gut instinct is that a change to another drive is probably prohibited.
Back to top
View user's profile Send private message
SHAILESH OZA

New User


Joined: 10 Jun 2005
Posts: 21
Location: Mumbai

PostPosted: Tue Dec 27, 2005 3:57 pm
Reply with quote

I think you have to write like this

CD /MAPS


Genarally we are transfering from PC to mainframe dataset
CD /path
PWD
LOCSITE LRECL= XXX , BLKSIZE=XXXX PRIMARY=XX SECONDARY=XX
GET filename.txt (from the path folder)
QUIT
Back to top
View user's profile Send private message
Imran

New User


Joined: 26 Dec 2005
Posts: 12
Location: Pune

PostPosted: Tue Dec 27, 2005 5:14 pm
Reply with quote

Hi Shailesh

If u want it on ur machine then i can suggest ftp through MS-DOS.

1. Go to run.
2. Type cmd. enter
3. DOS Prompt opens up.
4. Type \cd.enter
5. It will ask for RACFID.
6. TYPE ID AND ENTER. It will ask for password.
7. Then type this. GET 'FILENAME' Receiving.file.name
8. Press enter.

If u face any difficulty then mail me .

all the best.

Regards
Imran
mzshaik@kanbay.com
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Wed Dec 28, 2005 7:25 am
Reply with quote

Hi guys..

Here is my simple FTP JCL..
My problem is, the file not transfered to my PC directory, it transfered to dataset in user.ftp..
How can make the file ftp to my PC directory??
Code:

//FTPJOB JOB 090000,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,             
//         REGION=3072K                                             
//*                                                                 
//*                                                                 
//FTP      EXEC PGM=FTP                                             
//OUTPUT   DD SYSOUT=*                                               
//SYSUT1   DD DSN=USER.FTP(FTPGET1),DISP=SHR                     
//SYSIN    DD *                                                     
// DD DSN=USER.FTP(INFO),DISP=SHR        *MY USER ID AND PASSWORD
// DD *                                                             
LCD FTP                                                             
CD \MAP             *My PC directory                                               
PUT //DD:SYSUT1 'MAP\TEST.TXT'                                     
QUIT
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 Dec 28, 2005 7:44 pm
Reply with quote

Your job worked OK at my end with a couple of minor tweaks:
Code:

//*                                                                 
//FTP      EXEC PGM=FTP                                             
//OUTPUT   DD SYSOUT=*                                               
//SYSUT1   DD DSN=USER.FTP(FTPGET1),DISP=SHR                     
//SYSIN    DD *                                                     
// DD DSN=USER.FTP(INFO),DISP=SHR        *MY USER ID AND PASSWORD
// DD *                                                             
LCD FTP <= Not Really Necessary                                                     
CD \MAP                                                             
PUT //DD:SYSUT1 TEST.TXT
QUIT

which FTP'd the contents of 'USER.FTP(FTPGET1)' to \MAP\TEST.TXT.
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Thu Dec 29, 2005 8:13 am
Reply with quote

Thank for reply super k..

Quote:
which FTP'd the contents of 'USER.FTP(FTPGET1)' to \MAP\TEST.TXT.

May i know, this diretory \MAP\TEST.TXT is on your PC or on your mainframe?

When i submitted the JCL i got this msg..
Quote:

EZA1460I Command:
EZA1736I CD \MAP
EZA1701I >>> CWD \MAP
501 A qualifier in "\MAP" begins with an invalid character
EZA1460I Command:
EZA1736I PUT //DD:SYSUT1 TEXT.TXT
EZA1685W Invalid local file identifier
EZA1460I Command:
EZA1736I QUIT
EZA1701I >>> QUIT
221 Quit command received. Goodbye.


Mm..how to solve i?
Back to top
View user's profile Send private message
SHAILESH OZA

New User


Joined: 10 Jun 2005
Posts: 21
Location: Mumbai

PostPosted: Thu Dec 29, 2005 10:48 am
Reply with quote

Hi That file /map/testfile.txt should not be from your normal pc. if you are using IBMFTP utility thorough JCL for converting notepad.txt to DATASET or vicevers then
There should be link between mainframe and the server on which the file is residing. otherwise if you want to convert txt file from your pc to mainframe dataset then use OPTION 6(COMMAND) in ISPF menu.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Dec 29, 2005 11:38 am
Reply with quote

mrar_160 wrote:
May i know, this diretory \MAP\TEST.TXT is on your PC or on your mainframe?

On the PC.
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Tue Jan 03, 2006 12:25 pm
Reply with quote

Superk,
in the USER.FTP(INFO),DISP=SHR, the IP address you put your PC's IP or host IP?
My one, i put host IP..
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jan 03, 2006 4:36 pm
Reply with quote

You put the target FTP server's (the PC) IP address.
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Wed Jan 04, 2006 7:38 am
Reply with quote

Thank superk..
I will try..i have tried before, but i think i got problem with my port..
I think port is not open for FTP from host to PC..
Back to top
View user's profile Send private message
bidhucsc

New User


Joined: 24 Dec 2007
Posts: 10
Location: India

PostPosted: Tue Oct 06, 2009 12:16 pm
Reply with quote

For me the port is open. But its saying Access denied to the TXT file that I am writing to. Here is the JCL o/p.

Code:
EZA1736I FTP 20.198.0.174                                                       
EZY2640I Using dd:SYSFTPD=SYS1.TCPPARMS(FTPDATA) for local site configuration pa
EZA1450I IBM FTP CS V1R9                                                       
EZA1466I FTP: using TCPIP                                                       
EZA1554I Connecting to:   20.198.0.174 port: 21.                               
220 Microsoft FTP Service                                                       
EZA1459I NAME (20.198.0.174:IND4726):                                           
EZA1701I >>> USER asiapac\bbhusan                                               
331 Password required for asiapac\bbhusan.                                     
EZA1789I PASSWORD:                                                             
EZA1701I >>> PASS                                                               
230 User asiapac\bbhusan logged in.                                             
EZA1460I Command:                                                               
EZA1736I sendsite                                                               
EZA1611I Usage of SITE command with PUT is OFF                                 
EZA1460I Command:                                                               
EZA1736I BINARY                                                                 
EZA1701I >>> TYPE I                                                             
200 Type set to I.                                                             
EZA1460I Command:                                   
EZA1736I PUT 'IND4726.INPUT1' TEST.TXT               
EZA1701I >>> PORT 20,15,82,10,15,7                   
200 PORT command successful.                         
EZA1701I >>> STOR TEST.TXT                           
550 TEST.TXT: Access is denied.                     
EZA1460I Command:                                   
EZA1736I QUIT generated by unexpected end of file   
EZA1701I >>> QUIT                                   
221


Here is my JCL

Code:
//IND4726X JOB (T-0M1D-T104),'FTP',                   
//             CLASS=A,NOTIFY=IND4726,                 
//             MSGCLASS=T,TIME=,                       
// USER=IND4726,PASSWORD=                             
/*JOBPARM ROOM=RRRR,S=SYSF                             
//*====================================================
//* SEND TERSED DUMP TO ASG                           
//*====================================================
//SEND      EXEC PGM=FTP,PARM='20.198.0.174'           
//SYSPRINT  DD SYSOUT=*                               
//OUTPUT    DD SYSOUT=*                               
//SYSTCPD   DD DISP=SHR,DSN=SYS1.TCPPARMS(TCPDATA)     
//SYSFTPD   DD DISP=SHR,DSN=SYS1.TCPPARMS(FTPDATA)     
//INPUT     DD *                                       
user                                                   
password                                               
sendsite                                               
BINARY                                                 
PUT 'IND4726.INPUT1' test.txt                             


Can anyvody help ?[/code]
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: Tue Oct 06, 2009 2:49 pm
Reply with quote

Any reason you're responding to a post almost 4 years old instead of starting your own thread?

You need to contact the person responsible for the server you are wanting to put your data on and have them give you access to write files. It may be that your id was set up to only write to a certain directory already, in which case you need a CD command in your FTP commands. In either case, you must contact someone at your site about this -- we cannot change write permissions on the server for you.
Back to top
View user's profile Send private message
bidhucsc

New User


Joined: 24 Dec 2007
Posts: 10
Location: India

PostPosted: Tue Oct 06, 2009 3:11 pm
Reply with quote

I thought this is the rule. If I start a new thread, the moderator will say search the threads. Since I think this thread was not complete I thought of using it.

BTW, I found the solution. In MS FTP services running in my PC, the Write access was unchecked. Now I am able to do the FTP from Mainframe to PC.

Thanks for your help.
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Thu Oct 15, 2009 2:39 pm
Reply with quote

I got an email notification about this tread..

Unfortunetly, i'm not mainframe programmer yet.. icon_sad.gif .. Go Back to server..

Tq a lot everbody and IBMMAINFRAMES moderator..
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 Use of Perform Thru Exit COBOL Programming 6
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts Determining Active VM Directory All Other Mainframe Topics 0
No new posts Batch JCL to Copy from Unix Directory... JCL & VSAM 5
Search our Forums:

Back to Top