fhg
Volume 6, Number 30 -- August 9, 2006

Append to Stream Files

Published: August 9, 2006

Hey, IT Jungle Forums:

Is there an OS/400 command that will let me append one stream file to another? I checked the Copy Object (CPY) command, but it only has a REPLACE(*YES/*NO) parameter, unlike Copy File (CPYF), which supports MBROPT(*REPLACE/*ADD).

--Bruce


This question was posted on the IT Jungle Forums. It seems odd that there is no direct method using CL commands to append one stream file to another. Chris gave examples of two methods that do the job.

The first is to use Qshell's >> redirection operator, which appends output to the destination file. Here's how it would work in a CL program.

QSH CMD('cd /MyFolder && cat file1.txt >> file2.txt')

He also gave an example of using the FTP client.

FTP localhost
userid pwd
namefmt 1
append /myfolder/file1.txt /myfolder/file2.txt

In this case, both client and server are running on the iSeries. For localhost, try the word LOOPBACK. If that doesn't work, try 127.0.0.1.

If you'd like to suggest another method, please add it to the thread at http://www.itjungle.com/itjforums/viewtopic.php?t=174.

--Ted



Sponsored By
ADVANCED SYSTEMS CONCEPTS

SEQUEL can be used for virtually ALL data access functions on the iSeries.

A Windows-based user interface makes it easy to design queries and reports.

SEQUEL offers executive dashboards, drill-down data analysis and run-time prompts to deliver important iSeries data to managers and other non-technical users.

E-mail and FTP delivery let you deliver information to remote users and servers.

www.asc-iseries.com



Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

Bytware:  StandGuard Network Security 3.0, the next generation of System i security
COMMON:  Join us at the Fall 2006 conference, September 17-21, in Miami Beach, Florida
Xperia:  Fully integrated suite of applications for small- to mid-sized companies

 


 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement