Previous Issue Index Next Issue


What's Up, DOCumentation? 1999 # 1

logo

February 1999


From:

To: Users of Robelle Software

Re: News of the HP 3000 and of HP-UX, 1999 #1

What You Will Find in This News Memo:


Qedit logoNew Wide-Jumbo Format in Qedit

In version 4.3 of Qedit, we introduced the Jumbo file format for handling large data files-i.e., up to 1,000 characters per record and 99,999,999 records per file. Now in version 4.7 of Qedit, we have extended this concept even further to handle files with records wider than 1,000 characters. We have named this format Wide-Jumbo, and the following illustrates the commands which have been enhanced to handle this format.

If you use the Text command on a file wider than 1,000 characters per line, Qedit automatically creates a Wide-Jumbo workfile. But you can also create a Wide-Jumbo workfile manually. The following examples address most situations:

[Francois Desrochers]



Up to Table of Contents


Robelle Welcomes New Distributor Down Under

On January 31, 1999, Facer Utilities Pty. Ltd. transferred Robelle's distributorship for the Australian and New Zealand territories to MRFM Pty. Ltd. of Melbourne, Australia. Facer, under the guidance of Laurie Facer, has been in charge of this territory for a number of years. Robelle is grateful to Laurie and all the staff at Facer for the wonderful job they have done and wish them every success in their future endeavors.

We are very pleased to welcome Michael Redmond, principal of MRFM, as the new distributor for Robelle. Michael was Robelle's technical support contact at Co-Cam Pty. Ltd. when they were Robelle's distributor prior to Facer Utilities. Several years ago Michael also visited Robelle's Canadian office and developed lasting friendships with the Vancouver office staff. We all look forward to working with Michael again.

MRFM works closely with Wang Global, a preferred Hewlett-Packard Channel Partner. As a facilities management company specializing in Hewlett-Packard, MRFM is well-positioned to provide customers with excellent local customer support.

[Marie Reimer]



Up to Table of Contents


Suprtool logo Suprtool Training Schedule

Robelle offers two-day classes on Suprtool. Get course details on the Web at

http://www.robelle.com/products/courses.html.

Call Mike Shumko at 1-888-ROBELLE for pricing and scheduling.


Next Suprtool Training

We're trying something new for the next scheduled Suprtool training class on March 18-19, 1999.

Instead of holding the class at Robelle in Surrey, B.C., Canada, we're using the training facilities at Lund Performance Solutions in Albany, Oregon. The facility is better than Robelle's, and U.S. users will find the location easier to get to, with no need to cross the border.

Even though the location has changed, you still get the same Robelle trainers, Hans Hendriks and Mike Shumko.

The cost of the two-day class is US$800 per person, which includes the workbook and user manual.

To register, call Mike Shumko at Robelle, 1-888-ROBELLE.

[Mike Shumko, Robelle Solutions Technology Inc.]

Lund Consulting Services

Providing Best in Class Performance Monitoring and Capacity Planning tools and service for the HP 3000 and HP 9000.



Up to Table of Contents


A Swedish Escape

Got a minute? Then why not take a little trip to Sweden courtesy of Robelle- on the Web, of course! Recently, Ole Nord, who represents Robelle in the Scandinavian countries, updated his Web site at http://www.olenordab.se/.

Even if you are like me and cannot speak or read Swedish, you will almost understand the Swedish text. There are enough familiar technical English words for you to guess the surrounding words. For example, if you click on "Nya Qedit installationer" (New Qedit installations) you will see the latest Qedit customers in Scandinavia. Ole Nord AB represents many well-known third- party vendors, and I'm sure that you will recognize many of the names.

So have a good trip--and don't forget to send a postcard!

[David Greer]

For a complete list of Robelle's distributors worldwide, visit http://www.robelle.com/distributors.html



Up to Table of Contents


Want an E-Copy of Our Newlsetter?

You can subscribe to the paperless What's Up, DOCumentation? by sending your request to support@robelle.com with your name and e-mail address. You can also read the on-line version at

http://www.robelle.com/newsletter/

If you've missed previous issues, they are also available at this site for your reference.



Up to Table of Contents


Staff Spotlight: Pat Lathwell

pat Pat Lathwell is a behind-the-scenes person who has quietly kept Robelle's shipping department running smoothly for 10 years, handling the distribution of everything from CD-ROMs to newsletters. Her flair for statistics keeps her on top of the latest tally for product shipments, including their running totals.

