|
| |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* RTSSGEN1.QGS - 04/18/01 - REV. 2 - Generate Tab Specs for Category Tables *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* To run this, enter: QGEN RTSSGEN1.QGS /# PERIOD 25 /#
*
* This QGEN run uses no input file, it generates the stub variable specs,
* bases and table definitions used to tabulate the current period from
* the information contained in table JWCATS and the first 5 instructions,
* which get updated for each period. No other instructions get changed.
*
* Everything unique to the current period is contained in the included file,
* so that is the only file that needs to be modified for each new period.
*
* The current period number is passed as the command line dictionary entry
* ## PERIOD and used to identify the include file and name the output files.
*
* This file contains only common specs that do not change between periods.
OUTAP1 rtst2-##PERIOD.qts ( 200 V
LISTING rtssg-##PERIOD.lst
SETUP ADDRMODE c
RUNOPS RECYCLE
******************************************************************************
* Insert spec file containing all elements unique to the current period *
******************************************************************************
#INCLUDE RTSG1-##PERIOD.QGS
******************************************************************************
* The remainder of this spec file will not change from period to period *
* unless the basic table layout is changed or new categories are added. *
******************************************************************************
* Table of Category Code Titles (Abbreviated)
* -----------------------------
TABLE jwcodes A=2 F=35 E=60
04 FOREIGN TRAVEL
05 HEALTH & SCIENCE
06 TRAVEL & LEISURE
13 MAIN FEATURE ARTICLES
16 DO IT YOURSELF
29 KITCHEN PRIMER
30 RAPID GOURMET
31 COOKING THE EASY WAY
35 COOKING WITH PICTURES
58 CELEBRITY FEATURES
END
* Table of spec line templates for QTAB-II specs
* ----------------------------------------------
TABLE specmask A=2 F=80 E=60
01 003c2@'&&'&018c3='pg#' B1
02 023c2@-3'cc' 3
11 S
12 _IA_003c2@'&&' B2 AVERAGE FOR CURRENT ISSUE:
13 TCURRENT ARTICLES vs. PAST 6 MONTH CATEGORY NORMS
14 END
16 VAR read&& L B32
17 003c2r'bb;ee' TTotal Readership Sample -
20 END
21 TABLE
22 MERGE PCELLS A.1 WT sample \
23 TCELLS F,U RANK TT \
24 ZCELLS ' ' SINGLE \
25 TITLE B2,S,H,B1 POST H,S
26 R&&-GR jwcat&& hreadx subt-1 read&&
31 END
END
* -----------------------------------------------------------------------------
* The instructions that follow will write out the QTAB spec file by looping
* through the tables defined previously for each page defined in table JWCATS
* for the current issue.
* This is all accomplished during the EOJ recycle pass - No input file is used
* -----------------------------------------------------------------------------
sel1 all Turn on output in RECYCLE pass
z1 add 307c2 Load # pages for loop limit
* Write out stub VAR statememt line for current period
001c200* all Clear output area
001 mov 'VAR jwcat&& L S45R32'
010 mov 301c2 Load Period code in VAR name
wrt all
001c200* all Clear output area
* The following section retrieves the page/code/title information for each
* article in the current issue and creates the actual stub specs & labels.
* Spec definition templates are retrieved from TABLE specmask.
* Page #, category code and article tile are retrieved from TABLE jwcats.
* Category names are retrieved from TABLE jwcodes.
* The current period code is inserted where appropriate.
309c2 add k0 Set page counter to zero
000 PP-z1 loop 000 000 000 000
001c200* all Clear output area
309c2 add 309c2 k1 Increment counter
201 tlu 309c2 jwcats Look up Article Info
311c2 add k1 01 = Article line
001 tlu 311c2 specmask Load Article specs
008 mov 301c2 Current Period
019 mov 201c3 Page # in Specs
034 ed 201c3'XXX' Page # in Text
039 mov 212c45 Article title
wrt all Write it out
001c200* all Clear output area
311c2 add k2 02 = Category line
001 tlu 311c2 specmask Load Category specs
000 PC-3 loop 002 000 Category lines
skpPC and 206c2b Skip if no category
010 mov 206c2 Category code
043 tlu 206c2 jwcodes Category name
wrt all Write it out
_PC_ nop
_PP_ nop
* The following section writes out the end of the stub variable
* and the table definitions for the current period.
* Spec definition templates are retrieved from TABLE specmask.
* The current period code is inserted where appropriate.
311c2 add k11 Set counter to 11
001 tlu 311c2 specmask Load spec line
001c 1-150 loop 000 For max width of 150
034 mov '_' Run underline across
wrt all Write it out
000 SX-60 loop 000 000 Remaining specs
001c200* all Clear output area
311c2 add 311c2 k1 Increment counter
001 tlu 311c2 specmask Load spec line
skpSX and 001c80b Skip if nothing
* Load period text in base
059 cmov 050c8@'Sample -' 261c30 Readership
* Load current period where appropriate:
012 cmov 012c2@'&&' 301c2 Stub average line
010 cmov 010c2@'&&' 301c2 Base VAR names
002 cmov 002c2@'&&' 301c2 Table name
016 cmov 016c2@'&&' 301c2 Table Stub
039 cmov 039c2@'&&' 301c2 Table Base
* Load norm period range end points
008 cmov 008c2@'bb' 303c2 Beginning
011 cmov 011c2@'ee' 305c2 End
wrt all Write it out
_SX_ nop
drp1 all Turn off output
END
|