From:
To: Users of Robelle Software
Re: News of the HP 3000 and of HP-UX, 1999 #1
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:
Set Language Data Set Length 5000 {any value greater than 1,000} New {create an empty scratch file}
Qedit then assigns a random workfile name (QED#####). If you want to load data into the file created above, you need to use the Add command.
New mywork
Another method is to use a keyword on the New command.
New mywork,WIDE
Note that this last method creates a workfile with the proper physical characteristics but it does not set the Language and Length, which can be adjusted manually with Set commands.
Data is also a valid language for Jumbo workfiles-the only difference between a Jumbo and a Wide-Jumbo file is the Length value range. Jumbo workfiles allow lines of up to 1,000 characters whereas Wide-Jumbo workfiles allow up to 8,172 characters per line.
Text mywork,WIDE=foobar
Qedit creates a Wide-Jumbo workfile and reads all the records of the input file (Foobar). It also adjusts the Language and Length based on the text file characteristics.
The format keyword lets you read a small file into a newly created workfile with wider characteristics. Qedit, however, does not allow you to automatically read wider files into smaller formats. For example, let's assume that Widefile has 5,000-byte records. If you specify
Text mywork,DATA=widefile
Qedit ignores the Data keyword and creates a Wide-Jumbo workfile. To force Qedit to read a wider workfile into a smaller format, you have to first create the workfile and then read the records with the Add command.
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]
http://www.robelle.com/products/courses.html.
Call Mike Shumko at 1-888-ROBELLE for pricing and scheduling.
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.]
Providing Best in Class Performance Monitoring and Capacity Planning
tools and service for the HP 3000 and HP 9000.
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
http://www.robelle.com/newsletter/
If you've missed previous issues, they are also available at this site for your reference.
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]
You can check out all the latest Robelle staff news at
http://www.robelle.com/robelle.html
In this issue, we'll show you how to:
/* 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:
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.
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;
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;
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));
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.
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 45In our next issue we'll show you how to use JScript to load a comma-delimited file into Excel.
[David Greer]
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.
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:
This whole Y2K method can be divided into two main parts:
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.
The following steps describe this two-part process in more detail:
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.
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.
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-8Do 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 Todaythen
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.
[Lou Gottlieb, HP 3000 Systems Manager, Evergreen Aviation]
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:
input maincomm.spdata.robelle def word,1,24 if word=="??????~" {pattern match on 6 characters followed by a space} out word6 xeq
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
in word6a(#43) numrecs 50 purge passwd out passwd xeq
[Dave Lo]
>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!
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]