System Programmers' Tips and Tricks for ISPF Revisited
More on the ISPF Editor and SDSF.
In the November/December 2005 issue of eServer Magazine, Mainframe edition, I wrote an article titled "Systems Programmers' Tips and Tricks for ISPF." In that article, I promised to delve further into the capabilities of the ISPF Editor and offer some tips and tricks for using SDSF. This article delivers on that promise.
ISPF Editor
The ISPF Editor, invoked using either ISPF command-line option 2, or more often using DSLIST via the command-line option combination 3.4, is one of the most fully featured text editors available for any OS. Note that I say text editor since ISPF Edit isn't a graphical editor, although some of its prompting and modeling capabilities are a precursor to the syntax prompting of sophisticated editors now available under a GUI.
ISPF Edit is equivalent to the ubiquitous vi in UNIX* variants and the Notepad application built into Windows* systems. Notepad is perhaps the simplest of these three text-only editors; vi has similarly powerful editing features to those found in ISPF Edit.
My best advice for learning this editor is to first learn the basics, then learn how to discover more functionality as you need it. As a preliminary, the editor has two command modes (similar to vi): these are line commands and primary commands. Line commands are those entered on the line numbers at the left of the data in the edit screen, while primary commands are entered at the Command ===> prompt near the top of the screen-assuming you use Command Line at Top as discussed in my previous article.
Learn the basic line commands: D for Delete, C for Copy, I for Insert, M for Move and the block commands and use a pair of characters mentioned. So, for example DD on line 10, and DD again on line 20 will (D)elete all lines from 10 through 20 inclusive. Using the block command with the (A)fter and (B)efore line commands-for example MM on line 10 and MM again on line 20, then place an A on line 30-will move lines 10 through 20 from their current location to the line (A)fter line 30. Similarly, a B would place them (B)efore line 30.
As with block commands, you can use a single line-command character followed by a number (i.e., I5 will insert five blank lines before the current line, while D10 will delete the current line and the following nine lines).
If an editing task is taking significant time, investigate the help screen; the time invested here may save you many keystrokes and time to change your data.
Michael Cairns, a technical editor for IBM Systems Magazine, Mainframe edition, works for IBM as a technical specialist in the Tivoli zSecure range of software. Michael can be reached at mike.cairns@au1.ibm.com.
More Articles From Michael Cairns
Advertisement
Search our new 2012 Buyer's Guide.
Advertisement
Maximize your IT investment with monthly information from THE source...IBM Systems Magazine EXTRA eNewsletter. SUBSCRIBE NOW.
View past Mainframe EXTRAs here
Related Articles
Tips and Techniques | Overcome eight key challenges and reduce costs
E-Newsletter | Steps you can take to avoid late nights and system frights.
Technical Corner | A mainframe systems programmer must address high-level issues when installing a data warehouse