FTP : How can I use this facility?

This forum provides the support of Dezhi Mainframe systems. Please post your questions about logon, usage of our mainframe environment.

Moderators: sysprog, prino, sfan, steve-myers, Tim001

FTP : How can I use this facility?

Postby mainframer » Wed 05 May 2010, 02:48

Hi Team,
I am trying FTP by following all possible methods. But when I put ip address/efglobe.com, it says Connection Timed Out.
On this forum I read in Z/Os it is not available for Public, But is was a year old post, therefore I could dare to raise this question again.
If YES, please tell me how?

If No, then please tell me is there any possibility to transfer files from PC to Fandezhi server and Vice-verse.

Thnx in advance. ;)
Pls reply.........I am waiting :roll:


Your loving Mainframer.
mainframer
 
Posts: 13
Joined: Fri 26 Feb 2010, 15:33

Re: FTP : How can I use this facility?

Postby MrSpock » Wed 05 May 2010, 02:52

I've had no problem connecting from Dezhi to an open public FTP site. I would imagine that connections are only allowed to be outbound.
MrSpock
 
Posts: 2
Joined: Fri 26 Feb 2010, 02:21

Re: FTP : How can I use this facility?

Postby prino » Wed 05 May 2010, 05:59

mainframer wrote:I am trying FTP by following all possible methods. But when I put ip address/efglobe.com, it says Connection Timed Out.
On this forum I read in Z/Os it is not available for Public, But is was a year old post, therefore I could dare to raise this question again.
If YES, please tell me how?

If No, then please tell me is there any possibility to transfer files from PC to Fandezhi server and Vice-verse.


No. The way to do it is to use FTP from z/OS, or to use the good old faithful and rather slow IND$FILE method, which is supported by about every emulator.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
Some programming here :mrgreen:
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: FTP : How can I use this facility?

Postby mainframer » Wed 05 May 2010, 14:16

prino wrote:No. The way to do it is to use FTP from z/OS, or to use the good old faithful and rather slow IND$FILE method, which is supported by about every emulator.


Thanks for reply,

I tried FTP from CMD prompt and IND$file, CMD doesn't work(Time Out) and IND$file is very very slow, I mean It's so slow that I was not certain on getting result(transfer), I have a very small file, by the way how long it takes to transfer, in general?

And please let me know how to use FTP from Z/Os, I am new to this and want to use it.
Prino, your input will be highly appreciated.
mainframer
 
Posts: 13
Joined: Fri 26 Feb 2010, 15:33

Re: FTP : How can I use this facility?

Postby prino » Wed 05 May 2010, 16:53

mainframer wrote:
prino wrote:No. The way to do it is to use FTP from z/OS, or to use the good old faithful and rather slow IND$FILE method, which is supported by about every emulator.


I tried FTP from CMD prompt and IND$file, CMD doesn't work(Time Out) and IND$file is very very slow, I mean It's so slow that I was not certain on getting result(transfer), I have a very small file, by the way how long it takes to transfer, in general?

And please let me know how to use FTP from Z/Os, I am new to this and want to use it.


As I wrote, FTP'ing with an FTP Client to the FanDeZhi system is no longer possible.

What you can do, is set up an FTP Server on your Windoze/Linux/whatever box (I use Filezilla Server on an XP box) and start the FTP transaction on z/OS from the READY prompt (or option 6) towards your server. If you do not have a static IP address, you can get a semi-static one from DynDNS.com, or you can use one of the many sites that tell you your current IP address, like IP Chicken or utrace. You probably also have to set up your modem/router to port-forward port 21.

FTP is pretty fast, just transferred a 1.7Mb XMITfile in around 14 seconds. IND$FILE will take rather a lot longer, I haven't tried it. (You can speed up IND$FILE a little bit by using the maximum blocksize of 32,000 bytes)

Going either way it's very advisable to use TRSMAIN (or AMATERSE for later versions of z/OS), on the z/OS side, and terse.exe, on the PC side, (from tersepc.zip in the files section of Hercules-390 group on Yahoo! - you need to be a member of the group to access the files), to compress the files before FTP'ing them.

To convert datasets to XMIT format, you can use the command PDS2XMIT as a line command in the DSLIST (3.4) screen - despite the name, it also handles sequential datasets. You can probably also use it on PDSE's, but I don't think any of the PC based tools for extracting XMIT files can handle them! The name of the dataset created by PDS2XMIT is the name of the original, suffixed with .XMIT - if the original name is too long, it will not work! Note that there are no PC tools available to handle ISPF packed data, so make sure that your PDS members or dataset(s) are saved with the "PACK OFF" option!

