× 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.



Brian, Roger, Dave
MUCH appreciated for your replies
Maybe time for new glasses
Just did NOT see that, whatsoever

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Brian Parkins
Sent: Thursday, June 28, 2018 6:04 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Declaring a *dec data area

As others have already indicated, your problem is (3,2) - should be (3:2). Zoned or Packed for OVRHDR makes no difference; the following works just fine:

**Free
   Dcl-S DtaaraVar1 Packed(5:2) Dtaara('TSTDECDTA');
   Dcl-S DtaaraVar2 Zoned(5:2) Dtaara('TSTDECDTA');

   In DtaaraVar1;
   In DtaaraVar2;

   *InLR = *On;

   Dump(A);
   Return;

where,
CRTDTAARA DTAARA(*CURLIB/TSTDECDTA) TYPE(*DEC) LEN(5 2) VALUE(123.45) TEXT('Decimal Data Area')

The Dump Listing shows,
 NAME                  ATTRIBUTES           VALUE
 DTAARAVAR1            PACKED(5,2) 123.45           '12345F'X
 DTAARAVAR2            ZONED(5,2) 123.45           'F1F2F3F4F5'X



On 28/06/2018 21:41, Alan Shore wrote:
Hi everyone
We are on V7r1

I am trying to declare a data area that is created as *DEC (3,2) I
tried the following
dcl-s Ovrhdr packed(3,2) dtaara('OVRHDTAARA');
But that received a compile error of

*RNF3402 20 a 012200 Length entry is not valid; defaults to blanks.
Pointing to the 3,2 in the compile listing

Anyone know what I am doing wrong?

As always - all answers gratefully accepted


Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

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.