This should answer your question. Per IBM... "Working as designed"
http://www-01.ibm.com/support/docview.wss?uid=nas18815e8751cd05952862565c200
7d13b5
Google "zoned fields defined as packed". You'll see numerous references.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Robert Rogerson
Sent: Wednesday, July 03, 2013 1:04 PM
To: RPG programming on the IBM i / System i
Subject: Template DS subfield types not as expected...
Hi all,
I created a short program which shows my problem. I am coding a template
DS but the subfields defined (using like the file fields which are zoned)
are showing as packed. I don't know why this is happening. Can anyone
explain it?
Also, if I comment out the file and uncomment the external DS pointing to
the file all the fields are zoned as expected.
To create the test table:
CREATE TABLE MYLIB/TESTFILE1 (
"ITEM" NUMERIC(6,0) NOT NULL,
"STORE" NUMERIC(3,0) NOT NULL
)
The test program:
Hoption(*nodebugio:*srcstmt)
Ftestfile1 if e disk Rename(testfile1: testfile1r)
d pi
d*testfile1Ds e ds extname(testfile1)
d t_ds ds template
d field1 like(item)
d field2 like(store)
d myDs ds likeds(t_ds)
d
/free
*inlr = *on ;
Return;
/end-free
And a few lines from the compile listing which compiles with no errors.
Also, I am on V7R1:
000001=ITESTFILE1R
000002=I S 1 6 0ITEM
000003=I S 7 9 0STORE
Global Field References:
Field Attributes References (D=Defined
M=Modified)
*RNF7031 FIELD1 P(6,0) 000600D
TEMPLATE
*RNF7031 FIELD2 P(3,0) 000700D
TEMPLATE
*RNF7031 ITEM P(6,0) 000600 1000002D
*RNF7031 MYDS DS(6) 000800D
*RNF7031 STORE P(3,0) 000700 1000003D
*RNF7031 T_DS DS(6) 000500D 000800
TEMPLATE
I'm really stumped on this one and figured if anyone would know they'd be
here.
Thanks,
Robert Rogerson
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.