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

Copy source library to PC

2,491 views
Skip to first unread message

Peter Kinsman

unread,
May 10, 2004, 6:38:37 AM5/10/04
to
Before I re-invent the wheel yet again, I wonder if there is a preferred
solution to my latest problem.
I have a library with about six large source files, which I wish to copy to
PC, maintaining the AS/400 Library/Source_File/Members structure with
Folder/Sub_Folder/Files.

I see the individual steps as:
1 Create folder corresponding to library
2 For each source file
2.1 Create sub folder corresponding to source file name
2.2 Use FTP to copy all members
2.3 Rename each member from FileName.MemberName to MemberName.txt

The big question is has anyone automated them, or as I suspect, is there a
better way?

Many thanks

Peter Kinsman


Jonathan Ball

unread,
May 10, 2004, 10:23:49 AM5/10/04
to
Peter Kinsman wrote:

Are you trying to get the source files to your PC in
such a way that you can view/edit the source? If so,
then you're going to have to do something like what you
describe, and I don't know of a way to automate it.

If you're simply trying to archive the source to your
PC, as a non-viewable backup, then you could cut the
number of steps considerably:

1 Create a save file on the AS/400 (CRTSAVF)
2 Save the library to the save file
3 Open FTP session to AS/400
4 Switch to binary mode (BIN)
5 Issue a GET command to copy the save file to your PC


If you later copy the save file from your PC back to
the original or another AS/400, then restore the source
files from the save file, the source files and members
will be preserved.

Pete

unread,
May 10, 2004, 2:54:21 PM5/10/04
to
To get a copy of the source file down to your PC, you can share the
source library through Netserver, then open the share from your PC and
drag and drop. You'll get a nice little folder with all your source
members! When creating the share I recall having to check a box
somewhere to convert to ASCII. Netserver will convert to ASCII and
allow drag and drop of any AS400 file that is NOT externally
described. On our machine, that is basically only source files. To get
stuff back up to the big box is another matter.......
Pete H.

Terry Winchester

unread,
May 10, 2004, 7:06:54 PM5/10/04
to

These are the same steps I use (excluding the rename).
Very simple to do using DOS batch files.

Terry

Peter Kinsman

unread,
May 12, 2004, 3:15:34 AM5/12/04
to
Thanks for the replies - the idea was indeed to make them PC readable. I
had thought of using the IFS, but I am not sure how it would respond to
5425 extra directory entries. In the end, I wrote a VBA program to create
the folders and another to do the renames and did the FTP bit manually.

Peter

"Peter Kinsman" <pe...@seguecomputing.co.uk> wrote in message
news:lYInc.17779$7R6....@doctor.cableinet.net...

Denny Davis

unread,
May 12, 2004, 7:51:16 AM5/12/04
to
This may be more overhead than you want, but the best solution is
Webphere Development Studio.

You can create a local copy of a "project". This preserves the source
type, line numbers, mod markings and member description. You can then
use WSDC, Code Editor or Code Designer to view/update source.

Denny

Steve Landess

unread,
May 12, 2004, 9:32:40 AM5/12/04
to
Peter -
FTP using MGET will transfer multiple source members at once to your PC.

Example:
1) Start an FTP session from your PC to the AS/400

2) Type the following FTP commands:

PROMPT (turns off prompting)

QUOTE SITE NAMEFMT 1 (to use IFS naming)

MGET /QSYS.LIB/YOURLIB.LIB/SRCFILE.FILE/*.MBR

(this will transfer all source members from file SRCFILE in library
YOURLIB to the current folder on your PC.
All transferred members will be named with the extension .MBR)

3) QUIT (end the FTP session)

4) RENAME *.MBR *.TXT (rename the downloaded files)

Steve Landess
Austin, Texas
(512) 423-0935

"Peter Kinsman" <> wrote in message
news:aakoc.1498$EI2...@doctor.cableinet.net...

0 new messages