1 08/23/83 set_format_options, sfo
2
3 Syntax: sfo -format_option_args -control_args
4
5
6 Function: sets individual report format options to user specified or
7 default values, and/or all of the formatting options to their default
8 values.
9
10 The option value given for any format option argument can be the
11 control arguments "-default" or "-prompt". If -default is given for
12 the value, LINUS will set the value of the format option to the system
13 default. If -prompt is given for the value, LINUS will prompt for the
14 value with the prompt string "Enter FORMAT_OPTION_NAME.". A line
15 consisting of the single character "." will terminate the prompted
16 input mode. To suppress the printing of the prompt string use the
17 -brief control argument.
18
19
20 Control arguments:
21
22 -brief, -bf, -long, -lg
23 print/don't print the prompt string for values when the "-prompt"
24 control argument is given. The default is -long, which means prompt
25 with the string "Enter FORMAT_OPTION_NAME". If -brief and -long are
26 both used on the request line, the last one supplied will be used.
27
28 -default
29 specifies that LINUS should set the value of the format option which
30 immediately precedes this control argument to the system supplied
31 default.
32
33
34 -string STR, -str STR
35 allows STR to be entered as a format option value when STR begins
36 with a hyphen.
37
38 -prompt
39 specifies that LINUS should prompt for the value of the format
40 option which immediately precedes this control argument. A prompt
41 string will be written before the prompting action unless the -brief
42 control argument is used. A line consisiting of the single
43 character "." will terminate the prompted input mode.
44
45
46 -reset, -rs, -no_reset, -nrs
47 reset/don't reset all formatting options to their system default
48 values. The default is -no_reset which means only the user
49 specified options will have their values changed. If -reset is
50 given, all format options will be reset to their system default
51 values before the values are changed for any other format options
52 specified in the request line. If -reset and -no_reset are both
53 used on the request line, the last one supplied will be used.
54
55
56 Format Option Arguments General Report Options:
57
58 -delimiter CHAR, -dm CHAR
59 the character used to delimit the different portions of a header or
60 footer. The default character is "!". This can be set to any
61 printable character.
62
63 -format_document_controls STR, -fdc STR
64 the value of -format_document_controls is used to determine if the
65 format_document_ subroutine should interpret format document control
66 lines when filling overlength text. The default value for STR is
67 "off" which means format_document_ will not check for control lines
68 imbedded in the text. STR can also be set to "on" which means
69 format_document_ will interpret control lines in the text and
70 provide special filling actions based on the imbedded control lines.
71
72
73 -hyphenation STR, -hph STR
74 the value of -hyphenation is used to determine if hyphenation should
75 be attempted when filling overlength character strings. The default
76 value for STR is "off" which means no hyphenation is attempted by
77 default. STR can also be set to "on" which specifies that
78 hyphenation should be attempted.
79
80
81 -page_footer_value STR, -pfv STR
82 the page footer placed at the bottom of each page. The page footer
83 can consist of more than one line, and each line can have a left,
84 right, and center portion. The individual portions of each line are
85 delimited by the delimiter character. Active requests found in the
86 header are evaluated and their return value is placed into the
87 header before folding and alignment takes place. Portions of a
88 header or footer whose length are zero have their space on the page
89 redistributed to other portions whose lengths are not zero. For
90 example, if the page header contained only a center portion
91 !!Sample Center Portion!!, the text would be centered on the page,
92 but would have the full page width available for the text.
93
94
95 Similarly, a left portion or right portion only would be aligned to
96 the left or right of the page, but would have the full page width
97 available for placement of its text. Two exceptions to this action
98 are when the header or footer has a left, right, and center portion,
99 and the left or right portion has a zero length e.g.
100 !left part!center part!! or !!center part!right part!. In these
101 two cases the left or right part of the page is unavailable for
102 placement of text; that is, the space is not redistributed to the
103 other two portions. If the redistribution of the available page
104 width is not desired, the placement of a single blank into a portion
105 will prevent the redistribution from taking place because the
106 portion will have a length greater than zero i.e.
107 ! !Center Part! !. The default value for STR is "" which means
108 there is no page footer provided by default.
109
110
111 -page_header_value STR, -phv STR
112 the page header placed at the top of each page. Refer to the
113 description of -page_footer_value for the content of a
114 header/footer. The default value for STR is "" which means there is
115 no page header provided by default.
116
117 -page_length N, -pl N
118 the length of each formatted page given as the number of lines. N
119 can be given as "0" or any positive integer. "0" means that the
120 report is not to be paginated and it is created as one continous
121 stream. The default value for N is "66".
122
123
124 -page_width N, -pw N
125 the width of each formatted page given as the number of character
126 positions. N can be given as "0" or any positive integer. "0"
127 means that the page width will always be set by LINUS to be the
128 exact width needed to contain all of the columns specified in the
129 LILA selection-expression which are not excluded. If N is greater
130 than zero and the width for any column exceeds N, the column's width
131 is automatically set to N. The default value is "79" character
132 positions.
133
134
135 -title_line STR, -tl STR
136 the value of -title_line is used to determine whether a title line
137 should be printed. The default value for STR is "on" which means
138 that a title line is printed at the top of each page. STR can also
139 be set to "off" to inhibit the printing of the title line.
140
141 -truncation STR, -tc STR
142 the value of -truncation is used to determine the characters that
143 should be used to indicate that truncation of some value has
144 occured. The default value for STR is "*". STR can be set to any
145 sequence of printable characters.
146
147
148 Format Option Arguments General Column Options:
149
150 -column_order COLUMN_LIST, -co COLUMN_LIST
151 the value of -column_order is used to determine the order that the
152 columns should appear in the detail line. The default value for
153 COLUMN_LIST is the list of columns from the LILA
154 selection-expression in the order supplied. This means that the
155 columns will appear in the exact same order as they appear in the
156 LILA selection-expression. COLUMN_LIST can be set to a list of
157 column names or numbers. Columns missing from this list will be
158 placed after the columns which appear in the list. That is, if five
159 columns were selected and the -column_order value had been given as
160 "3 2", the complete order would be "3 2 1 4 5".
161
162
163 -count COLUMN_LIST, -ct COLUMN_LIST
164 the value of -count is used to determine the columns counts should
165 be generated for. The default value for COLUMN_LIST is "" which
166 means no columns should have counts generated. COLUMN_LIST can be
167 set to a list of column names or numbers. Counts are generated
168 after the last detail line. If a count is requested on a column
169 that is excluded, the count is also excluded from the page. An
170 exception to this rule is when all columns have been excluded.
171 Counts are provided in this case to allow reports consisting of some
172 combination of counts, subcounts, totals, and subtotals only.
173
174
175 -exclude COLUMN_LIST, -ex COLUMN_LIST
176 the value of -exclude is used to determine if any of the columns
177 selected via LILA should be excluded from the detail line. The
178 default value for COLUMN_LIST is "" which means no columns should be
179 excluded. COLUMN_LIST can be set to a list of column names or
180 numbers.
181
182
183 -group COLUMN_LIST, -gr COLUMN_LIST
184 the value of -group is used to group a number of rows based on the
185 values of one or more columns. The default value for COLUMN_LIST is
186 "" which means no group of rows has been defined. COLUMN_LIST can
187 be set to a list of column names or numbers. The column or columns
188 named in the list become a hierarchy of columns. The first column
189 named is the most major column, and the last column named becomes
190 the most minor column. The hierarchy of columns can be used with
191 the -outline, -page_break, -subtotal and -subcount options as
192 described under each option's description.
193
194
195 -group_footer_trigger COLUMN_LIST, -gft COLUMN_LIST
196 the value of -group_footer_trigger is used to determine when to
197 generate the group footer. The default value for COLUMN_LIST is ""
198 which means no group footer triggers are defined by default.
199 COLUMN_LIST can be set to a list of column names or numbers. The
200 columns which appear in this list must also appear in the column
201 list associated with the -group option. If the -group option is set
202 to a new value, columns which are eliminated from the COLUMN_LIST
203 are also eliminated from the -group_footer_trigger COLUMN_LIST.
204 When any of the columns specified in the COLUMN_LIST are about to
205 change with the next row, the group footer is evaluated. The group
206 footer is always evaluated after the last row of the report.
207
208
209 -group_footer_value STR, -gfv STR
210 the group footer placed after each group of rows when any of the
211 columns associated with the -group_footer_trigger option changes.
212 Refer to the description of -page_footer_value for the content of a
213 header/footer. The default value for STR is "" which means there is
214 no group footer defined by default.
215
216
217 -group_header_trigger COLUMN_LIST, -ght COLUMN_LIST
218 the value of -group_header_trigger is used to determine when to
219 generate the group header. The default value for COLUMN_LIST is ""
220 which means no group header triggers are defined by default.
221 COLUMN_LIST can be set to a list of column names or numbers. The
222 columns which appear in this list must also appear in the column
223 list associated with the -group option. If the -group option is set
224 to a new value, columns which are eliminated from the COLUMN_LIST
225 are also eliminated from the -group_header_trigger COLUMN_LIST.
226 When any of the columns specified in the COLUMN_LIST have just
227 changed with the current row, the group header is evaluated. The
228 group header is always evaluated before the first row of the report.
229
230
231 -group_header_value STR, -ghv STR
232 the group header placed before each group of rows when any of the
233 columns associated with the -group_header_trigger option changes.
234 Refer to the description of -page_footer_value for the content of a
235 header/footer. The default value for STR is "" which means there is
236 no group header defined by default.
237
238
239 -outline COLUMN_LIST, -out COLUMN_LIST
240 the value of -outline is used to determine if duplicate values in a
241 column should be suppressed. The default value for COLUMN_LIST is
242 "" which means no columns should have duplicate values suppressed.
243 COLUMN_LIST can be set to a list of column names or numbers. If the
244 value of a named column is the same as its previous value, then the
245 value will be suppressed unless it is the first line of a new page.
246
247 If any of the named columns are a member of the "group" of rows
248 defined by the -group option, then it and all of the columns more
249 major in this group have outlining done on them. A change in value
250 of any one column causes all columns lower in the hierarchy to have
251 their values displayed, in addition to the column that changed. An
252 exception to this is if it is the first line on a new page, when
253 duplicate values are never suppressed.
254
255
256 -page_break COLUMN_LIST, -pb COLUMN_LIST
257 the value of -page_break is used to determine when page breaks
258 should be generated. The default value for COLUMN_LIST is "" which
259 means that no columns are watched for page breaks. COLUMN_LIST can
260 be set to a list of column names or numbers. The columns specified
261 in the list are watched and when their values change, a break to a
262 new page is generated. If any of the named columns are a member of
263 the "group" of rows defined via the -group option, it and all
264 columns more major in the group will be watched for page breaks.
265
266 -row_footer_value STR, -rfv STR
267 the row footer placed after each detail line. Refer to the
268 description of -page_footer_value for the content of a
269 header/footer. The default value for STR is "" which means there is
270 no row footer provided by default.
271
272
273 -row_header_value STR, -rhv STR
274 the row header placed before each detail line. Refer to the
275 description of -page_footer_value for the content of a
276 header/footer. The default value for STR is "" which means there is
277 no row header provided by default.
278
279
280 -subcount SUBCOUNT_SPEC, -stt SUBCOUNT_SPEC
281 the value of subcount is used to determine what columns subcounts
282 should be generated for, when they should be generated, and what
283 type of subcount should be generated. The default value for
284 SUBCOUNT_SPEC is "" which means no subcounts should be generated for
285 any columns. SUBCOUNT_SPEC can consists of one or more blank
286 separated "triplets". The syntax of a triplet is
287 "column_1,column_2reset | running". column_1 is the name or
288 number of the column that a subcount will be generated for.
289 column_2 is the name or number of a column whose value should be
290 watched to determine when to generate the subcount. When the value
291 of this column being watched changes, the subcount is generated. If
292 this column is a member of the "group" of rows defined via the
293 -group option, it and all columns more major in the group will be
294 watched for subcount generation.
295
296
297 "reset" or "running" indicates the type of subcount desired. If
298 neither is given then "reset" is the default. "reset" means the
299 subcount counter will be reset to zero each time a subcount is
300 generated. "running" means the subcount will not be reset to zero.
301 If a subcount is requested on a column that is excluded, the
302 subcount is also excluded from the page. An exception to this rule
303 is when all columns have been excluded. Subcounts are provided in
304 this case to allow reports consisting of some combination of counts,
305 subcounts, totals, and subtotals only.
306
307
308 -subtotal SUBTOTAL_SPEC, -stt SUBTOTAL_SPEC
309 the value of subtotal is used to determine what columns subtotals
310 should be generated for, when they should be generated, and what
311 type of subtotal should be generated. The default value for
312 SUBTOTAL_SPEC is "" which means no subtotals should be generated for
313 any columns. SUBTOTAL_SPEC can consists of one or more blank
314 separated "triplets". The syntax of a triplet is
315 "column_1,column_2reset | running". column_1 is the name or
316 number of the column that a subtotal will be generated for.
317 column_2 is the name or number of a column whose value should be
318 watched to determine when to generate the subtotal. When the value
319 of this column being watched changes, the subtotal is generated. If
320 this column is a member of the "group" of rows defined via the
321 -group option, it and all columns more major in the group will be
322 watched for subtotal generation.
323
324
325 "reset" or "running" indicates the type of subtotal desired. If
326 neither is given then "reset" is the default. "reset" means the
327 subtotal counter will be reset to zero each time a subtotal is
328 generated. "running" means the subtotal will not be reset to zero.
329 If a subtotal is requested on a column that is excluded, the
330 subtotal is also excluded from the page. An exception to this rule
331 is when all columns have been excluded. Subtotals are provided in
332 this case to allow reports consisting of some combination of counts,
333 subcounts, totals, and subtotals only.
334
335
336 -total COLUMN_LIST, -tt COLUMN_LIST
337 the value of -total is used to determine the columns totals should
338 be generated for. The default value for COLUMN_LIST is "" which
339 means no columns should have totals generated. COLUMN_LIST can be
340 set to a list of column names or numbers. Totals are generated
341 after the last detail line. If a total is requested on a column
342 that is excluded, the total is also exlcuded from the page. An
343 exception to this rule is when all columns have been excluded.
344 Totals are provided in this case to allow reports consisting of some
345 combination of counts, subcounts, totals, and subtotals only.
346
347
348 Format Option Arguments Specific Column Options:
349
350 "column_id" in the following descriptions means the column name as
351 defined in the open model/submodel, the number of the column in the
352 LILA selection_expression, or a star name which is used to match column
353 names.
354
355 -alignment column_id STR, -al column_id STR
356 the value of -alignment is used to determine the alignment of a
357 column value within its display width. "column_id" specifies which
358 column the alignment applies to. "STR" is the alignment mode and
359 can be set to "center", "left", "right", "both", or "decimal N".
360
361
362 The default value for STR depends upon the type of column selected
363 via LILA. Character and bit strings default to left alignment,
364 decimal data with a non-zero scale defaults to decimal point
365 alignment, and all other data types default to right alignment. For
366 decimal alignment, the decimal alignment position within the display
367 width is given a default value. This alignment position can be
368 changed by the user by specifying the value as "decimal N", where N
369 is the character position within the display width where the decimal
370 point should be aligned. The alignment mode of "both" specifies
371 that the column value will be aligned to the left and rightmost
372 character positions within its display width. Text is padded by
373 insertion of uniformly distributed whitespace if necessary.
374
375
376 -editing column_id STR, -ed column_id STR
377 the value of -editing is used to specify additional editing that
378 should be done to the column value before it is placed on the page.
379 "column_id" specifies which column the editing applies to. The
380 default value for STR is "" which means additional editing should
381 not be done. Multics active functions and LINUS active requests are
382 normally used to provide the additional editing. For example, to
383 place commas and dollar signs in a column called "salary", the
384 string "pic $99999v.99 column_value salary" could be specified
385 as the editing value. Refer to the description of the
386 "column_value" request for its usage.
387
388
389 -folding column_id STR, -fold column_id STR
390 the value of -folding is used to determine what type of action
391 should occur when a column value exceeds its display width.
392 "column_id" specifies which column the folding applies to. The
393 default value for STR is "fill" which means portions of the value
394 which exceed the display width are moved down to the next lines
395 until a correct fit is obtained. STR can also be set to "truncate"
396 which means the column's value is truncated to fit in the display
397 width and the truncation characters is placed at the end of the
398 value to indicate truncation has occurred.
399
400
401 -separator column_id STR, -sep column_id STR
402 the value of -separator is used to separate a column from the next
403 one following it. The last column on a line does not have a
404 separator. "column_id" specifies which column the separator applies
405 to. The default value for STR is two blanks. STR can be changed to
406 any sequence of printable characters.
407
408
409 -title column_id STR, -ttl column_id STR
410 the value of -title is placed above the column at the start of each
411 page if the -title_line option is set to "on". "column_id"
412 specifies which column the title applies to. The default value of
413 STR is the name of the column taken from the open model or submodel.
414 In the case of expressions the default value for STR is "eN", where
415 N begins at 1 and is incremented by 1 for each additional expression
416 found in the select list. If the title isn't the same number of
417 characters as the column's display width, the title is centered
418 within the display width for its associated column. If the value of
419 title is wider than the columns display width it is filled or
420 truncated to obtain a correct fit, depending on it's parent column's
421 folding action.
422
423
424 -width column_id N, -wid column_id N
425 the value of width is used to determine the display width for a
426 column. "column_id" specifies which column the width applies to.
427 The default value for N is the width for the column derived from the
428 open model or submodel. The derived width will be the number of
429 characters needed to contain the value after conversion from the
430 data type found in the data base to character format. N can be set
431 to any positive integer.
432
433
434 Notes:
435
436 At least one format option argument or "-reset" must be specified.
437 Format option arguments and control arguments can be mixed freely in
438 the request line, but a control argument cannot be placed in between a
439 format option name and a format option value. For example, "sfo
440 -page_width 80 -reset" is a valid request. "sfo -page_width -reset 80"
441 is not valid. If a value is to be set that begins with a hyphen, the
442 control argument "-string" must be given before the value to
443 distinguish it from control arguments and format option arguments.
444
445
446 Examples:
447
448 set_format_options -width 1 25
449 set_format_options -title emp_name "Employee Name"
450 set_format_options -reset -page_width 80 -page_length 60
451 set_format_options -page_footer_value
452 "!!-display_builtins page_number-!!"
453
454
455 set_format_options -page_header_value -prompt
456 Enter -page_header_value.
457 !e date!LINUS REPORT!e time!
458 !!!!
459 !!--Page display_builtins page_number--!!
460 .
461 sfo -exclude exchange extension -width area_code 12
462 sfo -editing area_code "fl ^a/^a-^a clv area_code
463 clv exchange clv extension"