Tips and Techniques: ENTFLDATR

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Recently, I rediscovered the ENTFLDATR keyword. This NPTUI (pronounced "en-pa-tooy") keyword allows you to set the field attribute for an input field when the cursor enters the field.

The keyword allows you to make a boring old 5250 green-screen application behave a little more like a PC GUI by changing the field attributes when the user tabs or cursors into the field.

The variation of this keyword I prefer to use is to make the field reverse image when the cursor enters it. To do this, specify the following keyword, either at the record level or on the field itself.

ENTFLDATR((*DSPATR RI))

This provides a very cool-looking effect. If you've ever wondered how the DBU product does what it does with its user interface, this is probably it.

For a quick example of how this keyword works, enter the following DDS and stub it into a program. Then, do an EXFMT on the DSPREC record format. As you tab from field to field, the attributes will automatically change from underline to reverse image.

 

A          R DSPREC                    CF03
A                                      ENTFLDATR((*DSPATR RI))
A                                  8  9'Name . . . . . . '
A            CMPNAME       35A  B  8 27
A                                  9  9'Address  . . . . '
A            ADDR1         30A  B  9 27
A            ADDR2         30A  B 10 27
A                                 11  9'City . . . . . . '
A            CITY          30A  B 11 27
A                                 12  9'State  . . . . . '
A            STATE          2A  B 12 27
A                                 13  9'Zip code . . . . '
A            ZIPCDE        10A  B 13 27
A                                 14  9'Phone number . . '
A            PHONE         14A  B 14 27
A                                 15  9'email  . . . . . '
A            EMAIL         50A  B 15 27

Figure 1: Here's a sample display file using the ENTFLDATR keyword.

Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.

BOB COZZI

Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.


MC Press books written by Robert Cozzi available now on the MC Press Bookstore.

RPG TnT RPG TnT
Get this jam-packed resource of quick, easy-to-implement RPG tips!
List Price $65.00

Now On Sale

The Modern RPG IV Language The Modern RPG IV Language
Cozzi on everything RPG! What more could you want?
List Price $99.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: