Computer Corporation of America
|
Feedback
Search CCA:
   
USA CCA
CCA Products
CCA Customer Support
CCA Resources
CCA - Company
CCAPRINT: A Newsletter for Model 204® and System 1032® Users
September, 10, 2002

It's Not Too Late! Register Today for Insight 204!

You are already at your computer. Just open your browser and go to:

http://www.cca-int.com/usergroups/insight/forms/register.html

Insight 204 is not just the best Model 204 information exchange of the year, it is also a chance to have some fun in a world-class city. After you register, have a look at the dining and entertainment section.


Insight 204
Insight 204 - Powered by JDBC for Model 204!

By Marie Kelly

At this year's Insight 204 Symposium, attendees will not only be hearing about the new features in Model 204, but they will be using one of the most significant enhancements -- JDBC for Model 204 -- for completing the registration process and for ordering products, documentation, and collateral. This new utility dramatically expands the connectivity options available to Model 204 by providing a native Java interface.

At Insight 204, when attendees first check in, each will be given a name tag with a barcode. The symposium administrator will scan the attendee's badge, causing the attendee's registration record to appear on a Windows-based screen. All information for the week can be verified immediately to ensure the attendee is registered for the correct workshops and social events.

During the week, the attendee can visit a special Linux-based kiosk running an information ordering system. After scanning his or her own badge with the connected barcode reader, the attendee's identification information appears on the screen, and the attendee can quickly proceed to request the desired Model 204-related items, such as documentation, demonstration CDs, or product information.

Several similar applications will be demonstrated at Insight 204, which show a variety of client platforms accessing Model 204 data - all made possible by JDBC for Model 204.

About JDBC for Model 204

Prior to V5R1, Model 204 connectivity meant connecting Windows environments to Model 204 data and applications. With the introduction of JDBC for Model 204, you can connect Model 204 to just about any Java-enabled client platform. This extends the world of Model 204 connectivity to include UnixTM and LinuxTM platforms, PalmTM and cellular devices, and many others.

"Today's IT environments are highly heterogeneous when it comes to operating environments," remarks CCA's Director of Connectivity, Steve Nelson. "Java has become widely accepted as the programming language of choice for many companies. So we knew that it was important to CCA customers that we provide a native Java interface to Model 204."

JDBC for Model 204 allows any Java-based IDE or application - including Web servers, Web applications, GUI applications and Java development tools to access Model 204 data using Java and the JDBC API. The client environment uses the Java XML Pack, which in turn uses JDBC for Model 204, to communicate directly with Model 204 data using either User Language or SQL. The result is a robust client/server application that is fast, object-oriented, and platform-independent.


Make Your Plans in Advance

To learn more about JDBC for Model 204, be sure to be at this year's Insight 204 Symposium, being held in Boston on September 17­20. For detailed session information and to register, visit the Insight 204 Web site at:

http://www.cca-int.com/resources/usergroups/insight/main.html

Insight 204 has classes and lectures for everyone all day long. Do not miss the presentation you need the most. While visiting the Insight 204 Web pages, look over the General, Breakout, Training, M204 Refresher Class, and the CCA Drop-in Center and make plans now.


System 1032
Interactive and Batch Command File Behavior

By Tym Stegner

A long-time customer wanted to clarify the apparent difference in behavior of an erroneous System 1032 command file when it was run interactively compared to when the job was submitted in batch. The erroneous System 1032 command file had a spelling error in a dataset name, which caused an OPEN command error. The clarification was requested because System 1032 batch processing terminated on the error; however, interactive processing continued to process the remaining lines of code.

This article describes the difference between System 1032 batch and interactive mode processing and discusses how this behavior can affect a DCL program.

Command File Behaviors

Well-understood is that the behavior of a DCL command file when run interactively by issuing an @filename.COM command is the same as when the same DCL command file in run in batch mode by issuing a SUBMIT filename.COM command. Within a DCL command file, you can invoke System 1032, then issue either an @DMC command or a USE DMC command, as well as supplying PL1032 commands directly within the DCL command file. Less well-understood is that the behavior of System 1032 in batch or interactive mode can disrupt the expected behavior of the DCL command file.

