×
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.
Peter
Not without writing your own, that I know of. And you can't even
retrieve the attributes directly, like length and type. I thought I
might be able to use CPY - it is an MI-type space object - as I can with
a user space. That didn't work. However, I did a quick look at things
with DMPOBJ - seems I've been mentioning that a lot lately! In this
case, I see little chance that IBM will change the layout of the spooled
file. The information of interest is on the first page, in the SPACE-
section. Look at this bit from a 50-character data area -
SPACE-
000000 040032E6
000020 F0F14040
000040 40404040
The first byte x'04' means it is a character type. The next 2 bytes
x'0032' are the length (max 2000 at v5r3 and probably onward - haven't
checked). After that is the value, but you can get that with RTVDTAARA
better.
Here's the same thing for a 5,2 decimal type, value = 3.18.
SPACE-
000000 03020500 318F0000
000020 40404040 40404040
The x'03' indicates the type. Decimals follows (x'02') and then full
length (x'05'). Then the value - the blank is there in the spooled file
- again, this could be retrieved with RTVDTAARA, perhaps a bit more
challenging in CL.
A *LGL type has type byte x'84' - it's essentially a special case of a
char type.
*DDM type isn't a useful item in this picture - no way to get the
attributes from the other system, easily.
You could use the spooled file to get the value directly - might be
useful in the case of *DEC, in order not to have to deal with the
several scale and precision variants. That's the harder work. There are
C/C++ functions to deal with packed data, so they might help.
Do you want to write this? Wish I had the time.
Vern
On 10/1/2010 7:36 AM, Peter_Vidal@xxxxxxxx wrote:
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)
As an Amazon Associate we earn from qualifying purchases.