|
Jon,
Here's my definition of my array:
loc s 8 dim(1600) ascend
Here's my lookup:
eval n = %lookupgt(scpos:loc)
The "SCPOS" field, in the scenario I'm looking at, would have be like this:
"OVbbbbbb" where the b's are blanks. I would want to position my subfile
to records which could have just "OV" in them, or "OVERFLOW", or
"OVER-1AB", etc. So I'm basically entering a partial value in my search
field and I want to be able to find the array elements from there on. If
LOOKUPGT won't work I'll just go to creating a temporary file to hold my
locations. If I do that, SETLL would work in this scenario, right? We are
at V5R4 FYI.
Bill
On Wed, Dec 14, 2016 at 12:21 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
Nope - not if you are using GT - BUT - the array must be in sequence. Ismy
it?
Also what is in the backend of the key field? Spaces or low values or ...
??
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Dec 14, 2016, at 11:36 AM, Bill Howie <blhowie66@xxxxxxxxx> wrote:
Jon,
Upon further review I think I really only need the one "LOC" field in
lookuparray. So it becomes a simple 1-dimension array. So right now my
position-tostatement looks just like yours. But if I key in "OV" in my
zeroscreen field, I want it to show all locations from there on, like oneswith
"OVER-1A", "OVER-2A", etc. However, my LOOKUPGT statement returns a
Ifor N. Does the search argument have to exactly match something in the
array? In other words, can it be a partial value and still work?
Bill
On Wed, Dec 14, 2016 at 11:23 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
Only the "plain vanilla" %Lookup is currently supported for DS arrays
wrote:believe.
This should work though:
d ds
d locarray dim(1600)
d arch 2 overlay(locarray)
d loc 8 overlay(locarray: *Next)
Then the lookup becomes:
n = %lookupgt(scpos: loc);
Not tested but should be about right.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Dec 14, 2016, at 10:54 AM, Bill Howie <blhowie66@xxxxxxxxx>
mymay.
Thanks for the replies......let me throw another wrinkle in this if I
Instead of a file in this case, I have a qualified array that holds
doesn'twaslocations. Like this:
dlocarray ds dim(1600) qualified
d brch 2
d loc 8
"BRCH" is always constant and the "LOC" field is the location. So
basically I have an array that holds all the locations. My thinking
nextI
could search the array with the %LOOKUPGT BIF and it would find the
one greater than what the user positions to. But the compiler
thelike
the following:
eval n = %lookupgt(scpos:locarray(*).loc)
"SCPOS" would be the screen field that the user keys in to position
errors:subfile. But I can't get the syntax right for how I can search the
locations that are in the array. I get the following compiler
is
*RNF0571 20 1 The second parameter for %LOOKUPxx is not valid.
*RNF5343 30 1 Array has too many omitted indexes; specification
wrote:ignored.
Thoughts?
Bill
On Wed, Dec 14, 2016 at 10:35 AM, Alan Shore <ashore@xxxxxxxx>
particularwhen
Hi Bill
We always put a position to field - above the subfile data. So that
someone enters a value in this field, presses Enter - or a
CHAINandfunction key - the file is setll with that value (other than spaces)
Jeffthen builds the subfile from that point on
NOTE - we ALWAYS build page at a time subfiles
A load ll sub file requires a different piece of logic
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
Young
Sent: Wednesday, December 14, 2016 10:28 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <
rpg400-l@xxxxxxxxxxxx>
Subject: Re: Subfile question - Position To functionality
Bill,
You would need to get the "bin" from the subfile record using a
tohas
value tothe subfile record that the cursor is positioned to, then use that
wrote:read you data file and reload the subfile.
Jeff Young
Sr. Programmer Analyst
On Wed, Dec 14, 2016 at 10:18 AM, Bill Howie <blhowie66@xxxxxxxxx>
Hello all,
Question for the group. I have the need to add "position to"
functionality to a subfile program. In this scenario, my subfile
"O"likeone field which is
a bin location in a warehouse. The one field could look something
"OVER-1A". I want the user to be able to key in just the letter
infostartingin a field on the subfile screen and have the subfile display
justwith the records that begin with "O" and going from there. Is it
as simple as doing a SETLL with the "O" as the key and it will read
the records from there on or is there more to it than that? Any
takeRPG400-L@xxxxxxxxxxxxis
as always
appreciated. Thanks!
Bill
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list To post a message email:
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
aaffiliate
rpg400-l.moment to review the archives at http://archive.midrange.com/
affiliate
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
affiliatesubscribe,mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
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.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
affiliatemailing 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.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxquestions.
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.
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
affiliatemailing 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.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list--
To post a message email: RPG400-L@xxxxxxxxxxxxquestions.
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.
Please contact support@xxxxxxxxxxxx for any subscription related
link: http://amzn.to/2dEadiD
Help support midrange.com by shopping at amazon.com with our affiliate
--
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.
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: 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.
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 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.