25
Thu, Apr
0 New Articles

Weaving WebSphere: Can WDSc Help Me with ILE?

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

"When I was younger, so much younger than today, I never needed anybody's help in any way."
--John Lennon and Paul McCartney

It's a beautiful Friday in June. The birds are singing, the sun is shining, and you're trying to get a program written so you can get the heck out of Dodge and away for the weekend. What's the quickest way to get done? SEU or WDSc?

Well, if this were Java we were talking about, it would be a no-brainer. WDSc is hands down the most productive Java development environment I've ever used. However, the jury is still out on WDSc as an ILE development tool. For those of you who like the Cliffs Notes version of things, here's the summary of this article: WDSc is very good for RPG, is OK for COBOL, and needs some work on CL. However, there are really cool things going on with the editors that bode well for the future, and I invite you to walk through some of them with me.

Why Use WDSc at All?

I'll always fall back to a simple answer to this question: You'll probably need it someday. Why? Because all the neat features, from new languages to new capabilities, will be added to WDSc, not to SEU and PDM. That's just the nature of the beast. And since we've heard that there will be a WDSc "lite" with only iSeries editing capabilities in place, the size of computer required to run the software may be less of an issue.

Not only that, but once you get your hands on WDSc, you can begin to dabble. In what? In just about anything that strikes your fancy. From Java to JSP to Web Services, all of these are available in WDSc for you to play with in your copious free time ("copious" is tongue in cheek, but building your skill set is no longer a luxury; it's a necessity).

But It's So Slooooooow!

I hear this a lot. A lot of people in our industry argue that WDSc is just not as productive as SEU. I can even understand the argument if you look at it a certain way. For example, if you're talking about coming in from a dead stop with your PC turned off and making a two-line change to a program, then certainly SEU via iSeries Access is going to be quicker than loading WDSc and modifying the program that way.

But that argument doesn't really hold, because if we were always looking for the fastest method, we'd all have dumb tubes on our desks, since it's a lot quicker to flip on a tube and get a sign-on screen than it is to wait for Windows to boot and then run iSeries Access.

"But," you say, "we don't have to wait for Windows to boot because our machine is already up and running!"

Yes indeed! And in a proper development environment, you also don't have to wait for WDSc because you have it up and running as well. I start WDSc when I start work in the morning, and it runs all day. Often it runs overnight and is ready for me in the morning! The biggest problem with WDSc is if for some reason you have to switch workspaces. That can take a minute or two, but hopefully it's a fairly rare occurrence (and a good excuse for a cup of coffee).

OK, WDSc Is Not Evil in and of Itself

Good! I'm glad we got that far. Now it's time to take a look at the jLpex editors and find out what they're doing. (Author's Note: I continue to refer to the editors in WDSc, which are written in Java, as "jLpex" editors in order to distinguish them from the older LPEX editors written in C. Someday, I may have to change that and use the less precise term LPEX, but for now I am sticking with jLpex!) I'm going to split the editors into four groups: RPG, COBOL, CL, and "other." That's because for the most part the "other" editors don't have many features short of keyword highlighting rudimentary syntax checking.

RPG

Easily the best of the bunch, the RPG editor is a very powerful editor indeed. It has all of the many powerful features that the jLpex editors share (such as a combination of line editing and cursor-based editing), and in addition the RPG editor is highly integrated with other views and features.

For example, when you're editing an RPG source member, the RPG outline view is particularly powerful. As you might expect, it displays a list of the files, fields, procedures, and subroutines, but it goes far beyond that. Every field can be expanded to show references. In a particularly nice move, the folks in charge of the outline even have a visual cue (an asterisk) that identifies whether a field is being updated. The same holds true for indicators. Not only that, but "complex" objects such as data structures and files can all be expanded: data structures to their fields, and files to their record formats and further to their fields. And the same cross-reference capability of seeing where each object is used is available at each level. Figure 1 shows an example of the outline view, with a reference to a field in a file selected in the outline view, which in turn highlighted that line of code in the editor view.

http://www.mcpressonline.com/articles/images/2002/050607-ILE%20in%20WDSCV3--06130500.png

Figure 1: Selecting a reference to a field in the outline highlights it in the source code. (Click images to enlarge.)

