CPY doesn't work with data areas at all, so far as I can tell - I tried to CPY a data area to an IFS file, similarly to what you can do with a user space. I also tried DSPF on a data area - no go - try it on a user space - fantastic!

I don't think he wants to dupe the object, he wants to work with content - might want to put it in a data area of a different size.

On 10/1/2010 8:43 AM, Richard Casey wrote:
Peter,

I thought the following CPY command would work

CPY OBJ('/QSYS.LIB/fromlib.LIB/fromarea.DTAARA')
TOOBJ('/QSYS.LIB/tolib.LIB/toarea.DTAARA')
REPLACE(*YES)

but I get an "Information passed to this operation was not valid." message
if the "toarea" data area exists.

Of course CRTDUPOBJ complains that "toarea" already exists!

If you are going to be doing this a lot, you could create your own command
that would delete the "toarea" if it existed, and then do the CRTDUPOBJ.

Have fun!

Richard





-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter_Vidal@xxxxxxxx
Sent: Friday, October 01, 2010 8:36 AM
To: midrange-l@xxxxxxxxxxxx
Subject: How to copy a data area (with one simple command)?

Hi list!

I need to know if it is possible to copy the contents of an existing data
area into another existing data area (same object attributes) and all in one
single command.

TIA and HAPPY FRIDAY to all!


PETER VIDAL
PALL CORPORATION
SR System Analyst | WH Application Development 10540 Ridge Rd., Suite 203,
New Port Richey, FL 34654-5111
727-815-3104 | Fax: 727-815-3120 | www.pall.com

"Imagination is more important than knowledge"
Albert Einstein (1879 - 1955)
--
----------------------------------------------------------------------------
----

Attention:

This communication may contain information that is confidential, privileged
and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender immediately
and delete the original, all attachments, and all copies of this
communication.


----------------------------------------------------------------------------
----



****************************************************************************
********
This footnote confirms that this email message has been scanned by PineApp
Mail-SeCure for the presence of malicious code, vandals& computer viruses.
****************************************************************************
********





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.