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
April, 10, 2003

System 1032

Lesser Known Features, Part 1

By Tym StegnerTym

System 1032 has been commercially available since 1 June 1983. Since that time, a rich feature set has been created for the System 1032 environment. So rich, in fact, that some commands and options can be overlooked. This series of articles touches on a few of these overlooked commands and options.

Not everyone can make immediate use of the lesser known commands, but it does not hurt to be aware of capabilities, as you never know when you might be able to use something you read about here.

Over the next few months, we will look at features that fall into nine general areas.


Data Access

Operations

Reliability

Help

Performance

Reporting

Input/Output

Programming

Security

Expanding Data Access

As System 1032 was busy increasing its features and enhancements, customer sites were increasing their data. The accumulating data itself inspired new ideas of ways to look at it, albeit coupled with the desire to keep the actual data where it was. The following commands encourage you to look at your data in new ways without duplicating it: collections and views.

COLLECT {JOIN|UNION}
DATASET VIEW

Using collections and views in System 1032 you can customize access to one or more datasets. In a sense you can combine datasets to appear to be a single dataset to a user or program. The PL1032 COLLECT command logically links one or more datasets together.

Extending Your Records

The COLLECT JOIN command is used to extend records across one or more datasets. You can also think of it as a persistent joined PRINT command.

Figure 1. First dataset

A B C D
     
     
     
     
     

 

Figure 2. Second dataset

X Y Z P D
         
         
         
         
         

The attribute D is the common attribute that makes the join collection possible. The values of the common attribute should be unique, such as Social Security number or Part Number.

Table 3. A join collection

A B C D X Y Z P
               
               
               
               
               

Table 3 illustrates that joined datasets need not be similar in structure, except for their linking attributes. In Table 3 the linking attribute is D. Join collections are made only to a virtual or view dataset.

You can use a DATASET VIEW command to define a view dataset, which is similar to a standard dataset, but contains no records. The view dataset defines which attributes are to be selected from the existing datasets named in the COLLECT command.

Extending Your Dataset

The COLLECT UNION command is used to extend datasets by logically appending one or more datasets together. An example of a union collection would be to create end-of-year financial reports. If each month is a separate dataset you structured identically, at yearís end you can collect them for end-of-year reports and analysis, as shown in Figures 4 through 7.

Figure 4. Dataset JANUARY

JANUARY

$ID

Rent

Utilities

1

1,200.00

253.75

2

1,700.00

198.47

Figure 5. Dataset FEBRUARY

FEBRUARY

$ID

Rent

Utilities

1

1,200.00

202.83

2

1,700.00

213.44

Figure 6. Dataset MARCH

MARCH

$ID

Rent

Utilities

1

1,200.00

195.22

2

1,850.00

210.97

The FIRST_QUARTER dataset in Figure 7 appends (virtually) the records from the JANUARY, FEBRUARY, and MARCH datasets. Note that $ID is no longer a unique value.

Figure 7. Dataset FIRST_QUARTER

First_Quarter

$ID

Rent

Utilities

1

1,200.00

253.75

2

1,700.00

198.47

1

1,200.00

202.83

2

1,700.00

213.44

1

1,200.00

195.22

2

1,850.00

210.97

In a union collection, only those attributes that match name and data type are available to the collection. You can collect union datasets into an existing dataset or into a view dataset.

Using Collections

As collections are read-only, you cannot use some PL1032 commands against a collection. Several system variables enable a programmer to determine which underlying dataset record contains collected data and to set scope outside the collection to perform updates.

For more information on the use and definition of views and collections, see the section on the COLLECT command in System 1032 Programmers Reference Manual, Module I, and System 1032 Users Guide, Module 2, Chapter 7; "Combining Datasets".

Help Is at Your Fingertips While You Work

A Command at a Time

The System 1032 HELP command is a quick way to display how a command works and how features within PL1032 operate, while you are working. However, at times you might want a paper copy of a help text; for that, issue a DOCUMENT command.

The DOCUMENT command is parallel to the HELP command in syntax, except for its additional support for the ON option, so you can extract help texts to an external file. For example, if after reading the online help for the COLLECT command you decide you want a printed version, you could enter the following command:

1032> DOCUMENT ON COLLECT.TXT

This DOCUMENT command outputs the help entry last read to the file COLLECT.TXT. If you want the entire COLLECT entry, the following command would display the root and first level subtopics:

1032> DOCUMENT ON MYCOLLECT.TXT COLLECT *

All the Commands at Once

To extract all help texts to an external file, use the tool image S1032HELP.EXE. This can extract all help topics into a S1032HELP.HLP file in the current directory.

$ RUN S1032_IMAGE:S1032HELP

The file is in the format of an OpenVMS HELP library source file.

Supplementing Messages

The single line of a System 1032 message might not be enough information to help you decide what to do next. To see the expanded description of a message, often with context-sensitive hints, issue an EXPLAIN command.

The EXPLAIN command without a parameter describes the most recent message. For a description of the last few messages issue an EXPLAIN LAST n command, where n is an integer less than or equal to five.

The EXPLAIN command can also describe messages from batch jobs. Issue an EXPLAIN IDENTIFICATION msg-id command to describe any System 1032 message code. For example:


1032> EXPLAIN IDENTIFICATION SHNOACC
No SHOW security access
The SHOW command could not be executed because you lack the SHOW
security access that is required.
1032>

Note: By default, Fatal errors enable the EXPLAIN text.

For further information on the DOCUMENT and EXPLAIN commands, see System 1032 Programmers Reference, Module I. For additional information on S1032HELP.EXE, see System 1032 Installation and Maintenance Guide.

Data Entry -- the Ins and Outs

Manually Entering Data Efficiently

While the interactive ADD command is less often used these days, here is an option that enhances data entry. In the case of a known record structure, you can enter a delimited list of values to an ADD prompt, rather than responding to individual prompts.

Assuming a dataset definition such as the following:

Dataset MASTER;
  Attribute EMP Text 12 Keyed;
  Attribute LNAM Text 32 Keyed;
  Attribute FNAM Text 20 Keyed;
  Attribute GENDER Text 1;
  Attribute DEPT Integer Keyed;
End_Dataset;

A simple ADD command prompts for each attribute individually. However, an ADD DELIMITER command prompts for the first attribute and awaits your entry of the remaining attributes separated by the delimiter character. Of course, you must enter the values in the correct order. For example,

1032> ADD DELIMITER "|"
EMP: AJ9876543210|IGNATZ|CAT|M|7
1 record added to dataset MASTER

The delimiter character can be any single keyboard character; the default is the comma. Choose a character that is not represented within the data to be entered.

Highlighting Form Fields

System 1032 has integrated character-cell-based forms that you can use for data entry or display purposes. A little-known feature of forms is the ability to specify a video mode that automatically highlights the current field. This feature is set using the AUTO_HIGHLIGHT option of the form header and specifying one or more of the video values: bold, blink, reverse, and underline.

You can quickly generate a form using almost any System 1032 dataset. The dataset must be already opened before it can be referenced by the FORM command. The following example uses the DIRECTORS dataset from the S1032_DEMO area.

1032> OPEN DATASET DIRECTORS IN S1032_DEMO READONLY
Current dataset is now DIRECTORS
1032> FORM DTEST AUTO_HIGHLIGHT REVERSE VALUES UNDERLINE
1032_ FORM statement: FIELD COPY DATASET DIRECTORS
1032_ FORM statement: END_FORM
1032> PUT FORM

The FORM command establishes a form object named DTEST that has automatic reverse video field highlighting and value fields denoted by an underline. The fields in the form are copied from the attributes comprising the DIRECTORY dataset.

The PUT FORM command displays the form on your screen; use the Tab key to advance the cursor from one field to the next.

Note: The video default for a value field in this form is underline and for the current field is reverse video and underline.

In conclusion

