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



One of the general rules with the new support Kurt is that a number of things that should have been literals to begin with (but were not enforced for historical reasons) now have to be done "correctly".

It may in part be due to the fact that in a number of places you can now use constants to supply values. For example:

dcl-c length 7;
dcl-c digits 2;

dcl-s packedNum packed( length: digits );

If the stricter rules mean I can now do stuff like this I'm all in favour.


On 2014-04-15, at 4:12 PM, Kurt Anderson <Kurt.Anderson@xxxxxxxxxxxx> wrote:

You're right. I didn't think to look at the help for Like. Though I just did and didn't see anything about a supported second parameter. But in trying it, it works. Looks like it only works in freeform, however.
RNF0202: A SECOND PARAMETER FOR KEYWORD LIKE IS ONLY ALLOWED IN FREE FORM.

I just found a piece of code that worked pre-freeform, but does not work post-freeform.

Works:
D dsT_InvRptLD E DS ExtName(SpecChgP) Template Qualified
Doesn't work:
dcl-ds dsT_InvRptLD ExtName( SpecChgP ) Template Qualified;
RNF0202: THE PARAMETER FOR EXTNAME OR EXTFLD MUST BE A DEFINED NAMED CONSTANT OR LITERAL.

Looks like I have to use the literal now. I get more freeform, but have to add in more caps to make it happen.
dcl-ds dsT_InvRptLD ExtName( 'SPECCHGP' ) Template Qualified;

Seems like this one took a step backwards, unless I'm missing something.

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, April 15, 2014 3:26 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: DS Subfield in freeform

Not verified but based on the manual I think something like this

DCL-S test LIKE(testField : +2);

Scott

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson
Sent: Tuesday, April 15, 2014 1:20 PM
To: RPG programming on the IBM i / System i (rpg400-l@xxxxxxxxxxxx)
Subject: DS Subfield in freeform

How do I define this line in freeform?

D test +2 Like( testField )

So if testField is 9,2 packed, test would be 11,2 packed.

Thanks,

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform [cid:image002.jpg@01CD16F9.25D27630]
web: www.customcall.com<http://www.customcall.com/> | email: kurt.anderson@xxxxxxxxxxxx<mailto:kurt.anderson@xxxxxxxxxxxx>

A Division of Enghouse Systems Ltd.<http://www.enghouse.com/> (TSX:ESL)

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

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


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





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.