04
Mon, Nov
1 New Articles

Enhancements to the Application Development Tools

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

Brief: It's the beginning of a new year, and a new release of OS/400 has arrived. For all the trouble of upgrading your operating system, you might be wondering what you'll gain in return. This article explores some of the improvements made to the Application Development Tools. It might just inspire you to take the plunge.

If you're like me, you probably spend the majority of your time on the AS/400 using one of the Application Development Tools-PDM, SEU, SDA or RLU. Since we use these tools so often, it seems like a good opportunity to start talking about V2R3 of OS/400, released on December 17, 1993. Even if it will be some time before your company upgrades, the enhancements will interest you-these new features can increase your productivity and help you customize your development environment. Let's take a look at each of the Application Development Tools (ADT) in turn to see what's in store for 1994.

Program Development Manager (PDM)

Let's start with the enhancements to PDM since this is the focal point from which all of the other tools can be launched.

Log Option Commands

There are two new options you'll find on the second page of the Change Defaults display (F18) as shown in 1. Log option commands allows you to specify whether or not commands resulting from PDM options are written to the job log. Changing this option to Y records the commands generated by PDM options, which allows you to retrieve them from the job log using F9 on a command line. For example, if you take option 2 on the WRKMBRPDM screen to edit the source member INV001RG in source file QRPGSRC in INVLIB, pressing F9 would retrieve the following command:

There are two new options you'll find on the second page of the Change Defaults display (F18) as shown in Figure 1. Log option commands allows you to specify whether or not commands resulting from PDM options are written to the job log. Changing this option to Y records the commands generated by PDM options, which allows you to retrieve them from the job log using F9 on a command line. For example, if you take option 2 on the WRKMBRPDM screen to edit the source member INV001RG in source file QRPGSRC in INVLIB, pressing F9 would retrieve the following command:

 STRSEU SRCFILE(INVLIB/QRPGSRC) + SRCMBR(INV001RG) OPTION(2) 

The logging of options works for user-defined options as well. This feature can be especially useful when prompting an option using F4. The resulting command is written to the job log after changes are made on the prompt screen, providing you with a shortcut if you retrieve the command later. For example, suppose you have a user-defined option CA defined as CALL PGM(&N). When you select option CA for INV001RG and press F4, you are prompted for the CALL command. If you enter two parameter values of '930101' and '931231' and press Enter, you would then be able to retrieve the following command using F9:

 CALL PGM(INV001RG) + PARM('930101' '931231') 

In this case, you can see that if you want to rerun the command, it is much easier to use F9 to retrieve it than it is to reselect the option, press F4 to prompt and rekey the parameters. In this type of situation, logging options can really pay off.

Exit Lists on Enter

The other new option on the Change Defaults display, Exit lists on Enter, allows you to specify whether or not the Enter key will exit the PDM "work with" screens (i.e., libraries, objects and members). Changing this option to N keeps you on the list screens until you press either F3 or F12-pressing Enter has no effect. You can use this option to keep from losing your place on a PDM list panel if you unintentionally press the Enter key.

Subset by Size

An enhancement has been made to the way in which PDM allows you to subset objects (F17). Object size prompts have been added to allow you to select objects within a particular size range (see 2). Subsetting by size can be done in conjunction with other subsetting criteria such as object type. For example, you could request that PDM show you all files in a library which are greater than 10 megabytes in size. You could use this technique to locate large files on your system which may be candidates for purging or reorganization.

An enhancement has been made to the way in which PDM allows you to subset objects (F17). Object size prompts have been added to allow you to select objects within a particular size range (see Figure 2). Subsetting by size can be done in conjunction with other subsetting criteria such as object type. For example, you could request that PDM show you all files in a library which are greater than 10 megabytes in size. You could use this technique to locate large files on your system which may be candidates for purging or reorganization.

New ILE options

PDM also has new options to support the Integrated Language Environ-ment (ILE). These new PDM options will probably interest you only if you have the V2R3 ILE C/400 compiler-currently the only compiler supported under ILE. When IBM releases the ILE versions of the RPG and COBOL compilers (probably later this year), these new PDM options will be supported for those compilers as well. For more information on ILE, see "The Integrated Language Environment," MC, May 1993.

Source Entry Utility (SEU)

Of the three remaining Application Development Tools discussed in this article, SEU probably gets the most use by programmers. So let's now turn our attention to this commonly used tool to see what improvements have been made.

New Line Commands

Probably the most significant en-hancement to SEU is the addition of three new line commands to facilitate printing partial source members (see 3). These line commands are executed in the sequence column of either an edit or browse session of SEU.