This series of articles has begun an overview of less well-known PL1032 commands and options. One or more of these commands may prove useful to solve a current problem.

As with any article, if you want further information about a point or command, please contact System 1032 Customer Support. Additional topic suggestions are always welcome.

Model 204

The Magic of MSGCTL -- New and Old

By James Damon

What is MSGCTL?

MSGCTL, otherwise known as message control, is both a Model 204 command and a parameter that manages the capture and display of Model 204 messages. This article focuses on the MSGCTL command because it has an extremely useful, new feature in Version 5.1 and also because it has a handy, yet little-known, feature designed for easy, Online monitoring of specific messages chosen by the system manager.

Suppressing Selected Messages with the NOAUDIT option

Most Model 204 messages are logged as AD, ER, or MS lines to CCAJRNL and CCAAUDIT, if it was allocated. However, there are many messages that, while useful in some contexts, may not be useful in a large production Online or in Batch204. Additionally, the presence of these messages in CCAAUDIT and CCAJRNL requires extra disk space. In a production Online, the amount of space required may be significant.

The new-in-Version-5.1 NOAUDIT option of the MSGCTL command gives you the flexibility to suppress some messages as you wish. Figure 1 is a partial list of messages that may fit this category and that you may want to suppress in a production Online or in certain Batch204 jobs.

Figure 1. Typical information messages you might want to suppress

M204.0347: PASSWORD
M204.0608: FILE CLOSED: DEORDER
M204.0619: GROUP FILE OPENED
M204.0620: FILE filename OPENED
M204.0621: FILE filename ROLLED BACK TO CHECKPOINT
M204.0622: UPDATE nnnn OF date/time stamp WAS ...
M204.0821: GROUP FILE CLOSED
M204.0858: GROUP groupname OPENED
M204.0862: OPENING FILE: filename
M204.1203: FILE filename WAS LAST UPDATED ON ...
M204.1238: RECOVERY OF FILE filename WAS LAST REQUIRED

Prior to Version 5.1, you could not suppress MS-type messages. In Version 5.1, system managers and system administrators can suppress any numbered message, whether MS, AD, ER or other message type, in CCAJRNL and CCAAUDIT with the NOAUDIT option of the MSGCTL command, as shown in Figure 2.

Figure 2. Examples of syntax to suppress messages

MSGCTL M204.0347 NOAUDIT
MSGCTL M204.0608 NOAUDIT
MSGCTL M204.0619 NOAUDIT

You should consider using the NOAUDIT option if your Online is up for an extended period of time and you are looking for ways to reduce the amount of data in and therefore, the size of CCAAUDIT and CCAJRNL.

Speaking of Suppressing Messages

Although not new in Version 5.1, you can also suppress messages in Batch204 from printing in the CCAPRINT file. To suppress those messages, use the NOTERM option in the MSGCTL command, for example:

MSGCTL M204.0347 NOTERM

Keep in mind that you might not want to suppress compilation and evaluation errors that are needed for debugging. CCA recommends that you review the messages you routinely suppress before you begin a debugging process.

Handling SNAP Messages

As with every rule, there is an exception to suppressing Model 204 messages. You cannot suppress messages that are invoked by a snap. They are sent to the CCAJRNL file regardless of whether you entered a MSGCTL command to the contrary. You can identify snap messages by examining the message code in the Model 204 Messages Manual.

For example, the following message 2585 is also new in Version 5.1.

2585: CLOSE ATTEMPTED FOR SOCKET WITHOUT SESD

A CLOSE_SOCKET request was attempted on a socket connection not recognized by the Horizon session manager. This is a serious internal error.

Response: Contact your system manager.

System manager response: Forward the resulting CCASNAP to CCA Customer Support.

E 0 4 SNAP AUDITER NOTERM OPR

Because the message code includes SNAP, you know you cannot suppress this message. You could issue the following command, but when invoked, message 2585 would be sent to CCAJRNL and the message save table.

MSGCTL 2585 NOAUDIT

Managing the Internal Message Save Table

