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



I usually do this:

D Code_Len C %len(CODE)
D Code_DecPos C %decpos(CODE)

CODE = %Dec(ARCPCD:Code_Len:Code_DecPos);

But it is annoying to do that every time.



On Mon, Oct 16, 2017 at 2:21 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:

For me, the annoyance of putting them in is not knowing the correct values
off the top of my head, so I have to look up the field and find out the
length & decimal positions.

How about something like

fielda = %dec(FldX : *like : fielda | SomeOtherField);

or

fielda l= %dec(FldX: *like(fielda | SomeOtherField));

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx>

/

On 10/16/2017 11:10 AM, Bradley Stone wrote:

Interesting thought. I always hated putting them in too.

Mark's answer makes sense, but I bet it could "default" to the definition
if it was just a simple variable used in the BIF. Open an RFE! :)

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #16 <https://www.bvstools.com/mailtool.html>: No
external
"helper" PC system required. 100% IBM i native!

On Mon, Oct 16, 2017 at 11:53 AM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
wrote:

When using the %dec() function, is it unreasonable to think the compiler
could check the result field, and default the 2nd and 3rd parameters?

I'm thinking about submitting an RFE, but I want to check to make sure
I'm
not overlooking the obvious.

Thanks
--
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


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