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



James,

BTW, if it's not clear (or if the attached file doesn't get to you), here's
the code. It's for a window display file including a separate command key
record format. You should just be able to compile it and run it (might need
to specify RSTDSP(*YES) when compiling the display file).

Rory

Display file code



T* Display window
Z* CRTDSPF RSTDSP(*YES)
*
A DSPSIZ(*DS3 *DS4)
A PRINT
A CA03(03 'Exit')
A CA04(04 'Prompt')
A CA05(05 'Refresh')
A CA12(12 'Cancel')
A HELP
A ALTHELP(CA01)
*================================================================
A R NOCLEAR OVERLAY KEEP
*================================================================
A R NOERASE ASSUME
A OVERLAY
A 23 80' '
A DSPATR(ND)
*================================================================
*‚Subfile record
*================================================================
A R SFLRCD SFL
A RCDDTA 20O B 3 2
A LOWER
*================================================================
*‚Subfile control
*================================================================
A R SFLCTL SFLCTL(SFLRCD)
A SFLSIZ(8)
A SFLPAG(7)
A 01 SFLDSP
A 02 SFLDSPCTL
A N02 SFLCLR
A OVERLAY PUTOVR
A N04 SFLEND(*MORE)
A WINDOW(MSGCTL)
A TITLE 20O O 1 2
*================================================================
*‚Command keys
*================================================================
A R CMDKEYS
A WINDOW(MSGCTL)
A 11 2'F3=Exit F12=Cancel'
A COLOR(BLU)
*================================================================
A R MSGRCD TEXT('Program messages')
A SFL SFLMSGRCD(12)
A MSGKEY SFLMSGKEY
A PGMNAM SFLPGMQ

*=========================================================================
A R MSGCTL TEXT('Program messages')
A SFLCTL(MSGRCD)
A WINDOW(&ZZWSR &ZZWSC 13 22)
A SFLPAG(01) SFLSIZ(03)
A OVERLAY
A SFLINZ SFLDSP SFLDSPCTL
A 25
AON25 SFLEND
A ZZWSR 3 0P TEXT('Window start row')
A ZZWSC 3 0P TEXT('Window start column')
A PGMNAM SFLPGMQ

A*=========================================================================







Program code





H DEBUG(*YES)
T* Shell testing program (&Z)
X* QCMPSRC,CRTBNDRPG
Z* ACTGRP(TEST)

*=============================================================================================
*‚Files

*---------------------------------------------------------------------------------------------
FSFLWDWD CF E WORKSTN
F SFILE(SFLRCD:RRN)


*---------------------------------------------------------------------------------------------
*‚Program identification

*---------------------------------------------------------------------------------------------

D ThisProgram C 'SFLWDWR'


*---------------------------------------------------------------------------------------------
*‚Global variables

*---------------------------------------------------------------------------------------------

D rrn S 10I 0
D i S 10I 0


*---------------------------------------------------------------------------------------------
*‚Main procedure interface

*---------------------------------------------------------------------------------------------

D main PR Extpgm(ThisProgram)

D main PI


*=============================================================================================
*‚MAINLINE

*=============================================================================================
/free

PGMNAM = ThisProgram;
ZZWSR = 5;
ZZWSC = 10;

*in01 = *off;
*in02 = *off;
write(e) sflctl;
rrn = 0;

for i = 1 to 100;
RCDDTA = *all'ABC';
rrn += 1;
write(e) sflrcd;
endfor;

TITLE = 'A cool title';

*in01 = *on;
*in02 = *on;
write MSGCTL;
write CMDKEYS;
exfmt SFLCTL;

exsr return;

//‚return: Return to caller
begsr return;
*inlr = *on;
return;
endsr;

//‚*PSSR: Error-handling subroutine
begsr *pssr;
*inlr = *on;
exsr return;
endsr;

/end-free


On Tue, Nov 6, 2012 at 3:26 PM, Rory Hewitt <rory.hewitt@xxxxxxxxx> wrote:

James,

Not sure why you don't want to use a separate command key RCDFMT with a
window subfile, but anyway, the attached file should work fine.

Rory


On Tue, Nov 6, 2012 at 3:12 PM, Sam_L <lennon_s_j@xxxxxxxxxxx> wrote:

Shorten your subfile by one line. When in a window there always seems
to be one wasted line. At least, that's my experience.

Sam

On 11/6/2012 5:08 PM, James Lampert wrote:
Ok.

The goal is to have this:

< ............................................................... >
< : Select and sequence fields; press Enter. : >
< : Seq Field Name Len T Dp Description : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : OOOOOOOOOO 66666 O 66 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO : >
< : More... : >
< : F12=Cancel : >
< :.............................................................: >

If I [ab]use SFLMSG as described before, I get the function key legend,
but it disappears when the system refreshes the screen. Fine if I'm
doing "SFLPAG=SFLSIZ" mode, but not if I'm doing "SFLSIZ > SFLPAG" mode.

If I do
< A 19 1'F12=Cancel' >
< A COLOR(BLU) >

with WINDOW(2 18 19 59), I get CPD7830: Start line number too large.

and if I do it with WINDOW(2 18 19 59 *NOMSGLIN), I get CPD7812: Subfile
control record overlaps subfile record.

Is there a trick for putting a function key legend line on the bottom of
a window, below a subfile? I know that in non-window applications, I use
a separate RECORD for the function key legend(s) below a subfile, but I
don't see how that could work with a window.

--
JHHL
--
This is the RPG programming on the IBM i / System i (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.




--
Rory Hewitt

http://www.linkedin.com/in/roryhewitt





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.