These features are available only if you refresh the outline. I think this makes sense; I have to believe that trying to keep the outline in sync with every keystroke would be a massively CPU-hungry task. Instead, if you need the outline, you simply refresh it. Another bonus of the outline is that once it is refreshed, you can use content assist to help write code. Hitting Ctrl+Space during editing will instruct the editor to attempt to find the appropriate completion for the code you are typing. For example, if you type a letter and press Ctrl+Space, the editor will bring up a list of fields that begin with that letter. You can select from that list, and the editor will type the rest of the field name for you. Figure 2 shows an example of content assist in action. I typed "saveField = UT" and then pressed Ctrl+Space. Content assist brought up a selection window with a list of fields that start with "UT."

http://www.mcpressonline.com/articles/images/2002/050607-ILE%20in%20WDSCV3--06130501.png

Figure 2: Content assist will help you write your code.

Yet another feature: In fixed-format RPG (III or IV) you can prompt for a line and a dialog will be displayed that allows you to fill in the line. The dialog has all the specification-exclusive fields and their appropriate values (for example, the opcode field on the C-spec dialog has a dropdown list with all the opcodes), and while it's a bit cumbersome to me, it would certainly be helpful to beginning RPG programmers. (You can also prompt for free-format RPG, but all you get is a long blank line to enter code into; there's no code assist or prompting available.)

And of course last but not least is the built-in feature of converting fixed-format RPG IV to free-format. This enhancement alone makes a powerful argument for using WDSc, especially if you plan to transition to free-format RPG.

COBOL

The COBOL editor is significantly less powerful. The outline view shows a selected subset of information, including 01 and 77 level fields, procedures, and a few other things, but the detail is nowhere near the detail the RPG editor has. As far as I can tell, there is no content assist anywhere in the editor, although it does perform syntax checking. Figure 3 shows the outline feature for COBOL.

http://www.mcpressonline.com/articles/images/2002/050607-ILE%20in%20WDSCV3--06130502.png

Figure 3: The outline feature for COBOL is not as fully featured as that of RPG.

CL

The CL editor is the one that most people point to as a demonstration of the superiority of SEU. And in previous releases, I have to admit it was pretty horrible, primarily because the editor had only one CL-specific feature, command prompting, and that didn't work quite the way we expected. If you allowed the editor to format a prompted line, the command was positioned in the first column, and the rest of the command wasn't much better. It was a maximum use of space, I suppose, but it was different than what it was in SEU and of course that's enough to make people a little crazy.

But even though that was a valid example of WDSc not quite measuring up, it's also a perfect example of why you should move to WDSc: Because they fixed it! In the current release of WDSc, not only do those settings default to the same columns as in SEU, but you can override them. The jLpex teams are really working hard to make the editors better for all of us. How many such enhancements do you expect to see in SEU?

Other Editors

The other editors don't really have much going for them other than highlighted syntax (which is a nice feature but not much of a reason to move to WDSc) and some syntax checking. I can understand that the DDS editor isn't going to get a lot of features, although a visual editor for display files is something we'd all love to see. I'd personally like to see the REXX editor with a little better support; it doesn't even have syntax checking. And I was really disappointed to see that the C editor didn't support an outline feature. But there are only so many dollars, and you can't get everything.

Common Features

Then there are the features common to all of the jLpex editors. The fact that these features are common means that once you're used to using them in one language, you can transfer that knowledge to other languages. The only caveat is that the non-iSeries editors (such as the Java editor) don't have all of these features.

It's a Line Editor! No, It's a Text Editor! It's Two Editors in One!

First off is one of the most bizarre but wonderful features of the slightly schizophrenic editors that make up the jLpex family. Each of them supports the standard text-editing features that a PC-based text editor supports: marking a block of text, cutting or copying and pasting it using either menu options or keyboard shortcuts, changing the case of chunks of text from upper to lower, that sort of thing. But they all also support the full range of line editing commands from SEU, including things like block copy, multiple copy/move (which they finally fixed), repeated copies, and so on, all using the familiar line commands like CC/CC/A3 (the first two CCs mark a block of lines to copy, while the A3 identifies the target line and copies the selected code after that line three times).

So, the jLpex editors help you transition from the line-oriented SEU world to the more mouse-based or at least cursor-based environment of standard PC test editors.

