|
Hi Phil
It is not easy. It has been a while but here goes.
In the CONFIGURATION SECTION. of the COBOL program I have the following:
SPECIAL-NAMES. I-O-FEEDBACK IS FEEDBACK-DISPLAY.
In the WORKING-STORAGE SECTION. I have the following:
01 WS-SCREEN-FEEDBACK. 05 FILLER PIC X(147). 05 CSRLOC PIC 9(04) BINARY. 05 DTALEN PIC 9(09) BINARY. 05 SFLRCDNBR PIC 9(04) BINARY. 05 LOWRCDNBR PIC 9(04) BINARY. 05 SFLRCDQTY PIC 9(04) BINARY. 01 WS-COL PIC S9(05). 01 WS-ROW PIC S9(05). Before the WRITE to the screen I move WS-ROW & WS-COL to my display file's ROW1 and COL1 fields. Make sure the first time in you initialize WS-ROW AND WS-COL to some valid value.
After the READ of the screen I do the following:
ACCEPT WS-SCREEN-FEEDBACK FROM FEEDBACK-DISPLAY FOR IOF-SCREEN. DIVIDE 256 INTO CSRLOC OF WS-SCREEN-FEEDBACK GIVING WS-ROW REMAINDER WS-COL. In the display file I have the following record level keyword:
CSRLOC(ROW1 COL1) Also in the display file I have the following hidden fields defined:
A ROW1 3S 0H A COL1 3S 0H I hope that helps.
Thanx, PLA
Phil Campbell wrote:
I am working on converting programs from a S/36 (CBL36) mode to AS400 (CBL) mode. I've run into something that I have not been able to figure out. Hopefully someone can help me.
How do you get the position the cursor is at when the enter or a function key is pressed. This is how I have it set up on the S/36. SELECT SCREEN-FILE ASSIGN TO WORKSTATION-OR001FM ORGANIZATION TRANSACTION CONTROL-AREA IS SCREEN-CONTROL-AREA. 01 SCREEN-CONTROL-AREA. 05 KEY-FUNCTION PIC 99. 88 ENTER-KEY VALUE 0. 88 CMD-KEY1 VALUE 1. 88 CMD-KEY2 VALUE 2. 88 CMD-KEY3 VALUE 3. 05 TERMINAL-ID PIC X(2). 05 RESERVED PIC X(8). 05 CURSOR-ROW PIC 999. 05 CURSOR-COL PIC 999. Thanks so very much. Please send any responses to pcampbell@xxxxxxxxxxxx
Phil Campbell :)
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.
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.