[Rexx Utility] – RNUM – An easy to use Renumbering tool for ISPF

If you are a COBOL developer/maintain COBOL code, adding new code is often a hassle. Line numbers are used by Code Management software such as ChangeMan/Endevor to handle code retrofitting and if they are incorrect, your code will end up giving you unexpected results. This is a handy tool that I have been using for more than a couple of years now – RNUM.

This utility can be used in 2 different ways – (1) Auto increment & add line numbers for a given set of marked lines of code or (2) be used to mark a set of lines with a given fixtag. The usage of the tool is:

rnum strt <strt-lbl> <end-lbl> <incr>

strt – starting value/fix tag to add
<strt-lbl> – starting label. Optional, Defaults to first line
<end-lbl> – ending lable. Optional, Defaults to last line
<incr> – Line number increment. Optional, Defaults to 100

The code is well commented and released under GPLv3. (What this means is that the license gives you the freedom to use the software for any purpose, to modify it in anyway you wish, and to share it (including mods) with anybody you want provided you follow certain rules as explained here)

Download the code using the link below (zipped text file) and upload the code to your mainframe (via FTP/IND$FILE)

RNUM - REXX Tool
RNUM - REXX Tool
RNUM.zip
2.0 KiB
35 Downloads
Details

If you find any bugs or wish to request modifications to this utility, drop me a note in the comments below. Feedback is always welcome. Please spend a minute to read our disclaimer before using/downloading the application.

Eco friendly sig-“natures”

Your email signatures speak a lot about you and also about causes that you feel strongly about. Now, let it say how much you care about nature. Releasing the first lot of sig-“nature”-s

Save Trees - thecodeisclear - signature

Save Water - thecodeisclear - signature

Save Fuel - TheCodeIsClear - Signature

Think Before you Print - TheCodeIsClear - Signature

Say No to Plastic - TheCodeIsClear - Signature

Turn Off The Lights - TheCodeIsClear - Signature

The images above are for use in web mail services or in forums. If you wish to use them in Outlook 2007 (and later), you will need larger resolution images. You can download them below

Signature Images for Outlook
Signature Images for Outlook
TheCodeIsClear-Ecomuses-Outlook-Signatures-1.zip
Version: 1
179.8 KiB
26 Downloads
Details

Add any of these into your email signature (or) cycle them, one per week. Here are some useful “how-to” links

Pass on the message to your friends. If you have any slogans that you want to see in the form of a sig-“nature”, post a comment and I will create a follow up post with your requests.

My first Windows application

Sometimes opportunities just sprout up and you take it for all its worth. One such opportunity showed up last Friday. The client wanted a report of all transactions done via MasterCard from January 2011 to March 2011 split day wise. We had a few history files of transactions, but it would have been given us 75% of what business wanted. There were consolidated daily reports, that stored the details of all transactions entering the system. This was a huge report (average report size was 70 MB) and the data we needed was a mere 5-10% of the entire report.

Typically, such reports are uploaded to the mainframe and we write small programs to extract data and reformat it into another report. Uploading 90 days worth of data via a single link FTP was taking ages. We aborted the mission when one 70 MB file took 5 hours to upload. The next logical step was to find a way to code a filtering process on the report on the desktop. Knowing that VBA macros/modules can open and read text files, I fired up Visual Studio 2005 to create my first windows application.

Time was short, so I resisted the temptation to use complex controls. The basic flow was something like this
Flowchart for ReportXtract
The logic was simple, use the StreamReader & StreamWriter object to read the report file and write into the extract file. When I wanted to send the file to my team (we had a lot of files and parallel processing was badly needed), I was able to create an installer within minutes. I would have loved to write the output into an Excel file, but had to settle for a pipe-delimited output text file. A final manual step to import text to Columns in Excel was required. Version 2.0 will have option to directly navigate to the report as well as give the user an option to choose multiple filter options for selecting the transactions.

For all it was worth, I enjoyed the experience. How did you feel when you wrote the first program?
PS: Here is the image of the ReportXtract application (pretty sparse UI)
Screenshot of the ReportXtract program

Handling multiple 3270 Sessions

For those familiar with Terminal Emulators for Mainframes are probably aware that each session connection logs you in to one application on the Mainframe (a TSO region, CICS region, an application such as CA-7 etc). If you are working on a MRO (Multi-Region Operation) system, at any given time you need to be looking at atleast 3 sessions. If your shop supports Supersessions, you could easily logon to multiple sessions with a single sign-on and swap between sessions using special commands.

This comes with a cost, a cost that the management wanted to do away with. Here I am (along with many others) stranded without a Session Manager. The solution that I have in mind is to create a Visual Basic Session Manager which handles session display. We use the Quick3270 emulator and thankfully it has a Reference “Quick3270 2.0 Type Library” that can be added to your Visual Basic Project (It can also be added to a VBA project, so you could do this even with just Microsoft Office installed). I was able to install Visual Studio 2005 recently and hence the “Application” approach.

Here are the proposed features and some mental notes (Version 1.0 scope):

  • Allow user to enter ID & Password and choose Session to connect to. By entering these details, the session will be made available.
  • Ability to store RACF ID, last connected Session and if chosen, password (Password will be MD5 hashed. We take security seriously)
  • Provide a list of sessions that can be connected to. This list can be managed and edited
  • Use the Quick3270 Visible Property to toggle visibility.

The progress I have made so far is that I have created the initial display form, the preferences file. Next is the Quick3270 connectivity. I am yet to read the documentation (either Visual Studio or Quick3270), the road looks long and uncertain now.