Born and raised in Vancouver, Pat loves traveling and taking cruises to less-rainy exotic locations. She was a founding member of the local Beatles fan club, and is the final arbiter of all 60s music trivia questions.

Pat and her husband Roy, an actor, keep busy with their large dog, Rocky, an Alaskan Malamute/Collie cross.

[Paul Gobes]



Up to Table of Contents


A Web Gallery of Robellians

We have recently updated our on-line company brochure. Visitors will now see updated photos and write-ups of all the staff along with some photos of their favorite leisure activities.

You can check out all the latest Robelle staff news at

http://www.robelle.com/robelle.html



Up to Table of Contents


Windows Scripting Host Part II

In our last newsletter we discussed Microsoft's new Windows Scripting Host (WSH), a scripting language for Microsoft Windows. We showed you how to create a script using the JScript language, how to create the WScript object, and how to process command-line parameters and pass them as scripts.

In this issue, we'll show you how to:

The whole example (Xlscript.js) is shown below.

/*  Sample script to create an Excel spreadsheet.
    Copyright Robelle Solutions Technology Inc. 1999
*/
//  Version number for this script
var Version = "Version 1.0";
var objXL = WScript.CreateObject("Excel.Application");
objXL.Visible = true;
objXL.WorkBooks.Add;
function ShowHeadings()
{
	objXL.Cells(1, 1).Value = "Argument";
	objXL.Cells(1, 2).Value = "Value";
	objXL.Columns(1).ColumnWidth = 15;
	objXL.Columns(2).ColumnWidth = 10;
	objXL.Range("A1:B1").Select;
	objXL.Selection.Font.Bold = true;
	objXL.Range("C1:C1").Select;
}
function ShowOneArgument(row, desc, value)
{
	objXL.Cells(row, 1).Value = desc;
	objXL.Cells(row, 2).Value = value;
}
function ShowArguments()
{
	var commandArgs = WScript.Arguments;
	ShowOneArgument(3, "Count", commandArgs.length);
	for (inx = 0; inx < commandArgs.Count(); inx++)
       ShowOneArgument(5 + inx, inx + 1, commandArgs.Item(inx));
}
ShowHeadings();
ShowArguments();

Microsoft Excel is a rich object with many properties and methods. In Excel, programmers mainly work with the following three objects:

In some cases, Excel can anticipate which object you want to use. For example, if you create a new workbook and add data to it, the data will be added to the first sheet of the workbook.

Creating An Excel Workbook

Before creating an Excel workbook, we must first create an Excel object.
    var objXL = WScript.CreateObject("Excel.Application");
To make the Excel process of creating the workbook visible, we use

    objXL.Visible = true;
Then we create a new workbook.

    objXL.WorkBooks.Add;
To improve the readability of the rest of the code, we add functions that perform the main tasks in our scripts. These functions are declared and then invoked at the bottom of the script.

Creating Column Headings

Next, we create two column headings with the ShowHeadings() function. The Cells function uses a row number and column number as parameters. We do not qualify the cell references with workbook or worksheet references, because we want to change the cells in Sheet1 of the only open workbook.

    objXL.Cells(1, 1).Value = "Argument";
    objXL.Cells(1, 2).Value = "Value";
To adjust the column width, we ask Excel to specify a column width for each column. These numbers were found by trial and error:
    objXL.Columns(1).ColumnWidth = 15;
    objXL.Columns(2).ColumnWidth = 10;
Then we select the two columns and adjust their properties to make the text appear bold.

    objXL.Range("A1:B1").Select;
    objXL.Selection.Font.Bold = true;
Rather than leave the column titles highlighted, we move the selection to the empty column to the right.

    objXL.Range("C1:C1").Select;

Assigning Data Values

To assign data values, we create one row for the argument count and then one row per argument. For each argument, we enter the argument description (i.e., argument number) in column A and the corresponding value in column B. To make the script more readable, we encapsulate this step in the ShowOneArgument() function.

In the ShowOneArgument() function, we first assign the description to the first column in the Excel worksheet (it appears as column A in Excel, but we refer to it as column 1 in JScript). Then we assign the value (which is column B in Excel, but column 2 in JScript).

    objXL.Cells(row, 1).Value = desc;
    objXL.Cells(row, 2).Value = value;

Displaying Command Line Arguments

To complete this example, we must perform the ShowArguments() function. It runs through each command-line argument and adds it to the spreadsheet. To display the command-line arguments, we must first access them with

    var commandArgs = WScript.Arguments;
Next we show the number of command-line arguments in row 3.

    ShowOneArgument(3, "Count", commandArgs.length);
We finish the function by creating cells with each of the command-line values starting with row 5 (we leave row 4 blank).

    for (inx = 0; inx < commandArgs.Count(); inx++)
        ShowOneArgument(5 + inx,inx + 1,commandArgs.Item(inx));

Final Scripting Steps

To finish the script, we must invoke two helper functions:

    ShowHeadings();
    ShowArguments();
By following these steps, we can use JScript to create an Excel workbook and add values to the cells of the first sheet in the workbook.

Output of Example

Assume that we have saved this script in a file called Xlscript.js. When we invoke it (user input is underlined)

    cscript xlscript.js 25 30 35 40 45
    Microsoft(R)Windows Scripting Host Version 5.0 for Windows
    Copyright(C)Microsoft Corporation 1996-1997. All rights.
we would end up with the following spreadsheet:
    Argument  Value   <=== Column headers in Row 1

      5               <=== Argument count in Row 3

      1       20      <=== Argument numbers and values starting
      2       30          in row 5.
      3       35
      4       40
      5       45
In our next issue we'll show you how to use JScript to load a comma-delimited file into Excel.

[David Greer]



Up to Table of Contents


Qedit logo Final Sale of Qedit 4.6 Manuals

Now that everyone has received Qedit 4.7, the Qedit 4.6 manuals are on sale at a very attractive price.

These manuals include the same subjects as the latest manual, except for the enhancements introduced in the most recent version. For information about the new enhancements, you can print a copy of the appropriate change notice simply by running Printdoc.Pub.Robelle.

If you need a large number of manuals, this may be a cost-effective way of getting them. The Qedit 4.7 manuals are US$20 each and the Qedit 4.6 manuals are 50% off.

Call Jennifer Franklin or Eunice Sheehan for details at 1-888-ROBELLE.



Up to Table of Contents


Simplifying Y2K in IMAGE and COBOL--A Sweet Method

Thank you to Lou Gottlieb for submitting the following article. We enjoy hearing from our customers and welcome your input to our newsletter.

Wouldn't you like to make your IMAGE datasets along with the COBOL programs that use them Y2K-compliant? The method described in this article can do just that, without making you change the datasets and the programs at the same time. You can first change only the datasets. And when it's convenient for you to work on the programs, you can modify the ones that will have trouble processing the new data.

With this Y2K method, users don't see changes in their screens or reports, most programs don't need revisions (not even recompilation), and most changes can be done easily. If it sounds sweet, it is! There is only one catch, which most people wouldn't consider a catch at all: you'll need extra disc space. (Is that all?!!)

Here's the secret: for every 6-digit date in the dataset, you need to add an equivalent 8-digit date at the end of the record, even if the 6-digit date is a search item. Here are some ways to use the new 8-digit dates in COBOL programs:

By adding an 8-digit equivalent of 6-digit dates to the end of each record, this method also lets you take advantage of the "sort by 8 and print from 6" technique. For example, when your program makes a flat file, sorts or sub- sorts it by date and prints a report from it, you can use this technique. If, however, the flat file is not redefined by field for sorting purposes and you sort the entire record, you may have to do a little rearranging so that the 8-digit date replaces the 6-digit date. If the 6-digit date is added to the end of the record, the record length will need to be increased.

This whole Y2K method can be divided into two main parts:

  1. Change the datasets and populate them:

    a) Add an 8-digit equivalent of all 6-digit dates.

    b) Change, test and install all programs that Put or Update records in these datasets with the new 8-digit dates so that the data in each 8-digit date is updated just before the Put or Update commands.

    c) Write a quick and dirty (or quick and clean) program to populate these new 8-digit fields in every dataset, then run it. You can run it anytime after the programs in step b) have been installed.

  2. Change the programs that sort, compare or calculate dates in the order of their importance. Test these programs and install them as you go.
What you don't have to do is impressive: you don't need to change your application screens; you don't need to change the format of record-selection dates; you don't need to change report formats. And internally, you don't need to change screen buffers or the names of date fields that get moved to print lines.

