× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Need to automagically transfer AS/400 flat file to PC c: drive
  • From: "Dan Bale" <dbale@xxxxxxxxxxx>
  • Date: Tue, 31 Aug 1999 14:34:40 -0400



Currently, we have an application which includes a batch file (running in a
Win95 DOS window) that copies a file from the AS/400 shared folder to the user's
C: drive.  I have been asked to "bulletproof" this thing.  More than a few
times, we have been called to determine and correct problems where this batch
file has failed.  The file in the AS/400 shared folder gets there via:
     CPYTOPCD   FROMFILE(GFCHECK) TOFLR(APCHECKS) +
                  TODOC(GFCHECK.DDT) REPLACE(*YES)

FROMFILE(GFCHECK) is a "flat" file; normal EBCDIC-to-ASCII translation occurs.

Currently, the one-line batch file reads:
      copy e:apchecks.ddt c:\pam\apchecks.chk
where e: is the drive that maps to the AS/400 shared folder containing the file.

When any number of possible errors occurs with this batch file, the DOS window
closes up and disappears, without giving a hint of the problem.  To my
knowledge, the problems that have caused this batch program to bomb are:
  1.  Drive E: is not mapped to the AS/400
  2.  Drive E: is mapped to the AS/400, but not pointing to the correct folder
  3.  The apchecks.ddt file does not exist on the E: drive

FWIW, our environment is: OS/400 V4R2, Client Access V3R1M3, Novell Netware,
Windows 95.  The shared folder that contains the apchecks.ddt file is "normally"
mapped automatically at bootup, but, occasionally, has somehow become un-mapped
(the user has made no confessions regarding this).

Regarding problem 1, is it possible to determine, in a DOS batch file, whether
the AS/400 is mapped to a given drive letter?  Is it possible to determine if it
is matched to _any_ drive letter?  If it is _not_ currently mapped, is it
possible to map the AS/400 to a drive letter to an open drive letter?  BTW, I
can also use WinBatch (a great shareware utility), if someone has used that to
do something like this.

And maybe there's a better way than using DOS altogether?  I've been out of file
transfers long enough to forget if there's been any improvements to do this type
of thing.  Is there a way, with either one click of an icon or using one AS/400
menu option, to copy the AS/400 flat file to the user's C: drive?  We
occasionally use FTP to transfer files between the AS/400 and the PC, but this
has to be transparent to the user (i.e., no user/password entry, none of the FTP
command entry stuff).

Thanks,
Dan Bale





+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.