Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie question - AS/400 to PC data transfer batch file

477 views
Skip to first unread message

Derek Corrigan

unread,
May 30, 2000, 3:00:00 AM5/30/00
to
Hi,

I'm very new to the AS/400 so my apologies if this is a dumb one. I
require to transfer PC Ascii files to the AS/400 in EBCDIC format. I
don't want this to be set up as an iteractive data transfer. I need it
to be set up in some batch script if possible which can be scheduled and
called on the PC to make the transfer whenever required. As part of this
I want to use client access to do the conversion from ASCII to EBCDIC.

I've looked at the client access documentation and I was wondering if
the "Data Transfer To AS/400" can accomplish this in a batch mode (it
looks fine for interactive use). Or should I be looking elsewhere. Any
pointers would be greatly appreciated.

Also is it possible to have a mapped drive set up to an AS/400 using
client access in the windows explorer, without having to interactively
provide a client access login and password. Basically I need a mapped
drive that can be used by Windows NT services without actually being
logged on as an interactive user.

Thanks in advance

Derek


Joep Beckeringh

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Derek,

If you do a file transfer, you can save the settings in a .TTO (Transfer TO
pc) or a .TFR (Transfer FRom pc) file. This file can be used through
RTOPCB.EXE (transfeR TO PC Batch) or RFROMPCB.EXE (transfeR FROM PC Batch).

Another option is to put the ASCII files in a directory in the AS/400 IFS
(e.g. through a mapped drive in Explorer) and use AS/400 command CPYFRMSTMF
(copy from stream file) or CPYFRMIMPF (copy from import file) to copy the
data to an AS/400 file. These commands handle the conversion from ASCII to
EBCDIC and can be easily scheduled on the AS/400.

Joep Beckeringh


"Derek Corrigan" <derek.c...@reiteach.ie> wrote in message
news:A46380DBCD7FD3119FB60050DA2C111E02229E@SERVER...

David Sitton

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
For batch data transfer use rfrompcb or rtopcb. You can run these from
either a PC app or from the AS/400 using STRPCCMD. You still have to set up
the *.TFR or *.TTO file on the PC to tell it where to transfer from or to.

The answer to your second question is yes I think so, however, I'm not much
help on that one.

Walter

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Option 1: Client Access file transfer.
Do the transfer once by hand, save it when you quit and you can create an
icon on it or use it in a PC bat file.

Option 2: FTP. Quick and easy to set up.

Create a txt file with ftp commands like:
open 10.20.30.40 <--AS/400's IP address
user transfer tranpass
put c:\temp\mytext.txt translib/myfile PC->AS400
get translib/myfile.mymember c:\temp\thefile.txt PC<-AS400
bye

ASCII EBCDIC translation is on by default.
user: name and password are visible! So we created a transfer user with
very restricted rights.
get/put will overwrite the target file.
myfile.mymember: If the member name is different from the file name you
have to add it after a dot.
hash before get/put will show transfer progress with ######.... in the DOS
Box.
quote rcmd can start a program on the AS/400 immediately after the put is
complete

Then start the transfer with this DOS command (type it or put it into a PC
bat):
ftp -n -s:g:\as400tcp\cus17.txt
-n tells ftp to get login name and password from the txt file. Without
this, remove the user line from txt file below and you will be prompted
for name and password.
-s: points to drive:\path\name of the txt file with the ftp commands.


Walter


Karl Hanson

unread,
Jun 1, 2000, 3:00:00 AM6/1/00
to
Derek Corrigan wrote:
>
<snip>

>
> Also is it possible to have a mapped drive set up to an AS/400 using
> client access in the windows explorer, without having to interactively
> provide a client access login and password. Basically I need a mapped
> drive that can be used by Windows NT services without actually being
> logged on as an interactive user.
>

NetServer may be of interest:
http://as400.rochester.ibm.com/netserver/index.htm

--

Karl Hanson

0 new messages