The following steps describe this two-part process in more detail:

  1. Look in the database schema and any data dictionary schema you use for 6- digit dates, 4-digit year/month dates, and 2-digit year dates.

  2. Use a database utility, if you have one, to search for bad dates and repair them. Adager has the Examine Date command.

  3. As a safeguard, copy the database before the next step. At our shop, we use MPEX's %Copy;Fast utility.

  4. a) Using a database utility, add the new 8-digit dates as fields to all datasets with 6-digit dates. Don't omit any 8-digit dates because you think they will never be needed-remember Murphy's Law. (With Adager, you can perform the Add Item command, take the name of the 6-digit field, and add -8 at the end of it. Then use Add Field to add the fields to the end of the dataset.) Do this step to the test and production databases.

    NOTE: If the dataset is large and/or the number of dates added is high, check how much free disc space you have.

    For KSAM files, this becomes awkward. You need to create a new, longer record file, copy the data, and complete step 4a). Then recompile, test and install every program that reads or writes the KSAM file before you begin the next step.

    b) When all datasets have been changed in both the production and test databases, change the schema accordingly. In the data dictionary schemas, add the new 8-digit dates and recompile the dictionaries.

  5. Go through the datasets with 6-digit dates one at a time. Find all source code (programs, Copylibs, Include and Use files) that contains Put, Update or Update Critical commands against each dataset. We have a subroutine called Century that reads 6-digit dates and adds either a 19 (1960-1999) or 20 (2000-2059) to them. We change the source code so that just before each Put or Update command, each 6-digit date has a call to Century that passes the date and returns it in an 8-digit format.

    Also find any JCL with Suprtool code that adds or updates dataset records in each dataset. Search for Move commands of the dataset's entire record area; if these commands are linked to other programs, multiple programs might have to be changed simultaneously ("same-old-time-eously") because the record length has changed.

  6. Test these programs and install them.
  7. For each dataset, write a program that reads all records, calls the Century subroutine, and updates each 6-digit date. Test this program and run it in production. Steps 5-7 ensure that each record has new fields populated with correct 8-digit dates. Repeat steps 5-7 until all datasets are converted.
  8. Change the programs which sort, compare or calculate dates in the order of their importance. Test and install them as you go.

    Change all programs, including those just modified in step 5 so that when there is a) a sort by date, b) a comparison of two dates (> or <) such as record selection by date, or c) date calculations (e.g., if screen-date < two-weeks-ago), the new 8-digit dates are used. This will require creating some new 8-digit date variables, such as a Date-1-8 and Date-2-8 corresponding to Date-1 and Date-2 used for record selection. For example,

        Accept Date-1. Call "CENTURY" Using Date-1, Date-1-8
    Do not change any other date references. Continue to use the same 6-digit dates in screen buffers, report fields and selection dates. If there are internal comparisons of accepted dates, a 6-digit date can be accepted but the Century subroutine converts it to an 8-digit format. This avoids having to change the message that requests a date.

    We use a subroutine called Today, which reformats Current-Date into a yymmdd format. If we do internal comparisons of today's date, we

        Call "Today" Using Today 
    then
        Call "CENTURY" Using Today, Today-8

    Do not compare a 6-digit Today to another 6-digit date, because a later date such as 2/3/2001 can be interpreted as coming before an earlier date such as 2/3/1998 (010203 < 980203). Although this type of comparison does not produce obvious errors, it is not 2000-proof.

  9. Find Suprtool code that sorts, compares or selects by date and change it. It may be embedded in JCL or in a Use file.
We found this method of using extra 8-digit dates in the 98#2 issue of Robelle's newsletter. The more we learned about it, the better we liked it.

[Lou Gottlieb, HP 3000 Systems Manager, Evergreen Aviation]



Up to Table of Contents


Suprtool logo Suprtool Tips

Simple Password Generator

Here is a real word password generator that selects words from Robelle's spelling dictionary to use as passwords. Say you want to generate 6-letter passwords. Suprtool's string pattern match can give you a list of 6-letter words sorted in alphabetical order.

Although Suprtool does not have a function that randomly selects from a list of words, it can select words based on these not-so-obvious algorithms:

The 3-step example below generates 50 passwords that are 6 characters long. To generate n-character long passwords, it uses n number of question marks (?) in the If command (step 1). To vary words, the example changes the first number in the Def Int commands (step 2), changes the i<j to i>j or removes this check (step 2), or changes the number in the Input command (step 3). To generate a different number of passwords, the example changes the value of the Numrecs command (step 3).

  1. Select all 6-character words from the dictionary.
        input  maincomm.spdata.robelle
        def    word,1,24
        if     word=="??????~"
               {pattern match on 6 characters followed by a space}
        out    word6
        xeq
  2. Randomize the list by converting one of the letters to an integer and sorting on it. This task also reduces the number of words in the list by comparing the integer representation of two letters.
        def i,6,2,int
               {1st num can range from 1..n-1}
        def j,5,2,int
               {1st num can range from 1..n-1}
        def k,3,2,int
               {1st num can be 1..n-1, but 2..n-2 is better}
        in     word6
        if     i>j {i<j or i>j}
        sort   k
        ext    word
        purge  word6a
        out    word6a
        xeq
  3. Make a selection from the file--in this case every 43rd record to a maximum of 50 records.
        in      word6a(#43)
        numrecs 50
        purge   passwd
        out     passwd
        xeq
Because these passwords come from a list of real words, you should review the final list to eliminate easy-to-guess words. In the next issue, we'll show you how to generate passwords that are less easily guessed.

[Dave Lo]



Getting the Top Ten Records

If you have a dataset/file that stores "scores" (e.g., movie ratings), and you want to pick the top ten scores, the obvious solution doesn't work:

    >get       d-movies
    >sort      rating,desc
    >sort      movie-title
    >extract   rating, movie-title
    >numrecs   10
    >list      standard
    >xeq

    RATING MOVIE-TITLE

    8  The Rock
    8  The Truth About Cats & Dogs
    7  Courage Under Fire
    7  G.I. Jane
    7  Leaving Las Vegas
    7  Return of the Jedi
    6  Dragonheart
    6  The American President
    2  Batman & Robin
    2  From Dusk Till Dawn
    IN=11,OUT=10.CPU-Sec=1.Wall-Sec=1.
This isn't a list of highly-rated movies because of a misunderstanding of what the Numrecs command does.

The IN=11 count at the end shows that the entire 500+ record dataset was not read. Numrecs limits the input operation to the number of records specified. Therefore, Suprtool reads the first ten records it finds and sorts those ten records according to whatever rating they might have.

The proper approach to this problem is to use two passes:

    >get       d-movies
    >sort      rating,desc
    >sort      movie-title
    >extract   rating, movie-title
    >output    foo,link,temp
    >xeq
    IN=519,OUT=519.CPU-Sec=1.Wall-Sec=1.

    >input     foo
    >numrecs   10
    >list      standard
    >xeq

    RATING MOVIE-TITLE

    10 Casablanca
    10 The Usual Suspects
    9  Citizen Kane
    9  One Flew Over the Cuckoo's Nest
    9  Saving Private Ryan
    9  Schindler's List
    9  Star Wars
    9  The Godfather
    9  The Shawshank Redemption
    8  Raiders of the Lost Ark
    Warning:  NUMRECS exceeded; some records not processed.
    IN=11,OUT=10.CPU-Sec=1.Wall-Sec=1.
This method allows Suprtool to see all the records, sort them by score, and then re-read the sorted list selecting the first ten from the sorted list.

[Mike Shumko]

Note: Please don't flame us about the actual movie ratings shown above. It's just test data!



Up to Table of Contents


Qedit logo Qedit for Windows Tip--For Your Fingers

One of the many features of Qedit for Windows that I find really useful is the right mouse button drop-down menu.

When programming in COBOL, I can just place my mouse pointer over a variable (it recognizes that a variable can have a hyphenated name), and click the right mouse button for a menu of options. From this menu I can choose from Find Next, Find Previous, Cut, Copy, or Paste operations. I can even open a file if I have a file name selected. This feature makes for fast navigating around a program file now that I'm in the habit of using it.

There are also many keyboard combination shortcuts for common editing features. If you highlight an item, you can use these combinations: to Copy, use CTRL+C; to Paste, use CTRL+V; to Cut, use CTRL+X. You can also see the shortcut keys listed beside their functions by clicking any of the menu items on the menu bar.

For more Qedit for Windows shortcuts and key combinations, there is an excellent reference section in the on-line help.

[Robyn Rennie]



Up to Table of Contents