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, 1996


Introducing Questions & Answers

This month, CCAPRINT introduces a Questions & Answers column for Model 204 and System 1032 users. CCA technical support staff and development engineers have collected some of your most interesting problems and have provided answers to share with you.


Question:

How do I line up my summary lines in System 1032 Reports?

Answer:

One of the more challenging chores of writing computer reports is getting the summary lines for major or minor subtotals to line up correctly under the detail values. System 1032 provides default column formats and formatting controls for column spacing, but until now there has been no good trick for putting those dashes (or your character of choice) into the summary line.

Take, for example, the following report fragment:

Fiscal             <------------ Sales ------------->
 Year   Territory   Qrt 1    Qrt 2    Qrt 3    Qrt 4
------  ---------  -------  -------  -------  -------
 1993   Eastern    $10,000  $11,000  $12,000  $37,000
        Western    $12,000  $11,000  $10,000  $37,000
                   -------  -------  -------  -------
Total FY 1993      $22,000  $22,000  $22,000  $74,000
 1994 ...

Typical report code
This report code uses the TV column format to refer to the defined print columns of the report in the embedded WRITE commands. The summary line (Total FY 1993) was generated by the following command fragment:

...
BY FISCAL_YEAR DO AFTER
    WRITE FISCAL_YEAR $TOT(Q1) $TOT(Q2) $TOT(Q3) $TOT(Q4) - 
        FORMAT(20X "-------" 2X "-------" 2X "-------" 2X "-------" / - 
        2X "TOTAL FY " D8 6X F$,7.0 2X F$,7.0 2X F$,7.0 2X F$,7.0 /)
END_DO -
...

Note that if your quarterly sales increase, you must change this entire summary block to increase the length of the dashed lines, as well as the magnitude of the numeric formats.

New report code
The trick provided here takes advantage of the $FMT_MVSTR system variable and the TVn column format. It uses the MISSING keyword, coupled with changing the missing value string ($FMT_MVSTR) to a dash, to produce an automatic total line that adjusts to the exact width of the field, because the missing value always fills the field. The TVn format not only positions the value under the proper column, but also uses the format of that column to represent the value. As a comparison, the TCn format positions only the output cursor at the beginning of the print column; you still must provide a format for the column. For example:

VARIABLE OLD_MVSTR TEXT VARYING
...
BY FISCAL_YEAR DO AFTER
    LET OLD_MVSTR = $FMT_MVSTR,
        $FMT_MVSTR = "-"
    WRITE MISSING MISSING MISSING MISSING - 
        FISCAL_YEAR $TOT(Q1) $TOT(Q2) $TOT(Q3) $TOT(Q4)- 
        FORMAT(TV3 TV4 TV5 TV6 / - 
        2X "TOTAL FY " D8 TV3 TV4 TV5 TV6 / ) 
    LET $FMT_MVSTR = OLD_MVSTR
END_DO -
...

Note that the new code fragment produces the same output as the former code, but, when your quarterly sales increase, you do not need to modify the summary code.

By Tym Stegner, Senior Systems Engineer, System 1032


Question:

Does Model 204 run under OS/390?

Answer:

Yes, all supported MVS versions of Model 204 run under OS/390. At this time, several customers run Model 204 in OS/390 (MVS/ESA 5.2.2) mode.


Question:

Can you provide some guidelines for installing CRAM in an MVS environment?

Answer:

The following list highlights some of the common areas of confusion:

For complete installation requirements, see the Model 204 MVS Installation Guide.

By Brian Kelley, Senior Systems Engineer, Model 204

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

Contact CCA Webmaster
Copyright 2008