|
I have used the following code snipet that works well....
* ////special notes to others that shall follow\\\\
*
* /////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
* | **********VERY important information*********** |
* | Number ONE: compile with OPTION 15 |
* | Number TWO: run the following command after clean comp |
* | |
* | CRTPGM MWGRCLSCAN bndsrvpgm( dsplysiz) actgrp(QILE) |
* | |
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////
HBndDir('MWSRCLIB/BOUND')
D support127 s 1
D is_scrn_siz_ok...
D s 1
*.....................
D SupportDs3 PR N
D DummyParm 1 Options( *Omit )
D SupportDs4 PR N
D DummyParm 1 Options( *Omit )
C if is_scrn_siz_ok = '1'
* Execute Screen One
C EXSR SCRN1
C exsr closeoutbatch
C else
C exfmt notsmall
...
endif
*use a screen API to see what size it supports
* 4=27x132 3=24x80
* return values 0=not valid 1=valid
* Test for 80 Character support
If SupportDs3( *Omit )
* This code is run when the display supports 80 characters
eval is_scrn_siz_ok = '0'
Else
* This code is run when the display doesn't support 80 characters
eval is_scrn_siz_ok = '0'
EndIf
* Test for 132 Character support
If SupportDs4( *Omit )
* This code is run when the display supports 132 characters
C eval is_scrn_siz_ok = '1'
C Else
* This code is run when the dsply doesn't support 132 characters
C eval is_scrn_siz_ok = '0'
C EndIf
I forget where I got this from, it is similar to your solution, but
mine has been working very well here...
HTH
Mark A. Manske
[mailto:mmanske@minter-weisman.com]
Sr. Project Lead
Minter-Weisman
-----Original Message-----
From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
Behalf Of Westdorp, Tom
Sent: Friday, November 10, 2000 2:53 PM
To: RPG400-L@midrange.com
Subject: Determining *DS4 support
I'm trying to determine if a display session is capable of 27 x 132 (*DS4)
support when I open a program so that I can determine which subfile I
process (one that has 30 characters of a longer string or one that has 60
characters). I'm using the QsnQryModSup API in the QSNAPI service program
and asking for display mode 4 and indicator 1 and I always get 0 as the
return value mode indication (from CAE using either 27 x 132 or 24 x 80
configurations).
D QryDspMode PR ExtProc('QsnQryModSup')
D p_DspMode 1a Const
D p_ModeInd 1a Const
D p_LowLvlHdl 10i 0 Const
D p_Error Like(DS_APIError) Const
D p_RtnInd 10i 0
D w_DspMode S 1a inz('4')
D w_ModeInd S 1a inz('0')
D w_LowLvlHdl S 10i 0 inz(0)
D w_Error S Like(DS_APIError)
D w_RtnInd S 10i 0
C CallP QryDspMode(w_DspMode :
C w_ModeInd :
C w_LowLvlHdl :
C DS_APIError :
C w_RtnInd )
Any ideas? Or alternatives? I don't want to just relocate fields based on
the display size, I want to display a larger subset of a database field.
TIA
Tom Westdorp
AS/400 Senior Programmer/Analyst
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.