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



Bill,
The code snippets below are from a working program. Let me know if you have any questions.



Relevant DDS field definitions.

Subfile cursor relative record . . . SFLCSRRRN SFLRECKEY

Return cursor location . . . . . . . . . . RTNCSRLOC Y
Type indicator *RECNAME . . . . . . . . Y
Cursor record . . . . . . . . . . . . . REC
Cursor field . . . . . . . . . . . . . . FLD

Record format names.

SCP000101 SFL
SCP000102 SFLCTL SCP000101
SCP000103 RECORD



RPGLE Code.

FSCP0001FM CF E WORKSTN INDDS(INDICATORS)
F INFDS(WSINFDS)
F SFILE(SCP000101:RRN)

D SFLKEY S 4 0 INZ(0)
D SUBFILE_NXT_CHG...
D 41 41N INZ(*OFF)


// ******************************************************************
// * DISPLAY SUBFILE.
// ******************************************************************

DOW CMD_KEY <> END_PROGRAM;

WRITE SCP000103;
EXFMT SCP000102;

// ******************************************************************
// * CHECK FOR END OF JOB & SET OFF ERROR INDICATORS.
// ******************************************************************

EXSR ENDJOB;
EXSR ERROFF;

// ******************************************************************
// * CHECK FOR LOOK UP.
// ******************************************************************

IF CMD_KEY = FIELDLOOKUP;

// ******************************************************************
// * DO NOT ALLOW LOOK UP TO CHANGE A PREVIOUSLY UPDATED RECORD.
// ******************************************************************

CHAIN RRN SCP000101;

IF %FOUND;

IF SFLDSPUPDF = 'U';

FLD = *BLANKS;
UPDATED_RECORD_PROMPT_ERROR = *ON;
IDX = 12;
EXSR DSPERROR;
UPDATE SCP000101;
ITER;

ENDIF;

ENDIF;


EXSR INQUIRE;
ITER;

ENDIF;

/ other processing

// ******************************************************************
// * SUBROUTINE FOR FIELD LOOK UP.
// ******************************************************************

BEGSR INQUIRE;

RESET VALIDFIELD;

/ other processing


// ******************************************************************
// * CALL LOOK UP WINDOW FOR PRODUCT NUMBER.
// ******************************************************************

IF FLD = 'SFLPRODUCT';

P$PROD = SFLPRODUCT;
RESET P$MENU;

VALIDFIELD = *ON;

CALLP BLR2302(P$PROD : P$MENU);


// ******************************************************************
// * UPDATE THE SUBFILE RECORD.
// ******************************************************************

CHAIN SFLKEY SCP000101;

IF %FOUND;

IF P$PROD <> *BLANKS;

SFLPRODUCT = P$PROD;

ENDIF;

SUBFILE_NXT_CHG = *ON;
UPDATE SCP000101;

ENDIF;

ENDIF;

/ other processing


ENDSR




Terry Anderson
Programming Manager 
Grede LLC. 
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell  1.251.363.4975




----------------------------------------------------------------------

message: 1
date: Mon, 23 Mar 2015 11:08:30 -0400
from: Buck Calabro <kc2hiz@xxxxxxxxx>
subject: Re: Positioning cursor on a subfile record

On 3/13/2015 9:29 AM, Bill Howie wrote:

displays at the bottom of the screen and THAT all works fine. I'd like to
position the cursor on the subfile row that the user hit F1 on in this
situation but no matter what I try it doesn't seem to work. I've got
the subfile set up with the SFLRCDNBR(CURSOR) keyword and also the
SFLCSRRRN() keyword and I'm moving the field value that goes along with SFLCSRRRN to
the SFLRCDNBR field and updating the subfile. STILL doesn't work.

Can you post the DDS and the HLL code that's firing it?

--
--buck



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.