Home > AS/400 Tips > iSeries administrator tips > Dynamic Screen Manager lets you build screens and windows on the fly
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

Dynamic Screen Manager lets you build screens and windows on the fly


Ron Turull
11.10.2004
Rating: -3.29- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



Ron Turull

Have you ever wanted to do something with a display file but you couldn't seem to get DDS to do it? The last thing you wanted to do was start coding 5250 data streams in a user-defined record format. In that case, Dynamic Screen Manager (DSM) is just what you have been looking for.

DSM is implemented as a sub-set of the standard iSeries API set. It allows you to build screens and windows dynamically from any ILE-language program, even CL! You can even mix DSM with standard DDS display files.

Here are just a few examples of how you might use DSM:

  • Create a window the user can move and re-size. The window position is specified at runtime.
  • Sound the workstation alarm without writing a display file record (using the QsnBeep API).
  • Replace many things you do now with a more intuitive approach. For example, to determine the display mode (i.e., 24x80 or 27x132) before writing to the display, the Retrieve Screen Dimensions (QsnRtvScrDim) API can be used instead of executing a POST to a display file's record format and then querying the display file's file information data structure.

More Information

DSM offers three "functional groups" of services, depending on how much control you wish to have over the screen.

  • Low-level services provide a direct link to the standard 5250 command set. Most of the more common 5250 commands (e.g., Sound workstation alarm) are mapped directly to APIs; those that are not can be executed similarly to the user-defined record method in DDS (i.e., by writing the hexadecimal command to a buffer and writing the buffer).
  • Window services provide a way to dynamically build windows of any size at any location. Once a window is built, the user can move and resize it. Windows and OS/2 programmers will feel somewhat at home using these APIs.
  • Session services provide a scrollable interface conceptually similar to subfiles. A session is a specialized form of a window; it can be moved and resized. Because DSM handles more of the details with sessions, you are more limited as to what you can do.

There are two different ways to use the DSM APIs, directly or indirectly. When an API is called in direct mode, the underlying screen command(s) is executed immediately. To call an API in indirect mode, you specify a command buffer as one of the parameters and the underlying screen command(s) is written to the command buffer instead. You can add multiple commands to a command buffer and then later call the Put Buffer API to have DSM execute all the commands at once. This can be much more efficient, especially as the number of commands increase.

Despite its new technical jargon and low-level appearance, DSM can be quite easy to use and has some real application. It is worth looking at when you are through beating your head against the wall over DDS.

Note: The DSM APIs are in the QSNAPI service program. You must bind your programs to this service program to use them.

-----------------------------------
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years' experience programming for and managing AS/400-iSeries systems.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries system performance and monitoring
Translating Linux for IBM i admins: Working with jobs and networking
Database performance comparisons on IBM i
How to: Monitoring job activity on the AS/400
Performance tuning for IBM i: The basics and beyond
How to: Reduce the percentage of ASP used on the AS/400
Detecting system changes made by outside IP address
AS/400 system values quiz
Checking on System i disk space requires creating a new command: XRTVSYSSTS
Drive space management commands
Viewing netstat information

Integrated File System (IFS)
How to view source files in the library
User being locked out by Windows share on iSeries
Incorrect CCSID on FTP connection from AS/400 to Windows
Trouble accessing IFS path from Win2k3 server
How to use an API for adding users to EIM SSO implemenation
Transfer files from one environment to another without closing all other AS/400 sessions
Securing the integrated file system on IBM System i
Generically send a text file from the IFS via FTP
Setting ILE and C+++ compilers to runtime
Use a virtual directory to move a .bmp file from the IFS to a remote server to run a software package

iSeries administrator tips
Translating Linux for IBM i admins: Using GUI to make it easy
Translating Linux for IBM i admins: Working with jobs and networking
OpenOffice: What to know before making the transition from Microsoft Office
OpenOffice: An enterprise open source solution
Database performance comparisons on IBM i
Translating Linux for IBM i admins: User profile commands
Modern System i reports using Client Access
Tips for installing Lotus Domino server on a System i partition
The iSeries Blog has a new home on IT Knowledge Exchange
Virtualization for IBM i: Backups

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
CIW  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts