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
January 10, 2005
     
Register NOW for Insight 204!
System 1032: Back to Basics, Part 5—Introducing Attribute Formats Printer-friendly version
Model 204: Archiving CCAJRNL Using Parallel Streams Printer-friendly version

Insight 204

Register NOW for Insight 204!
By Marie Kelly
Director of Marketing

Registration is now OPEN for Insight 204!

CCA is now accepting registrations for the next Insight 204 Symposium, which takes place June 5-8, 2005 in Boston at the Hyatt Harborside Hotel. With a major new version of Model 204 being released in the spring, this is an event you definitely do not want to miss. Visit the Insight 204 Web site at
http://www.cca-int.com/resources/usergroups/insight/main_2005.html and reserve your spot today!

As always, registration for CCA's Insight 204 Symposium is FREE! The Web site contains preliminary information, which will be updated as more details are confirmed. So, bookmark the Web site today and spread the word to all Model 204 users at your site.

If you have any questions that need to be answered immediately, please complete the Feedback Form on the Web site. We look forward to seeing you in Boston in June!

System 1032

USE OF AND ACCESS TO PRODUCTS AND FEATURES ARE IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THE USER’S SOFTWARE LICENSE. THE PRESENTATION OF MATERIAL HEREIN DOES NOT, IN ANY MANNER, MODIFY SUCH TERMS AND CONDITIONS.

Back to Basics, Part 5—Introducing Attribute Formats
By Tym Stegner

Tym

Display Format Compared to Storage Format
Contrary to a common assumption, the format of an attribute does not describe how the attribute data is physically stored within a dataset. System 1032 stores data values in the most efficient manner possible, which usually you cannot actually display. Storage is based on factors from attribute qualities such as RANGE and PRECISION.
This article begins a discussion on how attributes values are displayed when you extract or report them. We examine in some depth the FORMAT quality of an attribute definition. The FORMAT quality is a string of encoded characters that controls how that attribute data value is displayed by the WRITE or PRINT commands.

Default Attribute Formats by Data Type
The data type itself governs the default display. In System 1032, the G format uses the default format for the data type. Any attribute value can be displayed using the general formats. You can override the default formats by specifying an alternate display using the FORMAT quality in the ATTRIBUTE command. You can also override a defined display format with a WRITE or PRINT command, if you want to use a different format temporarily.

Table 1 lists the default formats for each data type.

Table 1. System 1032 default display formats

Data Type Format code Example
Binary Varying SV(60)A
Date_Time D3.3M JAN/01/2005 12:34 PM
Date D3 JAN/01/2005
Decimal N10.2 1234567.89
Integer N10 1234567890
Integer Double E13.6E2 1.234568E+09
Logical L1 T
Real E13.6E2 1.234568E+09
Real Double E13.6E2 1.234568E+09
Text An ABC…
Time_Span TS4.16 12:34:56
Time TS4.16 12:34:56

Although the following example uses variables, instead of attributes, the default formats are the same, because like attributes the defaults are based on a data type.

1032> variable EXPIRATION date initially '12/31/2007'
1032> variable UNIT_PRICE decimal initially 12.31
1032> variable UNITS integer initially 1000
1032> show var * format
Variable EXPIRATION Date Format D3
Variable UNIT_PRICE Decimal Format N10.2
Variable UNITS Integer Format N10
1032> print expiration unit_price units
EXPIRATION UNIT_PRICE UNITS
---------- -------------- -----------
12/31/2007 12.31 1000
1032>

Using the General Formats
The next levels of display control you can exercise are the general numeric display, the N format, or the general text display, the A format. (The A format and the other text formats are discussed in detail in a subsequent article.)

You can use the N syntax of Nwidth.decimal to control the display of digits when the data type is Decimal, Integer, or Real. Note that the width segment of the N format describes the total width of the display field, including the decimal point.

1032> variable sample decimal init 1234.56
1032> show variable sample format
Variable SAMPLE Decimal Format N10.2
1032> print sample sample format n15.2 sample format n6.1
SAMPLE SAMPLE SAMPLE
-------------- ------------------- ---------
1234.56 1234.56 1234.6
1032>

Numeric Formats
The Integer, Real, and Decimal data types have many options for display. Beyond the common integer and floating point formats, System 1032 supports exponential formats for scientific notation, as well as hexadecimal and octal renderings.

Name Syntax Example

Exponential
Ewidth.decimalEdigits (where digits represents an integer number of exponent digits) 1.234567890E9
Floating point Fwidth.decimal 123.456
Hexadecimal Hwidth 0C089CD3
Integer Iwidth 123456789
Octal Owidth 1234567

Logical Formats
The data type Logical represents True, False or MISSING values. You can display them as text, the Lwidth format, or in binary, the Bwidth format.

Binary display might be used for scientific reporting, often written as B1. The Bwidth format syntax displays True/False values as 1 or 0 (zero), in the specified width of field. If a width greater than 1 is specified, the single numeric digit is preceded by the requisite number of spaces.

The text logical format uses the Lwidth syntax. Similar to the B format, the width of the L format controls the spacing to the left of the value of T or F by filling in with spaces.

1032> variable YesNo logical init false
1032> print yesno yesno fmt L5 yesno fmt B1
YESNO YESNO YESNO
----- ----- -----
F F 0

