FTP to z/OS when your fingers forget

They say that large dinosaurs had a brain in the head, and a brain near the back legs, because it took too long for information from the feet to reach the brain. I’ve always thought that programmers have a brain in each hands so they can type when the brain is thinking of other things. The problem with this is when you do not use commands, the hand brains forget the commands, and you have to use the head brain. I experienced this trying to FTP a file to z/OS and my fingers would not type the commands I used to know and love!

The FTP daemon needs to be running, for example S FTPD.

FTP to z/OS

  • ftp 10.1.1.2
  • userid ….
  • password

Set up the environment

  • ASCII
  • BIN

Setup the dataset parameters using the site command

site cyl pri=10 sec=10 recfm=fb lrecfl=80 blksize=3200 vol=(volid1,volid2)

You can specify size units

  • cyl
  • trk
  • blk

I could not see how to display the default “site” parameters, so if in doubt specify all the parameters.

Change directory ( HLQ) at the remote end

cd ‘COLIN’

Change directory at the local end

lcd /u/colin/

List directories ( HLQ) at the remote end

cd ‘COLIN.CBT’
dir

or

ls ‘COLIN.CBT.*’

Gave

125 List started OK
Volume Unit Referred  Ext Used Recfm Lrecl BlkSz Dsorg Dsname
C4USR1 3390 2022/04/22  1   45    FB    80  5600 PO    V502.FILE967.PDS
250 List completed successfully.

Send files

You can use PUT or GET; MPUT or MGET.

MPUT and MGET will prompt for each file. You can toggle the prompting using the prompt subcommand

prompt
gave
Interactive mode off.

prompt
gave
Interactive mode on.

Additional information

  • ? – displays a summary of the commands
  • help command – gives a short description of the command
  • quit – exit FTP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s