There are some features that don't work very well still. Splitting lines is particularly painful. The editor should know that splitting a free-format C-spec should at least force the first character to be past position 6, but it doesn't, so you end up with a bunch of errors until you manually move the line over. While I suppose forcing this behavior might somehow cause problems elsewhere, I'd at least like a preference setting that would allow me to split lines intelligently.

The Hidden World of Commands and Actions

This is the area where I think we're really going to see some cool things. You may not know this, but the editor has a whole set of commands and actions that can be invoked.

The difference between a command and an action is that a command can be invoked directly from the command line. You get to the command line by pressing the Esc key while you're in the editor. You'll see the cursor positioned to an entry field at the bottom of the editing pane. Here, you can enter commands such as findText, which as you might guess will find text. These commands are typically a bit more powerful than at first meets the eye: The findText command can optionally replace the specified text, and do it multiple times, within identified columns, and so on.

Actions, on the other hand, can be assigned to keystrokes or menu items. Typically, these are more granular activities, such as moving a cursor or marking a block of text. And while it may not sound particularly thrilling to be able to move the cursor, these types of actions can be very powerful, especially when encapsulated in some sort of macro. The jLpex editors, being a part of WDSc and thus a part of Eclipse, are very amenable to creating these sorts of macros. If you remember that the Eclipse platform is built to be extended, you might not be surprised to learn that you can write your own Java classes that can then be attached to the editor (via a "plug-in"). These classes can then be used (like macros) to do everything from spell-checking your literals to providing complete generators for things like procedures. That's why I don't worry too much when someone says they don't like how the editors work; if it's really that much of an issue, you can always write your own extension to the editor!

Documentation describing the APIs that can be invoked is quite extensive. You can execute any standard command, as well as any action. You can even dialog with the user, in effect creating your own "wizard" to walk through complex development tasks. I think that this capability may be one of the future strengths of the whole process; if you have corporate programming standards and a set of standard APIs that you use in development, you will be able to write macros that will act as expert systems and walk people through basic programming tasks. This will definitely help you keep standardized and boost productivity as well.

So Are You with Me?

I hope that through a few pictures and a little bit of discussion, I've shown you that the benefits of WDSc are quickly outstripping any negatives. Not only that, but as the product matures, the negatives will be resolved while the positives will only multiply. Eventually, SEU will be pretty much a footnote, something like the difference between a plain ASCII text editor and a word processor like Word or WordPerfect. And those of us who have embraced WDSc will find our jobs a lot easier.
And this is just about editing ILE code; I didn't even touch on using WDSc as a verification, compiling, and debugging tool in an ILE environment. If you're interested, I'll address that in another article down the line. Let me know.

Joe Pluta is the founder and chief architect of Pluta Brothers Design, Inc. He has been working in the field since the late 1970s and has made a career of extending the IBM midrange, starting back in the days of the IBM System/3. Joe has used WebSphere extensively, especially as the base for PSC/400, the only product that can move your legacy systems to the Web using simple green-screen commands. Joe is also the author of E-Deployment: The Fastest Path to the Web, Eclipse: Step by Step, and WDSC: Step by Step. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..

Joe Pluta

Joe Pluta is the founder and chief architect of Pluta Brothers Design, Inc. He has been extending the IBM midrange since the days of the IBM System/3. Joe uses WebSphere extensively, especially as the base for PSC/400, the only product that can move your legacy systems to the Web using simple green-screen commands. He has written several books, including Developing Web 2.0 Applications with EGL for IBM i, E-Deployment: The Fastest Path to the Web, Eclipse: Step by Step, and WDSC: Step by Step. Joe performs onsite mentoring and speaks at user groups around the country. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..


MC Press books written by Joe Pluta available now on the MC Press Bookstore.

Developing Web 2.0 Applications with EGL for IBM i Developing Web 2.0 Applications with EGL for IBM i
Joe Pluta introduces you to EGL Rich UI and IBM’s Rational Developer for the IBM i platform.
List Price $39.95

Now On Sale

WDSC: Step by Step WDSC: Step by Step
Discover incredibly powerful WDSC with this easy-to-understand yet thorough introduction.
List Price $74.95

Now On Sale

Eclipse: Step by Step Eclipse: Step by Step
Quickly get up to speed and productivity using Eclipse.
List Price $59.00

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

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: