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



Wow, a lot of good information Thanks everyone. It works, it is easy to implement, and the users love it. We will be doing more dup keys on subfile input in the future, you betcha.

Here's what I did, if anyone ever follows this thread from the archives.

On the subfile fields that are input capable I added the keyword DUP(nn) where nn is a unique indicator for that field.
In the RPG program I defined work field(s) LIKE(the screen field(s))
Immediately following the exfmt opcode I exsr a subroutine for the dup key.

The subroutine
Clears the workfields (Just in case the user duplicates field(s) on SFL record 1)
Does a for loop
Chain for the next subfile record.
If the DUP(nn) indicator is on then
Eval the screen field with the value in the corresponding saved field.
Update the subfile
End the if
Eval the saved work field with the current value in the screen field
Endfor

Also, for the users I added the comment "(Shift-insert = Dup field)" on the footer record. No need to map that key, its already mapped as the dup key.



Jeff Young wrote:
The DUP keyword is a field level keywork valid at all levels.
What this does is return an indicator to the program indication that the DUP key had been pressed for this key. It was up to the programmer to determine what action to take.
Usualy, if a field was going to be available for "DUP", the last value for that field would be saved and when the DUP indicator was received, the program would move the last value into the field.

hth,
Jeff Young Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3
IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3





________________________________
From: Alan Shore <AlanShore@xxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Wed, November 18, 2009 11:36:20 AM
Subject: Re: Is there a Dup key ?


Hi Booth
I know you can use the DUP command within DDS, but I don't think this is
available within a subfile



Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill


Booth Martin <booth@xxxxxxxxxx om> To
Sent by: Midrange Systems Technical midrange-l-bounce Discussion s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx> cc
11/18/2009 11:07 Subject
AM Is there a Dup key ? Please respond to Midrange Systems Technical Discussion <midrange-l@midra nge.com>



I just had a request that stirs the dust balls in my brain. Maybe
there really is a solution and I am just not thinking clearly.

He remembers his old terminal had a dup key where he could duplicate
fields. He now has a subfile of 5 input capable fields and quite often
wants to duplicate the value from the field above.

Is this reasonably possible?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

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.