Date-related Formats
System 1032 is very comprehensive when it comes to displaying date and/or time data values. The following Date_Time format syntax looks incomprehensible until we pick it apart in Table 2.

D{[W][d[YY][.t[M]]}

Table 2. Identifying the parts of Date_Time format syntax

The letter Specifies
D Date or Date_Time format
W Day of the week to prefix the date display (can be used alone)
d One of the eight date display formats (listed in Table 3)
YY The year to display in 2-digit format
t One of the five time display formats (listed in Table 3)
M The 12-hour clock with AM or PM, instead of the default 24-hour clock

Table 3. D format details for date and date-time data

Date specifier (d) Output Time specifier (t) Output
1 Month____ DD, YYYY 1 HHMM
2 MMM-DD-YYYY 2 HHMMSS
3 DD/MM/YYYY 3 HH:MM
4 MMDDYYYY 4 HH:MM:SS
5 YYMMDD 5 HH:MM:SS.CCCCCC
6 YYYYMMDD
7 MMYYYY
8 YYYY

In the following example, a birthday date is displayed using two formats.

1032> variable dayBirth date_time initially ‘11/28/1960 19:35’
1032> print dayBirth format dW dayBirth format d1
DAYBIRTH DAYBIRTH
--------- ------------------
Monday November 28, 1960
1032>

In a similar fashion, the Time and Time_Span data types, shown in Table 4, use enumerated formats for output of elapsed and clock time. The Time and Time_span formats are rendered using the TSspecifier.width syntax.

Table 4. TS format for time and time-span data

Time/Span specifier Output Columns required
1 HHMM 4
2 HHMMSS 6
3 HH:MM 5
4 HH:MM:SS 8
5 HH:MM:SS.CCCCCC 15
6 DD:HH:MM 8
7 DD:HH:MM:SS 11
8 DD:HH:MM:SS.CCCCCC 18
9 MM:DD:HH:MM:SS.CCCCCC 21
10 YY:MM:DD:HH:MM:SS.CCCCCC 24

 

Model 204

USE OF AND ACCESS TO PRODUCTS AND FEATURES ARE IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THE USER’S SOFTWARE LICENSE. THE PRESENTATION OF MATERIAL HEREIN DOES NOT, IN ANY MANNER, MODIFY SUCH TERMS AND CONDITIONS.

Archiving CCAJRNL Using Parallel Streams
By James Damon



Many of you save CCAJRNLs from production runs for several weeks, months, or even longer. This is often a requirement for auditing, performance reporting, problem resolution, and other purposes. Typically, following Online termination, CCAJRNL is copied to a GDG, a tape dataset, or some other archive dataset. The copy process involves an extra job step, extra JCL, and extra processing time. When CCAJRNL is large, the time required can be significant. Furthermore, the protocol at your site may require that you complete the copy process before you bring up the next Online--thereby introducing a delay in system availability.

Using a Parallel Stream
Defining CCAJRNL as a parallel stream lets you make a copy in real-time during normal Online operation without compromising performance. When a block is written to a parallel stream, that block is written concurrently to each member of the stream. The elapsed time required for the write operation to complete is simply the longest elapsed time necessary to write the block to any one member of the stream. When the longest write operation completes, the user who caused the write operation resumes processing.

CCAJRNL write operations occur for two reasons:
1) User Language COMMIT statement (explicit, or implicit at END)
2) Full CCAJRNL buffer

Users wait only when they issue COMMIT.

Defining a Parallel Stream
Figure 1 shows how you might archive CCAJRNL while the Online is running, using a parallel stream definition:

Figure 1. DEFINE STREAM example

DEFINE STREAM CCAJRNL   WITH SCOPE=SYSTEM -
PARALLEL=(CCAJPERM,CCAJGDG) MINAVAIL=2
DEFINE DATASET CCAJPERM WITH SCOPE=SYSTEM OLD -
DSN=YOUR.PERM.CCAJRNL
DEFINE DATASET CCAJGDG WITH SCOPE=SYSTEM -
CATALOG GEN=+1 CYL PRI 100 UNIT=DISK204
DSN=YOUR.GDG.CCAJRNL

You will create two identical copies of CCAJRNL.

Both datasets must have exactly the same DCB and space allocation parameters. Also ensure that each dataset is allocated to a different volume and channel for better performance.

If the write operation to either dataset fails due to an I/O error or a dataset full condition, Online terminates since MINAVAIL=2. If this happens, you must run recovery to reestablish the Online environment.

The Figure 2 schematic illustrates the process of writing to a parallel stream. The Production Online has five servers, 50,000 buffers, and eight CCAJRNL buffers. The parallel journals, CCAJPERM and CCAJGDG, are shown on two separate disks.

Figure 2. Writing a parallel stream

Using a Journal for Recovery
In the recovery step, you could use either dataset for CCARF. However, to keep the recovery stream definitions as simple as possible, your best approach is to use the permanent dataset defined by the following DD:

//CCARF DD DSN=YOUR.PERM.CCAJRNL,DISP=SHR

In Summary
If your organization archives CCAJRNL, consider defining CCAJRNL as a parallel stream and create the archive copy during the Online run. This saves what is usually an extra copy step after Online termination and may even improve system availability, since the Online bounce will not have to wait for the copy step.


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


Contact CCA Webmaster
Copyright 2008