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



I use two procedures to determine screen size, and terminal capability:


// ------------------------------------
// Screen Is 27x132
// Returns *On if current screen mode is *DS4
// ------------------------------------
dcl-proc ScreenIs27x132 Export;
dcl-pi *n Ind end-pi;

dcl-s dspmod char(1) Inz('3');

dspmod = QsnRtvMod(*omit: *omit: *omit);

return (dspmod = '4');
end-proc;

// ------------------------------------
// Screen Allows 27x132
// Returns *On if current screen supports *DS4
// ------------------------------------
dcl-proc ScreenAllows27x132 Export;
dcl-pi *n Ind end-pi;

dcl-s dspmod char(1) Inz('4');
dcl-s result int(10) Inz(0);

result = QsnQryModSup(dspmod: *omit: *omit: *omit);

return (result = 1);
end-proc;

The prototypes for the API's look like this:

// ------------------------------------
// QsnRtvMod - returns the current display mode
//
// Parameters:
// dspmod - OUTPUT - The Display Mode ('3' or '4')
// omissible
// handle - INPUT - Low-level environment handle
// omissible - uses default environment
// if missing.
// ec - I/O - Error Code
// omissible - Sends escape and diagnostic messages
// if missing.
// ------------------------------------
dcl-pr QsnRtvMod char(1) ExtProc('QsnRtvMod');
dspmod char(1) options(*omit: *nopass);
handle Int(10) const options(*omit: *nopass);
ec LikeDs(errCode_t) options(*omit: *nopass);
end-pr;

// ------------------------------------
// QsnQryModSup - queries display mode support for the current display
device
// returns value of the mode indication if successful, or -1 otherwise.
//
// Parameters:
// dspmod - INPUT - The Display Mode ('3' or '4')
// modind - OUTPUT - Mode indication ('0' - display mode not supported,
// '1' - display mode supported)
// omissible
// handle - INPUT - Low-level environment handle
// omissible - uses default environment
// if missing.
// ec - I/O - Error Code
// omissible - Sends escape and diagnostic messages
// if missing.
// ------------------------------------
dcl-pr QsnQryModSup Int(10) ExtProc('QsnQryModSup');
dspmod char(1) const;
modind char(1) options(*omit: *nopass);
handle Int(10) const options(*omit: *nopass);
ec LikeDs(errCode_t) options(*omit: *nopass);
end-pr;

On Fri, Feb 14, 2020 at 11:16 AM dfreinkel <dfreinkel@xxxxxxxxxxxxxxxxx>
wrote:

I need more help, please.

I have the program working with issues. Switching the screens sizes is
working and the program recognizes the session size (24 by 80 or 27 by
130).

Problem 1:
The record format for the f-keys will not display. I cannot identify a
reason.

A R ITULBLFK2

A*%%TS SD 20200213 092610 DFREINKEL REL-V7R2M0 5770-WDS

A 29 DSPMOD(*DS3)

A OVERLAY

A** ERASE(ITULBLFK)

A N29 26 3'F3=Exit F6=Accept
F12=Cancel'

A 29 23 3'F3=Exit F6=Accept F12=Cancel
F1-
A 3=Save and exit'

A TEXT('F-key line 2')


Problem 2:
How do I get the program to tell me what screen size is being used by the
session, that is, is the session configured as a 24 by 80 or 27 by 130
session?

I added the INFDS using position 67 to 70 for the display file. It is
always
'0000' for all session sizes.


TIA.

Darryl Freinkel
A4G.
Tel: 770.321.8562 Ext 111 | Cell: 678.355.8562



--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://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: https://amazon.midrange.com


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.