Probably the most significant en-hancement to SEU is the addition of three new line commands to facilitate printing partial source members (see Figure 3). These line commands are executed in the sequence column of either an edit or browse session of SEU.

Prior to V2R3, if you wanted to print a partial source member you had to either copy selected lines of code into a temporary source member and print from there or spool the whole member and select PAGERANGE parameter values on the Change Spooled File Attributes (CHGSPLFA) command. The new Line Print commands make it much easier to print partial source members.

When you want to print one subroutine from a program, just block it with two LLP commands as 4 illustrates. Lines which have been excluded using one of the X, Xn or XX commands do not print. Instead, a message prints, similar to the exclude message shown on the screen, specifying the number of lines which have been excluded. Each time an LP command is used, a new spooled file is created.

When you want to print one subroutine from a program, just block it with two LLP commands as Figure 4 illustrates. Lines which have been excluded using one of the X, Xn or XX commands do not print. Instead, a message prints, similar to the exclude message shown on the screen, specifying the number of lines which have been excluded. Each time an LP command is used, a new spooled file is created.

More Flexible Line Commands

Another new feature enables line commands to execute while other line commands are pending. For example, if you enter the command DD to begin a delete block, you can execute other line commands (e.g., Insert, Move, Copy) before closing the delete block with another DD command.

Prompting on a Split Screen

The last enhancement to SEU we'll discuss gives you the power to prompt a source record on the edit session of the edit/browse split screen display. If you tried to do this prior to V2R3, you received an error message: "Prompt not allowed on split display."

However, this new feature does not work exactly as you might expect. When prompting an RPG or DDS statement, you would expect to see the prompted statement overlay part of the browse session at the bottom of the screen. Actually, the prompted statement appears instead of the browse session on the bottom half of the screen. While in prompt mode, the browse session temporarily disappears, as if the screen were no longer split. When you finish prompting, the browse session returns to the bottom half of the screen.

Screen Design Aid (SDA)

SDA has a number of new features in V2R3. Some of the improvements are designed to increase productivity, while others result from making the tool support new V2R3 DDS keywords and keyword parameters. This section explores some of the more important enhancements.

Delete-Block Capability

In terms of productivity, one of the best enhancements is the addition of a new delete-block function. This function allows you to delete a block of fields at one time, through the use of a new control code consisting of two minus signs (--). This is similar to the way you copy a block of fields, except that you use two minus signs instead of one.

To use this new feature, you place two minus signs in the upper-left corner and two more in the lower-right corner of a block of fields. When you press Enter, the block is outlined in dots to show you what will be deleted. At this point, you can either press Enter to confirm the deletion or press F12 to cancel. Contrast this with the old method of deleting, where you have to place a d in front of each of the fields that you want to delete.

Command Entry Window

IBM added a new command key to the Design Image Work Screen. Pressing F22 now displays the familiar command entry window-the same window which pops up when you press F21 in SEU. Unfortunate-ly, the developers could not use the same command key for both tools, since F21 is already reserved in SDA to display additional records. This is bound to lead to some confusion as you try to remember which command key to use; however, it is still a welcome feature.

Print Field Definitions Option

Another command key was added to the Design Image Work Screen. Pressing F13 now takes you to a new Change Defaults screen. From there, an option allows you to control whether or not to include field definitions when printing the work screen image using F17.

Support for Continued Entry Fields

Now let's take a look at some of the new DDS keyword support. (There are many new DDS keywords, but SDA does not support all of them.) For example, support has been added for the new DDS keyword, Continued Entry Field (CNTFLD), which allows a single field to span multiple lines. This keyword is accessed by first selecting Field Keywords and then selecting General Keywords. To activate CNTFLD, specify a column width for the field. For example, suppose you have a 20-byte character field defined as Both (input/output). In SDA it would look like this:

BBBBBBBBBBBBBBBBBBBB

Specifying a CNTFLD value of 10 would cause the field to be shown as two 10- byte fields, one on each line like this:

 BBBBBBBBBB BBBBBBBBBB 

Even though SDA splits the field in half, the generated DDS code would define only one 20-byte field containing the keyword CNTFLD(10). (For more information on this and some of the other new keywords, see "DDS Goes Graphical," MC, July 1993.)

Help Area Options V2R3 contains significant improvements to the way in which you define help areas. Before V2R3 you had two choices: define a help area by hard-coded screen coordinates or define one for the whole record. If you defined a help area by screen coordinates and you moved a field, you had to change the screen coordinates.