To TERSE a dataset on z/OS, you can use the command TERSE as a line command in the DSLIST (3.4) screen. It appends .TER to the original dataset name, and, unlike PDS2XMIT, it verifies that the new name will not exceed 44 characters. UNTERSE unpacks a tersed dataset. If the dataset had a last qualifier of .TER, it will be replaced by .U, if not, it appends .U. You can use the following job to TERSE datasets in batch, to UNTERSE them in batch, use a parameter of 'UNPACK' and the correct LRECL and BLKSIZE for the output dataset.

Code: Select all
//TERSEJOB JOB (12345678),
//             'TERSE FILE(S)',
//             CLASS=A,
//             MSGCLASS=H,
//             MSGLEVEL=(2,0),
//             NOTIFY=&SYSUID
//*********************************************************************
//* This is a long-running dataset compression job, do not cancel!
//*********************************************************************
//         SET TERSE='AMATERSE'
//         SET AMATERSE=,TRSMAIN='NULLFILE, '
//*
//         SET TERSE='TRSMAIN'
//         SET TRSMAIN=,AMATERSE='NULLFILE, '
//*
//         SET BLOCK='0'
//         SET BLOCK='27648'
//*********************************************************************
//TERSER  PROC FILE='?'
//*
//ZAP     EXEC PGM=IEFBR14
//*
//TERSED    DD DSN=&SYSUID..&FILE..TER,
//             DISP=(MOD,DELETE),
//             SPACE=(TRK,1),
//             DCB=(RECFM=FB,LRECL=1024,BLKSIZE=0)
//*********************************************************************
//TERSE   EXEC PGM=&TERSE,
//             PARM='SPACK'
//*
//SYSPRINT  DD SYSOUT=*,
//             DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0)
//*
//SYSUT1    DD DSN=&SYSUID..&FILE,
//             DISP=SHR
//*
//INFILE    DD DSN=&SYSUID..&FILE,
//             DISP=SHR
//*
//SYSUT2    DD DSN=&AMATERSE.&SYSUID..&FILE..TER,
//             DISP=(,CATLG,DELETE),
//             SPACE=(TRK,(300,300),RLSE),
//             DCB=(RECFM=FB,LRECL=1024,BLKSIZE=&BLOCK)
//*
//OUTFILE   DD DSN=&TRSMAIN.&SYSUID..&FILE..TER,
//             DISP=(,CATLG,DELETE),
//             SPACE=(TRK,(300,300),RLSE),
//             DCB=(RECFM=FB,LRECL=1024,BLKSIZE=&BLOCK)
//*
//        PEND
//*********************************************************************
//        EXEC TERSER,FILE='WHATEVER.FILE'


Note that TRSMAIN will work on any z/OS system, but AMATERSE, the officially IBM-supported version, only works on z/OS 1.8(?) and above. The "SET BLOCK='0'" statement should be used for systems that use System Determined Blocksize.

Finally, to un-XMIT files on the PC (make sure they are transferred as BINARY!), you can use

Note that all CBT*.zip files from the CBT Tape site are in XMIT format, leading to a chicken-and-egg situation...

There are no free tools to create XMIT files on the PC, but the Tachyon product mentioned above does contain a Re-Xmit program that can apparently produce them.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
Some programming here :mrgreen:
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: FTP : How can I use this facility?

Postby mainframer » Thu 06 May 2010, 02:35

Dear Prino,

I have no words to express my gratitude for your previous post. I felt total devotion of time, just for me, that's from a Genius(I must say).
Without spoiling the quality of your post, I would just like to copy:

"I can no other answer make, but, thanks, and thanks." - W. S

Now I can understand the Success of Dezhi Mainframe.
Now I am going to try step-by-step.

Thnx, again :)
mainframer
 
Posts: 13
Joined: Fri 26 Feb 2010, 15:33

Re: FTP : How can I use this facility?

Postby mainframer » Thu 06 May 2010, 16:14

Hi,

I tried the steps,

Just need to clear few doubts, I am giving my steps for better understanding.

1)Selected a PDS and created/converted to XMIT.(successful)
2)Tersed the Dataset(XMITED one, a.b.c.ter).(successful)
3)Before Un-terse, the transfer (fom M/F to PC was not made), can you please let me know on this, I have Filezilla Client as well as server and it is showing connection at 127.0.0.1 with port=21.( :?: )

Am I going on right path? :?
mainframer
 
Posts: 13
Joined: Fri 26 Feb 2010, 15:33

Re: FTP : How can I use this facility?

Postby prino » Thu 06 May 2010, 17:11

mainframer wrote:I tried the steps,

Just need to clear few doubts, I am giving my steps for better understanding.

1)Selected a PDS and created/converted to XMIT.(successful)
2)Tersed the Dataset(XMITED one, a.b.c.ter).(successful)
3)Before Un-terse, the transfer (fom M/F to PC was not made), can you please let me know on this, I have Filezilla Client as well as server and it is showing connection at 127.0.0.1 with port=21.( :?: )

Am I going on right path? :?


You're getting there...

The 127.0.0.1 address is the admin address for FileZilla Server [FS]. In FS you will have to set up a user, with a password and a home-directory.

Now comes the harder part, your IP address. If you have a static one, you're lucky, you can simply go into ISPF option 6, enter
Code: Select all
FTP xxx.xxx.xxx.xxx

with xxx.xxx.xxx.xxx your static IP address (obtained from your ISP, or via IP Chicken). With a dynamic address you can do the same, but you might have to enter a different address every day. It's much easier to get a free domain from DynDNS, and use their DynDNS Update Client to give yourself a more permanent address, like "whahoopie.homeftp.net" (you can choose the "whahoopie", DynDNS provides a wagon-load of domains to attach it to) Using this method you can use
Code: Select all
FTP whahoopie.homeftp.net
and you don't have to worry about an ever changing address.

Assuming that you have entered "FTP real IP address/your domain" on the command line of ISPF option 6, pressing Enter will now show you
Code: Select all
                               ISPF Command Shell
 ISPF Command ===>

 Enter TSO or Workstation commands below:

 ===> ftp whahoopie.homeftp.net

 Place cursor on choice and press enter to Retrieve command

 => ftp whahoopie.homeftp.net
 =>
 =>
 Using 'TCPIP.FTP.DATA' for local site configuration parameters.
 IBM FTP CS V1R6
 Connecting to: whahoopie.homeftp.net xxx.xxx.xxx.xxx port: 21.
 220 FileZilla Server version 0.9.34 beta
 NAME (whahoopie.homeftp.net:QQQQQ):

If your FileZilla userid is the same as your TSO userid, just press enter, else enter your FileZilla userid and press enter, which leads to the next prompt:
Code: Select all
 >>> USER QQQQQ
 331 Password required for QQQQQ
 PASSWORD:

and you now enter your strong password, check it with Password Strength Checker, which leads to the next prompt,
Code: Select all
 >>> PASS
 230 Logged on
 Command:

Where you type "bin", because TERSE'd XMIT files need to be transferred in binary. The system replies with:
Code: Select all
 >>> TYPE I
 200 Type set to I
 Command:

And now you can PUT/GET/MPUT/MGET as much as you want and QUIT when you're finished.

Once the files arrive on the PC, unterse the tersed file -
Code: Select all
terse myfile.xmit.ter myfile.xmit -b
(-b tells terse to do a binary unterse, all programs that process XMIT files on the PC expect them to be in EBCDIC) and use your favorite un-XMIT tool to get the contents out.

One warning, you may have to fiddle with code pages, my Windoze CMD window works with code page 437, FanDeZhi seems to use 1047 and the two seem to be working pretty well together, if you use another PC code page, you may have to specify it on the terse command - '[', ']', '!', '|' and '¬' are usually the most problematic characters... :(

Hope this helps you a bit more.
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: FTP : How can I use this facility?

Postby mainframer » Thu 06 May 2010, 23:17

Hmm..Ok, I followed your steps, very carefully, did not miss anything.
I thought It will work and guess what, yes, It WORKED...!!!, the files that I wanted were on my PC.
Great.
.
.
.
Still I am facing some issue in Untersing the files, getting error: code more than Zero , i.e 16 ,
I am running the command (on 3.4 or ready command line : terse userid.filename.ter filename.xmit -b,
but I think there I need to do some homework, on my own. I will check it carefully Once again, may be more. I love this Technology,

Thank you for such a wonderful Post. :), I have never seen on any forum.
Garry
mainframer
 
Posts: 13
Joined: Fri 26 Feb 2010, 15:33

Re: FTP : How can I use this facility?

Postby prino » Fri 07 May 2010, 09:19

mainframer wrote:Hmm..Ok, I followed your steps, very carefully, did not miss anything.
I thought It will work and guess what, yes, It WORKED...!!!, the files that I wanted were on my PC.
Great.
.
.
.
Still I am facing some issue in Untersing the files, getting error: code more than Zero , i.e 16 ,
I am running the command (on 3.4 or ready command line : terse userid.filename.ter filename.xmit -b,
but I think there I need to do some homework, on my own. I will check it carefully Once again, may be more. I love this Technology,

Thank you for such a wonderful Post. :), I have never seen on any forum.


To unterse files on z/OS, you just use (in 3.4) the line-command UNTERSE. It will, if present, replace the final .TER qualifier with .U, or just append .U if he final qualifier is not .TER.

The terse userid.filename.ter filename.xmit -b is purely to be used to unterse files on the PC, and then only if those files need to be in binary, such as XMIT files. If you TERSE a pure text file (or PL/I-COBOL-REXX-etc source) on z/OS, you do not need the -b option on he PC, but you might need either "-eNNN -aNNN" or "-lCTY". FWIW, if you transfer small files, going through the process of XMIT + TERSE might not even be required, you can just FTP them.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
Some programming here :mrgreen:
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: FTP : How can I use this facility?

Postby rsilver » Thu 10 Nov 2011, 13:20

Hi, I'm tryiny to use the FTP from mainframe to my PC which is running a Winsock FTP Daemon and I get error

Connecting to: 192.168.1.102 port: 21.
recv error from getNextReply - EDC8130I Host cannot be reached. (errno2=0x745
00442)
Connection with 192.168.1.102 terminated

Any ideals on this ? Will the FTP Daemon not work ?

Thanks,
Rick
Richard (Rick) Silvers

E-mail.......: rsilvers@mebtel.net or rick_silvers@rsilvers.com
My Website: http://www.rsilvers.com/
Webmaster: http://main.nc.us/yancey/
rsilver
 
Posts: 92
Joined: Thu 10 Nov 2011, 13:08
Location: Mebane, NC USA

Re: FTP : How can I use this facility?

Postby steve-myers » Thu 10 Nov 2011, 14:13

You probably have to direct your router to "port forward" port 21 to the machine running the FTP server.
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43

Re: FTP : How can I use this facility?

Postby rsilver » Thu 10 Nov 2011, 16:12

Hi, I installed FileZilla server and changed my linksys router to forward port 21 to my PC IP and was able to FTP to my PC and download a file ...was going to try some more FTPs upload/download but my TSO/ISPF session is timing out or something ? I'm using Bluezone Mainframe Display. I thought it might be the port forwarding but I changed the router back and my session is still timing out. My session is disconnecting by leaving me logged on and when I try to reconnect it shows I'm already logged on . . .then have Logoff your userid and log my session off . . .any ideals what would cause this ? Never had this problem with the Bluezone software before
Richard (Rick) Silvers

E-mail.......: rsilvers@mebtel.net or rick_silvers@rsilvers.com
My Website: http://www.rsilvers.com/
Webmaster: http://main.nc.us/yancey/
rsilver
 
Posts: 92
Joined: Thu 10 Nov 2011, 13:08
Location: Mebane, NC USA

Re: FTP : How can I use this facility?

Postby steve-myers » Wed 18 Nov 2015, 04:02

Rick - Fandezhi does not use session time out. I've had TSO sessions run for hours at the READY prompt and days when running a process that writes a line to the terminal every hour. I've never heard of Bluezone Mainframe Display before. It seems to me if you were running OK until you started the FTP client, the port forwarding in your router shouldn't have anything to do with whatever your problem is.

I tried the Filezilla FTP server years ago, but didn't like the way it ran and completely uninstalled it. The machine I installed it on was retired several years ago when its power supply gave up the ghost. I won't touch Sourceforge any more because they have such a terrible reputation for bundled malware/crapware, so I won't try to install a current version.

I get adequate performance with IND$FILE. Not great, and certainly not what you should get with a proper FTP linkup, but adequate for my purposes.
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43


Return to Dezhi systems: Mainframe

Who is online

Users browsing this forum: No registered users and 0 guests

cron