Suppose you just enabled the Resident Request feature with the RESSIZE and RESLTHR parameters and you want to know which procedures were made resident. Or, suppose you want to quickly see when the last CCAJRNL offload occurred. Or, you want to know how often users are unable to access a file because of SHARED DASD enqueueing. Each of these events generates an error or informational message that is written to CCAJRNL and CCAAUDIT. For example:

M204.1247: PROCEDURE PINV.MAIN IN INVENTORY MADE RESIDENT
M204.1320: OFFLOAD COMPLETE FOR MEMBER JRNL3 OF RING STREAM CCA
M204.0582: ACCESS TO FILE VEHICLES DBA001.CCA.VEHICLES.M204

You can scan the CCAAUDIT file looking for these messages or you can save them in the message save table using the MSGCTL command, for example:

MSGCTL M204.1247 SAVE
MSGCTL M204.1320 SAVE
MSGCTL M204.0582 SAVE

A system manager or system administrator can view the message save table by using the VIEW ERRORS command. In Figure 3, several messages were marked SAVE with the MSGCTL command and are available for Online viewing.

Figure 3. Display of the message save table

03.09  APR 01   15.49.17        PAGE 11 
VIEW ERRLEN,ERRSAVE,ERRORS
ERRLEN   63      LENGTH OF ERRORS SAVED 
ERRSAVE  500     NO OF ERRORS SAVED  
          
18.11.11  8 18: M204.1247: PROCEDURE PINV.MAINMEN IN INVENTORY MADE RESIDENT
15.38.05  9 17: M204.0582: ACCESS TO FILE VEHICLES DBA001.CCA.VEHICLES.M204
15.33.22  8 18: M204.2375: SYSTEM MANAGER HAS STOPPED YOU; ANSWERING "YES" TO T 
15.32.44  8 39: M204.1320: OFFLOAD COMPLETE FOR MEMBER JRNL3 OF RING STREAM CCA
15.32.41  8 39: M204.1846: MEMBER OFFL100 OF CONCATENATED STREAM JRNLOFF NOW AC
15.32.41  8 18: M204.1846: MEMBER JRNL4 OF RING STREAM CCAJRNL NOW ACTIVE
15.32.37  8 39: M204.1320: OFFLOAD COMPLETE FOR MEMBER JRNL2 OF RING STREAM CCA 
15.32.34  8 39: M204.1846: MEMBER OFFL66 OF CONCATENATED STREAM JRNLOFF NOW ACT 
15.32.34  8 18: M204.1846: MEMBER JRNL3 OF RING STREAM CCAJRNL NOW ACTIVE 
15.32.30  8 39: M204.1320: OFFLOAD COMPLETE FOR MEMBER JRNL1 OF RING STREAM CCA 
15.32.25  8 39: M204.1846: MEMBER OFFL33 OF CONCATENATED STREAM JRNLOFF NOW ACT          
15.32.25  8 18: M204.1846: MEMBER JRNL2 OF RING STREAM CCAJRNL NOW ACTIVE

Understanding the Message Save Table

Set the parameters ERRSAVE and ERRLEN in CCAIN to determine the number of messages saved in the message save table and the length of each message stored in the table, respectively. In Figure 3, the 500 most recent messages marked as SAVE are saved in the wraparound table in reverse chronological order.

The table organization is LIFO -- Last In, First Out. Each new message is added to the top of the list as the older messages are pushed down and eventually off the bottom. The storage required for the message save table, which is allocated in bytes above-the-line, is approximately:

(ERRSAVE * (ERRLEN+16)) + 32

The format of each message entry is:

HH:MM:SS UUUU SSSS: M204.NNNN: text

Where

HH:MM:SS is the time in hours, minutes, seconds when the message was issued.

UUUU is the user number.

SSSS is the server number of the user who caused the message to be issued.

In Conclusion

The MSGCTL command has many useful options, which affect the action taken when a particular message is issued to any user. See the Model 204 Command Reference Manual for further details.

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


Contact CCA Webmaster
Copyright 2008