Now, in addition to the old way of defining help areas, you can also define them by field or by constant. The nice thing about this method is that once you assign help text to a field or constant, you are free to rearrange the screen any way you want. Since the help text is not bound by hard-coded screen coordinates, it will remain attached to the field or constant no matter where it is located on the screen.

Window Message Line Option

Support for a new keyword parameter allows you to specify whether or not a DDS window should have a message line. When you define a window, the last line is normally reserved for error messages. SDA now gives you the option to specify that the window should not have a message line. If this is the case, then error messages appear at the bottom of the display, or on whatever line you have specified on the Message Location (MSGLOC) keyword.

I can see how this would be a useful option for very narrow windows, because error messages located inside such windows often become truncated. In this case, displaying them on the bottom of the screen makes more sense, and now we have the option to do so.

Run-time Attributes

Another new keyword parameter is supported to allow you to specify a display attribute for a field at run-time. To access this feature, first select Field Keywords; then select Field Attributes as shown in 5 (see page 30). Rather than selecting a field attribute such as High Intensity (HI), specify a field name at the Program-to-system field prompt. This field must be defined somewhere in the display file record format as a two-byte, alphanumeric program-to-system field (P-field).

Another new keyword parameter is supported to allow you to specify a display attribute for a field at run-time. To access this feature, first select Field Keywords; then select Field Attributes as shown in Figure 5 (see page 30). Rather than selecting a field attribute such as High Intensity (HI), specify a field name at the Program-to-system field prompt. This field must be defined somewhere in the display file record format as a two-byte, alphanumeric program-to-system field (P-field).

In the program which uses the display file, load the P-field with the hexadecimal representation of the attribute you want. For example, loading it with the character value 22 would cause the field to be displayed in high- intensity.

Using this feature can reduce the number of indicators needed to control screen attributes. For example, instead of setting on an indicator to create a reverse-image display of a field, you can simply move a value of 21 to the P- field before redisplaying the screen.

Report Layout Utility (RLU)

The last tool we will look at, RLU, hasn't gained the widespread use that I think it rightfully deserves. RLU allows you to design reports on the screen and automatically generate DDS source code. In terms of productivity, it is probably one of the most significant additions to the standard AS/400 programming tools. As with the other tools mentioned in this article, RLU takes on some noticeable improvements this time around, as you're about to see. For more information on RLU, look for an article in an upcoming issue of MC.

Define Fields Using SDA Format

One of the biggest complaints I've heard about RLU is that, although its task is similar to SDA's, the tool operates in a completely different way. As a result, knowing how to use SDA has been of no help when learning RLU. Because of this, people seemed quick to criticize RLU upon its introduction and some have even avoided using it.

You'll be glad to know that IBM has listened to these complaints and has finally done something about them. RLU has a new feature which allows you to define fields and constants using the SDA format. This is a very significant improvement and one which I hope will encourage more people to take advantage of RLU's capabilities.

Of course, you can still define fields and constants the old way, using F11, but those who feel more at home with SDA will want to take advantage of this new feature. Let's look at some examples to see how it works.

To create a five-byte, numeric field with two decimal positions, you can enter either +666.66 or +6(5,2) in the field line of the Design Report display. You define character fields in a similar fashion using an upper- or lowercase O instead of 6. For example, to define a three-byte character field, enter either +OOO or +O(3). RLU assigns field names to these fields the same way SDA does (FLD001, FLD002, FLD003...), so you still need to rename the fields after they are created.

Constants can also be defined using SDA syntax. Enter the constant on the field line enclosed in single quotes. For example, you could enter the value 'Inventory Report' to create a report heading.

Select Order of Database Fields

RLU has a new feature that lets you select the order for database fields-to try it, press F10 to select Database fields, then select option 1 to add fields and press F4 to prompt. Enter a valid file and record format name, and then press F4 to prompt for the field names. The Select Database fields display uses F11 to toggle between sorted and unsorted. When the list is sorted, the fields appear in alphabetic sequence. When the list is unsorted, the fields appear in the order in which they are defined in the record. Once you set the order, RLU remembers your preference for future edit sessions.

Multiple Field Deletion

RLU also gives you the capability to delete multiple fields within a record format. Prior to V2R3, you had to place the cursor on each field you wanted to delete and press F16. Now you can delete several fields at a time by selecting option 4 on the Work with Fields display (F4).

Session Defaults Improvement

