System 1032
Lesser Known Features, Part 1
By Tym Stegner
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
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
Figure 2. Second dataset
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
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
$ID
Rent
Utilities
1
1,200.00
253.75
2
1,700.00
198.47
Figure 5. Dataset FEBRUARY
202.83
213.44
Figure 6. Dataset MARCH
195.22
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
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.
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 *
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.
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,
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.
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.
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
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.
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
Figure 2. Examples of syntax to suppress messages
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.
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:
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.
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.
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.
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:
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:
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
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:
The format of each message entry is:
Where
UUUU is the user number.
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