Executing System 1032 in Interactive Mode

PL1032 commands embedded in a DCL command file are executed as if you were typing them in one at a time: that is, sequentially. No look-ahead of the commands can be performed. Any error aborts the current command, generally without affecting subsequent commands; it is as if you had not yet entered those commands.

Examining Mode Processing Behavior

Let's create a test file: TEST.COM. This DCL command file executes a very simple System 1032 report, followed by a DCL DICTIONARY command to check on the size of the generated report. To highlight and illustrate the difference between System 1032 interactive and batch mode processing, the FILMS dataset name is misspelled FLIMS in the OPEN command.

Figure 1. TEST.COM

$ TYPE TEST.COM
$ SET VERIFY
$ S1032
OPEN DATASET FLIMS IN S1032_DEMO READONLY
FIND ALL
PRINT ON FILMS.RPT ALL
EXIT
$!
$ DIRECTORY/SIZE FILMS.RPT
$ EXIT

Testing Interactive Execution Behavior

When you issue an @TEST.COM command, System 1032 recognizes that it is in interactive mode. Each line of PL1032 code is executed before proceeding to the next line of code, regardless of command line errors. Figure 2 shows that the System 1032 errors are generated, however, TEST.COM continues processing.

Figure 2. Executing TEST.COM interactively

$ @TEST.COM
$ S1032
Computer Corporation of America System 1032 Version V9.80-0
Copyright 2000, Computer Corporation of America
OPEN DATASET FLIMS IN S1032_DEMO READONLY
%S1032-E-OPNFAIL, OPEN failed for FLIMS Dataset in
SDSK:[S1032.V980.DEMO]FLIMS.DMS;
-RMS-E-FNF, file not found
FIND ALL
%S1032-E-NOCURSET, no current dataset
PRINT ON FILMS.RPT ALL
%S1032-E-NOCURSET, no current dataset
EXIT
$!
$ DIRECTORY/SIZE FILMS.RPT
Directory UDSK:[USER1]
FILMS.RPT;1 0
Total of 1 file, 0 blocks.
$ EXIT
$

Testing Batch Execution Behavior

In Figure 3, TEST.COM is executed in batch mode via the SUBMIT command. System 1032 again recognizes the processing mode: this time batch. Upon getting an error, System 1032 stops processing and signals DCL with a termination error, which disrupts DCL processing. It might appear as though DCL, when run in batch mode has different behavior than when run in interactive mode. But System 1032 is the cause of the stopped DCL processing, not the processing mode of DCL.

Figure 3. Executing TEST.COM via batch

$ SUBMIT/NOPRINT/LOG TEST.COM
Job TEST (queue ASP_BATCH, entry 65) started on ASP_BATCH
$
Job TEST (queue ASP_BATCH, entry 65) terminated with error status
$ TYPE TEST.LOG
$ S1032
Computer Corporation of America System 1032 Version V9.80-0
Copyright 2000, Computer Corporation of America
OPEN DATASET FLIMS IN S1032_DEMO READONLY
%S1032-E-OPNFAIL, OPEN failed for FLIMS Dataset in
SDSK:[S1032.V980.DEMO]FLIMS.DMS;
-RMS-E-FNF, file not found
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored
USER1 job terminated at 9-SEP-2002 09:39:06.24
$


The OPEN command fails, as expected. Subsequent PL1032 commands are not executed and the DIRECTORY command was not executed.

Understanding System 1032 in Batch Mode

Batch jobs are almost by definition expected to be unattended, so System 1032 aborts its command processing immediately when errors are generated, so that problems are not compounded.

The termination of the DIRECTORY command shown in Figure 3 represents standard DCL error handling: upon receiving an error status, stop processing that program. System 1032 signaled its termination status to DCL, so DCL thinks it has an error, and thus aborts its own processing.

In the interactive example, Figure 2, even though there are command line errors in the PL1032 code, the overall System 1032 session completes successfully, so DCL does not receive a termination error.

Adding an Error Handler

To better manage how DCL behaves when System 1032 stops processing in batch execution, lets add a DCL error handler. The DCL error handler is the ON condition THEN statement code block, where a signaled condition causes the DCL statement in the THEN clause to execute. (See OpenVMS HELP or the OpenVMS DCL Dictionary and Guide to Command Procedures manuals for more information.)

We added an ON ERROR THEN GOTO label mechanism that directs DCL to branch to a specified code block if an error condition is detected, and renamed the file TEST2.COM.

Figure 4. TEST2.COM

$ TYPE TEST2.COM
$ SET VERIFY
$ ON ERROR THEN GOTO OOPS
$ S1032
OPEN DATASET FLIMS IN S1032_DEMO READONLY
FIND ALL
PRINT ON FILMS.RPT ALL
EXIT
$!
$ DIRECTORY/SIZE FILMS.RPT
$ EXIT
$!
$OOPS:
$ WRITE SYS$OUTPUT "S1032 Error occurred"
$ EXIT
$

Compare the results displayed in Figure 2 with those in Figure 5. Although System 1032 reported System 1032 errors, they did not stop System 1032 processing. There was no signal to DCL that System 1032 stopped processing.

Figure 5. Interactive execution of TEST2.COM

$ @TEST2
$ SET VERIFY
$ ON ERROR THEN GOTO OOPS
$ S1032
Computer Corporation of America System 1032 Version V9.80-0
Copyright 2000, Computer Corporation of America
OPEN DATASET FLIMS IN S1032_DEMO READONLY
%S1032-E-OPNFAIL, OPEN failed for FLIMS Dataset in
SDSK:[S1032.V980.DEMO]FLIMS.DMS;
-RMS-E-FNF, file not found
FIND ALL
%S1032-E-NOCURSET, no current dataset
PRINT ON FILMS.RPT ALL
%S1032-E-NOCURSET, no current dataset
EXIT
$!
$ DIRECTORY/SIZE FILMS.RPT
Directory UDSK:[USER1]
FILMS.RPT;3 0
FILMS.RPT;2 0
Total of 2 files, 0 blocks.
$ EXIT
$

In Figure 5, because no error condition is reported to DCL, the error branch is not taken. However, when TEST2 is executed in batch mode, the new, changed behavior is evident.

Figure 6. TEST2.COM in batch mode

$ SUBMIT/NOPRINT/LOG TEST2.COM
Job TEST2 (queue ASP_BATCH, entry 68) started on ASP_BATCH
$
Job TEST2 (queue ASP_BATCH, entry 68) terminated with error status
$ TYPE TEST2.LOG
$ ON ERROR THEN GOTO OOPS
$ S1032
Computer Corporation of America System 1032 Version V9.80-0
Copyright 2000, Computer Corporation of America
OPEN DATASET FLIMS IN S1032_DEMO READONLY
%S1032-E-OPNFAIL, OPEN failed for FLIMS Dataset in
SDSK:[S1032.V980.DEMO]FLIMS.DMS;
-RMS-E-FNF, file not found
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored
$OOPS:
$ WRITE SYS$OUTPUT "S1032 Error Occurred"
S1032 Error Occurred
$ EXIT
USER1 job terminated at 9-SEP-2002 10:07:37.07

As the DCL command file has an error handler, ON ERROR THEN statement, enabled, DCL detects the error condition that System 1032 signaled, and takes the ON ERROR branch within the DCL command file.

Summary

Understanding how our System 1032 command files work interactively and in batch allows us to better respond to unexpected, though not unplanned for, events.

Coming Attractions

Now that we understand the difference between System 1032 interactive and batch mode, we might think about making interactive behave more like batch mode. In fact, though there is no easy method of making interactive System 1032 operate the same as batch System 1032, next month we will explore:

 

Copyright © 2008 Computer Corporation of America.
All right reserved. Published in the United States of America.


Contact CCA Webmaster
Copyright 2008