Although the last enhancement to RLU is not all that significant, you should at least be aware of it. The settings in the Session Defaults for Insert marked data and Replace marked data can now be carried over to a new session of RLU. You access the session defaults by first pressing F22 to switch to the alternate keys and then pressing F13. I tried changing all of the session defaults under both V2R2 and V2R3 to see which ones carried over. These two turned out to be the only session defaults not previously carried over, so V2R3 simply brought them into compliance with the others.

Submit Your Requests

As you can see, the IBM application development team has been busy improving the ADT products. They have done a nice job and have given us some important enhancements, both in terms of better productivity and language support.

I think it is safe to say requests from programmers who use these products on a daily basis triggered many of these enhancements. I would encourage you to submit any enhancements that you would like to see made to these products directly to the Toronto Lab at IBM. Midrange Computing gives you an easy way to do this. Simply call the MC-BBS and post a message to the application development team. Who knows, maybe your request will end up in the next OS/400 release.

Robin Klima is a senior technical editor at Midrange Computing.

Report Layout Utility User's Guide and Reference (SC09-1416, CD-ROM QBKA0701).

Screen Design Aid User's Guide and Reference (SC09-1340, CD-ROM QBKA0801).

Source Entry Utility User's Guide and Reference (SC09-1338, CD-ROM QBKA0901).


Enhancements to the Application Development Tools

Figure 1 Change Defaults Display

 Change Defaults Type choices, press Enter. Log option commands . . . . N Y=Yes, N=No Exit lists on ENTER . . . . Y Y=Yes, N=No Bottom F3=Exit F5=Refresh F12=Cancel 
Enhancements to the Application Development Tools

Figure 2 Subsetting Objects by Size

 Subset Object List Type choices, press Enter. Object . . . . . . . . . . . . *ALL *ALL, name, *generic* Object type . . . . . . . . . *ALL *ALL, *type Object attribute . . . . . . . *ALL *ALL, attribute, *generic*, *BLANK Object size From . . . . . . . . . . . . 0 0 - 9999999999 To . . . . . . . . . . . . . 9999999999 0 - 9999999999 Text . . . . . . . . . . . . . *ALL F3=Exit F5=Refresh F12=Cancel 
Enhancements to the Application Development Tools

Figure 3 New SEU Line Commands

 Command Description LP Prints one line LPn Prints n number of lines. LLP Prints a block of lines (i.e., all lines between two LLP commands.) 
Enhancements to the Application Development Tools

Figure 4 Printing a Subroutine Using Line Commands

 Columns . . . : 1 71 Edit MAGWORK/SOURCE SEU==> FLT001RG 0065.00 *============================================================ 0066.00 * Process input from display file (print schedule) 0067.00 *============================================================ LLP C DSPFIN BEGSR 0069.00 * 0070.00 C READ FLTCTL 99 0071.00 * 0072.00 C OPEN QSYSPRT 0073.00 * 0074.00 C 1 DO 10 N 0075.00 C N CHAINFLTSFL 99 0076.00 C *IN99 IFEQ *OFF 0077.00 C EXCPTEXPRNT 0078.00 C ENDIF 0079.00 C ENDDO 0080.00 * 0081.00 C CLOSEQSYSPRT 0082.00 * LLP C ENDSR 0084.00 *============================================================ 0085.00 * Process input from data queue 
Enhancements to the Application Development Tools

Figure 5 Selecting Display Attributes

 Select Display Attributes Field . . . . . : ITEMCD Usage . . : B Length . . . . : 2 Row . . . : 8 Column . . . : 25 Type choices, press Enter. Keyword Y=Yes Indicators/+ Field conditioning . . . . . . . . . . . ___ ___ ___ Program-to-system field . . . . . . . . __________ ___ ___ ___ Display attributes: DSPATR High intensity . . . . . . . . . . . . HI _ ___ ___ ___ Reverse image . . . . . . . . . . . . RI _ ___ ___ ___ Column separators . . . . . . . . . . CS _ ___ ___ ___ Blink . . . . . . . . . . . . . . . . BL _ ___ ___ ___ Nondisplay . . . . . . . . . . . . . . ND _ ___ ___ ___ Underline . . . . . . . . . . . . . . UL _ ___ ___ ___ Position cursor . . . . . . . . . . . PC _ ___ ___ ___ Set modified data tag . . . . . . . . MDT _ ___ ___ ___ Protect field . . . . . . . . . . . . PR _ ___ ___ ___ Operator ID magnetic card . . . . . . OID _ Select by light pen . . . . . . . . . SP _ F3=Exit F12=Cancel 
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

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

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • 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

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • 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: