Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

FOCUS

-----------------------------------------------------------------GETTING INTO FOCUS


-----------------------------------------------------------------FOCBEGIN/FOCSTART
- A CLIST that allocates all the files necessary
to run Focus. Only need to do it once during
a TSO session.
FOCUS
- Use after you have used FOCBEGIN during a
TSO session.
TABLE FILE filename
(commands)
END
QUIT
FIN
- Get out of Focus

ONLINE FILE ALLOCATION


In order for focus to read information from a data file it is necessary to first tell FOCUS
where the data resides and give a description of how the data is arranged on the file. This
is done with a file allocation statement.
The first kind of file allocation we need to talk about is the on-line file allocation. The
format of the on-line file allocation is as follows:
*************************************************************
>> TSO ALLOC F(SCHEMA) DS('DATA.SET.NAME') SHR
*************************************************************
An EXAMPLE of a typical allocate statement is the following.
>> TSO ALLOC F(CONAMES) DS('INFOCTR.FOCFILE.CONAMES') SHR
After the allocation has been done you can now do a TABLE FILE CONAMES' and print any field
names in the schema.
***
You can use the ALLOCATE in 'FOCUS.PROD.EXEC'Browse the dataset for the allocate CONMALLC

VERBS
PRINT
LIST
SUM/WRITE
COUNT

Request:

TABLE FILE FOCUSEXP


PRINT COID AND REGNO
END

Output:
+--------------------------------------------------------+
|
COMPANY_ID REGION_NO
|
|
---------- --------|
|
11701
01
|
Request:

TABLE FILE FOCUSEXP


LIST COID AND ACCTNO
END

Output:
+--------------------------------------------------------+
|
LIST COMPANY_ID ACCOUNT_NO
|
|
---- ---------- ---------|
|
1 11701
10001
|
|
2 11701
10200
|
Request:

TABLE FILE FOCUSEXP


PRINT ACCTNO AMT
BY COID
END

Output:
+-------------------------------------------------------+
|
COMPANY_ID ACCOUNT_NO
AMOUNT
|
|
---------- --------------|
|
11701
10001
5,000.00
|
|
10200
404.00
|
|
20030
3,000.00
|
|
34600
200.00
|
|
70210
1,000.00 CR
|
High-to-Low
+-------------------------------+
|
BY (HIGHEST) {n} sortfield |
+-------------------------------+
Request:

TABLE FILE EMPLOYEE


PRINT LAST_NAME AND FIRST_NAME
BY HIGHEST CURR_SAL
END

TERMINATING FOCUS
END
Terminates a FOCUS request.
Function is processed.
User is returned to FOCUS command level.
RUN

Terminates report request.


Report is processed.
User remains within table environment.
Do not repeat TABLE FILE filename.
Will see "T>".

Terminates a FOCUS request.


Request is not processed.
User is returned to FOCUS command level.
Used to end invalid commands.

QUIT

OFFLINE
Request:

TABLE FILE EMPLOYEE


PRINT LAST_NAME FIRST_NAME
END

Output:
+---------------------+
| PAGE 1
|

| LAST_NAME FIRST_NAME|
| --------- ----------|
| STEVENS
ALRED
|
|
.
.
|
|
.
.
|
|
.
.
|
+---------------------+
Then:
> OFFLINE
> RETYPE
> ONLINE

(Press ENTER)
(Press ENTER)
(Press ENTER)

Report request must end with END.


OFFLINE command may be issued before report request.
No other FOCUS commands may be entered between OFFLINE and
RETYPE or report will not be available.
SUM VERB
Request:

TABLE FILE EMPLOYEE


PRINT CURR_SAL
BY DEPARTMENT
END

Ouput:
+----------------------------+
|
DEPARTMENT
CURR_SAL
|
|
----------------|
|
MIS
$13,200.00 |
|
$18,480.00 |
|
$18,480.00 |

TABLE FILE EMPLOYEE


SUM CURR_SAL
BY DEPARTMENT
END
+--------------------------------+
| DEPARTMENT
CURR_SAL
|
| ----------------|
| MIS
$108,002.00
|
| PRODUCTION
$114,282.00
|
|
|

COUNT
If there is a BY phrase, the count represents the number of times a field is encountered
within that sortfield.
If there are no BY phrases, the count represents the number of times the field is
encountered within the entire file.
The word COUNT is placed in the column heading beneath the fieldname.
COUNT object1(...object95)
Request:

TABLE FILE EMPLOYEE


PRINT CURR_SAL
BY DEPARTMENT
END

TABLE FILE EMPLOYEE


COUNT CURR_SAL
BY DEPARTMENT
END

Output:
+-----------------------------+
|
|
| DEPARTMENT
CURR_SAL
|
| ----------------|
| MIS
$13,200.00 |
|
$18,480.00 |
|
$18,480.00 |
|
$21,780.00 |
COUNT *
Request:

TABLE FILE EMPLOYEE


COUNT *
END

+-------------------------+
|
CURR_SAL |
| DEPARTMENT
COUNT
|
| ----------------- |
| MIS
6 |
| PRODUCTION
6 |
|
|
|
|

Output:
+--------------+
| COUNT *
|
|
COUNT
|
| ------|
|
19
|
+--------------+
SORT

+---------------------------------------------------------+
|
BY (HIGHEST) sortfield (IN-GROUPS-OF quantity)
|
+---------------------------------------------------------+
Sortfield must be numeric
IN-GROUPS-OF must be used with the BY phrase.
If BY sortfield, then 1 line for each field value.
If BY sortfield IN-GROUPS-OF n, then 1 line for each category.
Values
Appear as
Category
------------0 - 9-------------------------------0
10 - 19------------------------------10
20 - 29------------------------------20

Request:

TABLE FILE EMPLOYEE


SUM ED_HRS
BY CURR_SAL
END

TABLE FILE EMPLOYEE


SUM ED_HRS
BY CURR_SAL IN-GROUPS-OF 5000
END

Output:
+------------------------+
|
CURR_SAL
ED_HRS |
|
------------- |
| $9,000.00
25.00 |
| $9,500.00
10.00 |
| $11,000.00
25.00 |
| $13,200.00
36.00 |
Request:

+---------------------------+
|
CURR_SAL
ED_HRS
|
|
------------|
|
$5,000.00
35.00
|
| $10,000.00
61.00
|
| $15,000.00
100.00
|
| $20,000.00
80.00
|

TABLE FILE EMPLOYEE


SUM ED_HRS
RANKED BY TOP 10 CURR_SAL
END

Output:
+---------------------------------------+
|
RANK
CURR_SAL
ED_HRS |
|
---------------- |
|
1
$29,700.00
.00 |
|
2
$27,062.00
45.00 |
|
3
$26,862.00
30.00 |
FOCUS QUERY REQUEST
(1) TABLE FILE filename
(2) {PRINT
} object1 ({AND } object2...object95 )
{LIST
}
{SUM/WRITE}
{COUNT
}
(3) (BY (HIGHEST) {n} sortfield (IN-GROUPS-OF qty))
n = # of instances
can be 1 to 32 sortfields
(4) RANKED BY (TOP
) {n}
(HIGHEST)
(LOWEST )
(5) {END }

{RUN }
{QUIT}
ACROSS
+----------------------------------------------------------------+
|
ACROSS (HIGHEST) sortfield (IN-GROUPS_OF quantity)
|
+----------------------------------------------------------------+

The report is sorted by the values of the ACROSS sortfield.


The values of the ACROSS fields are displayed across the page.
The verb object values are printed beneath the ACROSS field.
If the values of the ACROSS fields are to be printed from high
value to low value, use HIGHEST.
Best used with SUM or COUNT verbs.
A maximum of 5 ACROSS phrases may be used in a request.
Vertical Sort:
Horizontal Sort:
Request:

TABLE FILE EMPLOYEE


SUM CURR_SAL
BY DEPARTMENT
END

TABLE FILE EMPLOYEE


SUM CURR_SAL
ACROSS DEPARTMENT
END

Output:
+--------------------------+
|
|
| DEPARTMENT
CURR_SAL
|
| ----------------|
| MIS
$108,002.00|
| PRODUCTION
$114,282.00|
+--------------------------+

+---------------------------+
| DEPARTMENT
|
|
MIS
PRODUCTION |
| --------------------------|
| $108,002.00
$114,282.00 |
|
|
+---------------------------+

IF
Request:

TABLE FILE EMPLOYEE


COUNT EMP_ID BY DEPARTMENT
BY PAY_DATE
IF DEPARTMENT EQ MIS
IF GROSS GT 1000
IF PAY_DATE FROM 820501 TO 821231
END

Output:
+-----------------------------------------------+
|
EMP_ID
|
|
DEPARTMENT
PAY_DATE
COUNT
|
|
---------------------|
|
MIS
82/05/28
4
|
|
82/06/30
4
|
|
82/07/30
4
|
|
82/08/31
5
|
+-----------------------------------------------+

LIMITING RECORDS
+----------------------------+
| IF RECORDLIMIT EQ n
|
+----------------------------+
Request:

TABLE FILE EMPLOYEE


PRINT LN FN DEPARTMENT
IF DPT EQ MIS

IF RECORDLIMIT EQ 3
END
Output:
+--------------------------------------------------------------------+
|
LAST_NAME
FIRST_NAME
DEPARTMENT
|
|
--------------------------|
|
SMITH
MARY
MIS
|
|
JONES
DIANE
MIS
|
|
MCCOY
JOHN
MIS
|
+--------------------------------------------------------------------+
Only the first "n" records that meet all other screening conditions will be in the report
MASK
+---------------------------+
|
IF fieldname EQ 'mask' |
+---------------------------+
"$" is used to mask out positions whose values are irrelevant.
"$*" may be used to mark as irrelevant the remainder of the field value.
Request:
TABLE FILE EMPLOYEE
PRINT LN1
BY LAST_NAME BY FIRST_NAME BY TYPE
IF TYPE EQ 'H$*'
END

Output:
+----------------------------------------------------------------------+
| LAST_NAME
FIRST_NAME
TYPE ADDRESS_LN1
|
| --------------------- ----------|
| BANNING
JOHN
HSM
160 LOMBARDO AVE.
|
|
|
| BLACKWOOD
ROSEMARIE
HM
|
|
.
.
.
.
|
|
.
.
.
.
|

+-------------------------------------+
|
IF fieldname {CONTAINS} value
|
|
{OMITS}
|
+-------------------------------------+

The relations, CONTAINS and OMITS, are used only with alphanumeric fields.
If the value contains spaces, it must be in single quotes.
The field is searched for the value position by position.
For CONTAINS, if the value is found, the record is selected.
For OMITS, if the value is found, the record is not selected.
Request:

TABLE FILE EMPLOYEE


PRINT DAT_INC
BY HIGHEST BANK_NAME
BY LAST_NAME BY FIRST_NAME
IF BANK_NAME CONTAINS 'ASSOC'
END

Output:
+--------------------------------------------------------------+
| BANK_NAME
LAST_NAME
FIRST_NAME
DAT_INC
|

| -------------------------------|
| BANK ASSOCIATION
CROSS
BARBARA
82/04/09 |
|
81/11/02 |
| ASSOCIATED
BLACKWOOD
ROSEMARIE
82/04/01 |
|
IRVING
JOAN
82/05/14 |
|
82/01/04 |
|
MCKNIGHT
ROGER
82/05/14 |
|
82/02/02 |
+--------------------------------------------------------------+
CONTAINS will include the selected values.
OMITS will not include the selected values.
REPORT FORMATTING
+------------------------------+
|
SET parameter= option
|
+------------------------------+
OR
+--------------------------------------+
|
ON TABLE SET parameter value
|
+--------------------------------------+

Allows you to change parameters of your FOCUS environment such as controlling output.
Can have as many parameters on a line as you can fit. Parameters are separated by a comma.
? SET
To inquire about the current settings--lists them on the screen.
Page 12-5 in Focus Manual.

Request:
SET NODATA=NONE
TABLE FILE FOCUSEXP
PRINT AMT AND ACCTNO
ACROSS ACCTT
BY REGNO BY COID
IF ACCTT EQ '1' OR '3'
IF READLIMIT EQ 15
END

TABLE FILE FOCUSEXP


PRINT AMT AND ACCTNO
ACROSS ACCTT
BY REGNO BY COID
IF ACCTT EQ '1' OR '3'
IF READLIMIT EQ 15
ON TABLE SET NODATA NONE
END

Output:
+----------------------------------------------------------------------+
| PAGE
1
|
|
ACCOUNT_TYPE
|
|
1
3
|
| REGION_NO COMPANY_ID
AMOUNT ACCOUNT_NO
AMOUNT ACCOUNT_NO|
| ------------------------------------------------------------------ |
| 01
11701
5,000.00
10001
NONE NONE
|
|
404.00
10200
NONE NONE
|
|
NONE NONE
200.00
34600
|
| 02
31702
100.00
10001
NONE NONE
|
|
405.00
10003
NONE NONE
|
|
6,000.00
10200
NONE NONE
|
|
NONE NONE
50.00 CR 34600
|
| 03
34608
200.00
10001
NONE NONE
|
|
2,500.00
10003
NONE NONE
|
|
300.00
10200
NONE NONE
|
+----------------------------------------------------------------------+
RECORD RETRIEVAL
TABLEF provides for fastest retrieval of records from a given file.
RULES FOR USE :

1.
2.
3.
4.
5.

Data is already sorted into report format


No across phrases can be used
No multiple verbs
By statements must be in same order as data
By statements can only be used for control break option such as skip-line

NOTE: FOCUS reads in sequential order, NO sorting process.

EXAMPLE:
EX CONMALLC
TABLEF FILE CONAMES
PRINT COID REGION SHORTNM CITYST BEDS
IF FACTYP EQ 'H'
IF STATUS EQ 2
END
FOCUS QUERY REQUEST
(1)

TABLE FILE filename

(2)

{PRINT
}
{LIST
}
{SUM/WRITE}
{COUNT
}

(3)

(ACROSS (HIGHEST) sortfieldn (IN-GROUPS-OF qty))

(4)

(BY (HIGHEST) {n} sortfield (IN-GROUPS-OF qty))


n = # of instances
can be 1 to 32 sortfields

(5)

RANKED BY (TOP
) {n}
(HIGHEST)
(LOWEST )

(6)

(If {field relation value (OR value...)})


(
{RECORDLIMIT EQ n
})
(
{READLIMIT EQ n
})

(7)

{END }
{RUN }
{QUIT}

object1 ({AND

} object2...object95 )

-Can have up to 32 sortfield statements in a request.


COMPUTE
Request:

TABLE FILE EMPLOYEE


SUM GROSS DED_AMT
COMPUTE DG_RATIO/F4.2 = DED_AMT/GROSS;
BY HIGHEST PAY_DATE
END

Output:
+------------------------------------------------------------+
| PAY_DATE
GROSS
DED_AMT
DG_RATIO |
| ------------------------- |
|
|
| 82/08/31
$18,523.84
$9,486.90
.51 |
| 82/07/30
$14,508.84
$7,600.96
.52 |
| 82/06/30
$14,508.84
$7,600.96
.52 |

|
|

82/05/28
82/04/30

$13,698.35
$10,850.68

$7,438.28
$5,448.47

.54
.50

|
|

COMPUTE
Request:

TABLE FILE EMPLOYEE


SUM ED_HRS
COMPUTE STATUS/A10 = IF ED_HRS GE 30 THEN
'REQ. MET' ELSE 'LOW';
BY EID
END

Output:
+------------------------------------------------------------+
|
EMP_ID
ED_HRS
STATUS
|
|
---------------|
|
|
|
071382660
25.00
LOW
|
|
112847612
36.00
REQ. MET
|
|
117593129
50.00
REQ. MET
|
|
119265415
10.00
LOW
|
|
119329144
.00
LOW
|
|
123764317
30.00
REQ. MET
|
|
126724188
5.00
LOW
|
|
219984371
.00
LOW
|
|
326179357
75.00
REQ. MET
|
|
451123478
50.00
REQ. MET
|
|
543729165
25.00
LOW
|
|
818692173
45.00
REQ. MET
|
+------------------------------------------------------------+
DIRECT OPERATIONS
Prefix
-----MAX.
MIN.
AVE.
ASQ.
PCT.
FST.
LST.
TOT.
CNT.
SUM.
RPCT.
ALL.
ST.
CT.

MEANING
------Maximum Field Value
Minimum Field Value
Average Field Value
Average Sum of Squares Field Value
Percent of Column Total
First Retrieved Field Value
Last Retrieved Field Value
Column Total of Field Value
Count of Fields Retrieved
Sum of Fields Retrieved
Percent of Row Total
All Values (with missing descendents)
Subtotal value of field at a sort
break
Running column total of field

USAGE
----MAX.AMT
MIN.AMT
AVE.AMT
ASQ.AMT
PCT.AMT
FST.ACCTNO
LST.COID
TOT.AMT
CNT.ACCTNO
SUM.AMT
RPCT.AMT
ALL.ACCTNO
ST.SALES
CT.CURR_SAL

PREFIX ABBREVIATIONS
Request:

TABLE FILE FOCUSEXP


SUM AMOUNT AND PCT.AMOUNT AND TOT.AMOUNT
BY REGION
END

Output:
+--------------------------------------------------------------------+
|
NUMBER OF RECORDS IN TABLE = 24 LINES = 3
|
|
PAGE 1
|
|
PCT.
TOT.
|

|
REGION_NO
AMOUNT
AMOUNT
AMOUNT
|
|
-----------------------|
|
01
3,404.00
48.60
7.004.00
|
|
02
4,030.00
57.53
7,004.00
|
|
03
430.00 CR
6.13 CR
7,004.00
|
+--------------------------------------------------------------------+
REPORT FORMATTING
REPORT HEADING
PAGE HEADING
COLUMN POSITIONING
COLUMN TITLES
PAGE FOOTING
REPORT FOOTING

Request:

+------------------------------------+
|
TABLE FILE filename
|
|
HEADING(CENTER)
|
|
"
text
"
|
+------------------------------------+
TABLE FILE FOCUSEXP
HEADING
"<10 SAMPLE OUTPUT REPORT <113 PAGE: <TABPAGENO"
"<113 Printed &DATE"
"<113 TIME: &TOD"
"<18 <COID"
"</2"
PRINT AMT ACCTT COSTCTR
BY COID NOPRINT PAGE-BREAK
BY ACCTNO
END

Output:
+---------------------------------------------------------------------+
|
SAMPLE OUTPUT REPORT
PAGE:
1
|
|
PRINTED 8/01/88 |
|
TIME: 08.38.17 |
|
11701
|
|
|
|
|
|
ACCOUNT_NO
AMOUNT ACCOUNT_TYPE COST_CENTER
|
|
--------------- ------------ ----------|
|
10001
5,000.00
1
22
|
|
10200
404.00
1
20
|
|
20030
3,000.00
2
19
|
|
34600
200.00
3
19
|
|
70210
1,000.00 CR 4
32
|
|
80301
4,200.00 CR 4
29
|
+---------------------------------------------------------------------+
+--------------------------+
| TABLE FILE filename
|
| FOOTING(BOTTOM)(CENTER) |
| "
text
"
|
+--------------------------+
TABLE FILE FOCUSEXP
HEADING
"<10 SAMPLE OUTPUT REPORT <113 PAGE:<TABPAGENO"
"<113 Printed &DATE"
"<113 TIME: &TOD"
"<18 <COID"
"</2"
PRINT AMT ACCTT COSTCTR

BY COID NOPRINT PAGE-BREAK


BY ACCTNO
FOOTING CENTER
"HUMANA IS A GREAT COMPANY"
END
+---------------------------------------------------------------------+
|
SAMPLE OUTPUT REPORT
PAGE:
1
|
|
PRINTED 8/01/88 |
|
TIME: 08.38.17 |
|
11701
|
|
ACCOUNT_NO
AMOUNT ACCOUNT_TYPE COST_CENTER
|
|
--------------- ------------ ----------|
|
10001
5,000.00
1
22
|
|
10200
404.00
1
20
|
|
20030
3,000.00
2
19
|
|
34600
200.00
3
19
|
|
70210
1,000.00 CR 4
32
|
|
80301
4,200.00 CR 4
29
|
|
|
|
HUMANA IS A GREAT COMPANY
|
+---------------------------------------------------------------------+
Request:

TABLE FILE EMPLOYEE


PRINT ED_HRS
CURR_JOBCODE
BY LAST_NAME
BY FIRST_NAME
END
Output:
Column 3
Column 20
Column 32 Column 40
|
|
|
|
|
|
|
|
V
V
V
V
+---------------------------------------------------------+
|
LAST_NAME
FIRST_NAME ED_HRS CURR_JOBCODE
|
|
------------------ ------ -----------|
|
|
|
BANNING
JOHN
.00
A17
|
|
.
.
.
.
|
|
.
.
.
.
|
|
.
.
.
.
|
+---------------------------------------------------------+

+------+
| IN n|
+------+
Request:
TABLE FILE EMPLOYEE
PRINT BANK_ACCT
BY BANK_NAME
BY LAST_NAME
END

TABLE FILE EMPLOYEE


PRINT BANK_ACCT IN 1
BY BANK_NAME IN 16
BY LAST_NAME IN 30
END

Output:
+-------------------------------+
+--------------------------------+
| BANK_NAME
LAST_NAME BAN|_AC|T
BANK_ACCT
BANK_NAME|
| ----------------- ---|---|-----------------|

LAST_NAME
---------

|
|
|

GREENSPAN
MCCOY
ROMANS

|
|
|

|
|
|

|
|
|

CHANGING COLUMN TITLES


+---------------------------+
|field AS 'title(, ...title5'|
+---------------------------+
Request:

TABLE FILE EMPLOYEE


SUM ED_HRS AS 'TOTAL,EDUCATION,HOURS'
BY CURR_JOBCODE AS 'CURRENT,JOBCODE'
END

Output:
+-----------------------------+
|
TOTAL
|
|
CURRENT
EDUCATION
|
|
JOBCODE
HOURS
|
|
--------------|
Placing a comma in new column heading forces a new line.
Allows up to 5 lines of heading per column
COLUMN NOTATION
Request:

TABLE FILE FOCUSEXP


SUM AMT
BY REGNO
SUM AMT AND
COMPUTE COPCT = C2 / C1 * 100;
BY REGNO BY ACCTT
END

Output:
+---------------------------------------------------------------------+
|
PAGE
1
|
|
REGION_NO
AMOUNT ACCOUNT_TYPE
AMOUNT
COPCT|
|
-------------- ---------------------|
|
01
3,404.00
1
5,404.00
158.75|
|
2
3,000.00
88.13|
|
3
200.00
5.88|
|
4
5,200.00 CR -152.76|
|
02
4,030.00
1
6,505.00
161.41|
|
2
1,025.00
25.43|
|
3
50.00 CR
-1.24|
|
4
3,450.00 CR
-85.61|
|
03
430.00 CR 1
3,673.00
-854.19|
|
2
718.00
-166.98|
|
3
1,530.00 CR
355.81|
|
4
3,291.00 CR
765.35|
+---------------------------------------------------------------------+
Request:

TABLE FILE FOCUSEXP


PRINT ACCTNO OVER AMT OVER COSTCTR
BY REGNO
BY COID SKIP-LINE
END
Output:
+---------------------------------------------------------------------+
|
PAGE
1
|
|
REGION_NO COMPANY_ID
|

GREENSPAN
MCCOY
ROMANS

|
|
|
|
|
|
|
|
|
|

--------01

Request:

---------11701

ACCOUNT_NO
AMOUNT
COST_CENTER
ACCOUNT_NO
AMOUNT
COST_CENTER
ACCOUNT_NO
AMOUNT
COST_CENTER

10001
5,000.00
22
10200
404.00
20
20030
3,000.00
19

|
|
|
|
|
|
|
|
|
|

TABLE FILE CAR


COUNT MODEL
ACROSS MPG IN-GROUPS-OF 10
BY CAR ROW-TOTAL COLUMN-TOTAL
END

Output:
+---------------------------------------------------------------------+
| PAGE
1
|
|
|
|
|
|
|
|
|
|
MPG
|
|
0
10
20
TOTAL
|
| CAR
|
| ---------------------------------------------|
|
|
| ALFA ROMEO
0
0
3
3
|
| AUDI
0
0
1
1
|
| BMW
0
4
2
6
|
| DATSUN
1
0
0
1
|
| JAGUAR
1
1
0
2
|
| TOTAL
3
6
9
18
|
+-----------------------------------------------------------------+----------------------------+
|
ON fieldname operation |
+----------------------------+
For Instance:
Request:

ON COID SKIP-LINE

TABLE FILE FOCUSEXP


SUM AMT AND CNT.ACCTNO
BY REGNO
BY COID
BY ACCTT
ON COID SUB-TOTAL
END
Output:
+---------------------------------------------------------------------+
|
ACCOUNT_NO
|
| REGION_NO COMPANY_ID ACCOUNT_TYPE
AMOUNT COUNT
|
| --------- ---------- ----------------- ---------|
| 01
11701
1
5,404.00
2
|
|
2
3,000.00
1
|
|
3
200.00
1
|
|
4
5,200.00 CR
2
|
| *TOTAL COMPANY_ID 11701
3,404.00
6
|
| *TOTAL REGION_NO 01
3,404.00
6
|
| 03
34608
1
3,000.00
3
|
|
2
450.00
1
|
|
3
1,575.00 CR
1
|

|
4
2,300.00 CR
1
|
| *TOTAL COMPANY_ID 34608
425.00 CR
6
|
|
34902
1
673.00
3
|
|
2
268.00
1
|
|
3
45.00
1
|
|
4
991.00 CR
1
|
| *TOTAL COMPANY_ID 34902
5.00 CR
6
|
| *TOTAL REGION_NO 03
430.00 CR
12
|
| TOTAL
2,974.00
18
|
+---------------------------------------------------------------------+
Request:

TABLE FILE FOCUSEXP


SUM AMT AND CNT.ACCTNO
BY REGNO
BY COID
BY ACCTT
ON COID SUBTOTAL
END
Output:
+---------------------------------------------------------------------+
|
REGION_NO COMPANY_ID ACCOUNT_TYPE
AMOUNT COUNT
|
|
--------- ---------- ----------------- ---------- |
|
01
11701
1
5,404.00
2 |
|
2
3,000.00
1 |
|
3
200.00
1 |
|
4
5,200.00 CR
2 |
|
*TOTAL COMPANY_ID 11701
3,404.00
6 |
|
03
34608
1
3,000.00
3 |
|
2
450.00
1 |
|
3
1,575.00 CR
1 |
|
4
2,300.00 CR
1 |
|
*TOTAL COMPANY_ID 34608
425.00 CR
6 |
|
34902
1
673.00
3 |
|
2
268.00
1 |
|
3
45.00
1 |
|
4
991.00 CR
1 |
|
*TOTAL COMPANY_ID 34902
5.00 CR
6 |
|
TOTAL
2,974.00
18 |
+---------------------------------------------------------------------+

Request:

TABLE FILE FOCUSEXP


SUM AMT AND CNT.ACCTNO AND
COMPUTE AMTPER = C1 / C2;
BY REGNO BY COID
BY ACCTT
ON COID SUMMARIZE
END

Output:
+---------------------------------------------------------------------+
| REGION_NO COMPANY_ID ACCOUNT_TYPE
AMOUNT COUNT
|
| --------- ---------- ----------------- ---------|
| 01
11701
1
5,404.00
2
|
|
2
3,000.00
1
|
|
3
200.00
1
|
|
4
5,200.00 CR
2
|
| *TOTAL COMPANY_ID 11701
3,404.00
6
|
| *TOTAL REGION_NO 01
3,404.00
6
|
| 03
34608
1
3,000.00
3
|
|
2
450.00
1
|
|
3
1,575.00 CR
1
|
|
4
2,300.00 CR
1
|
| *TOTAL COMPANY_ID 34608
425.00 CR
6
|

AMTPER
-----2,702.00
3,000.00
200.00
-2,600.00
567.33
567.33
1,000.00
450.00
-1,575.00
-2,300.00
-70.83

|
34902
1
673.00
3
|
|
2
268.00
1
|
|
3
45.00
1
|
|
4
991.00 CR
1
|
| *TOTAL COMPANY_ID 34902
5.00 CR
6
|
| *TOTAL REGION_NO 03
430.00 CR
12
|
| TOTAL
2,974.00
18
|
+---------------------------------------------------------------------+

Request:

224.33
268.00
45.00
-991.00
-.83
-35.83
165.22

TABLE FILE FOCUSEXP


SUM AMT AND CNT.ACCTNO AND
COMPUTE AMTPER = C1 / C2;
BY REGNO BY COID
BY ACCTT
ON COID RECOMPUTE
END

Output:
+---------------------------------------------------------------------+
|
ACCOUNT_NO
|
| REGION_NO COMPANY_ID ACCOUNT_TYPE
AMOUNT COUNT
|
| --------- ---------- ----------------- ---------|
| 01
11701
1
5,404.00
2
|
|
2
3,000.00
1
|
|
3
200.00
1
|
|
4
5,200.00 CR
2
|
| *TOTAL COMPANY_ID 11701
3,404.00
6
|
| 03
34608
1
3,000.00
3
|
|
2
450.00
1
|
|
3
1,575.00 CR
1
|
|
4
2,300.00 CR
1
|
| *TOTAL COMPANY_ID 34608
425.00 CR
6
|
|
34902
1
673.00
3
|
|
2
268.00
1
|
|
3
45.00
1
|
|
4
991.00 CR
1
|
| *TOTAL COMPANY_ID 34902
5.00 CR
6
|
| TOTAL
2,974.00
18
|
+---------------------------------------------------------------------+
Request:
TABLE FILE FOCUSEXP
PRINT ACCTNO AND AMT
BY REGNO BY COID
ON REGNO PAGE-BREAK
END
Output:
+-----------------------------------------------------------+
|
REGION_NO COMPANY_ID ACCOUNT_NO
AMOUNT
|
|
--------- ---------- --------------|
|
01
11701
10001
5,000.00
|
|
10200
404.00
|
|
20030
3,000.00
|
|
34600
200.00
|
|
70210
1,000.00 CR
|
|
80301
4,200.00 CR
|
|
PAGE
2
|
|
REGION_NO COMPANY_ID ACCOUNT_NO
AMOUNT
|
|
--------- ---------- --------------|
|
03
34608
10001
200.00
|
|
10003
2,500.00
|
|
10200
300.00
|
|
20030
450.00
|
|
34600
1,575.00 CR
|
|
80301
2,300.00 CR
|

AMTPER
-----2,702.00
3,000.00
200.00
2,600.00
567.33
1,000.00
450.00
1,575.00
2,300.00
-70.83
224.33
268.00
45.00
-991.00
-.83
165.22

|
34902
10001
260.00
|
|
10003
428.00
|
|
10200
15.00 CR
|
|
20030
268.00
|
|
34600
45.00
|
|
80301
991.00 CR
|
+-----------------------------------------------------------+

Request:

SET PAGE = OFF


TABLE FILE FOCUSEXP
PRINT ACCTNO AND AMT
BY REGNO
BY COID
ON REGNO SKIP-LINE
END

Output:
+---------------------------------------------------------+
|
REGION_NO COMPANY_ID ACCOUNT_NO
AMOUNT
|
|
--------- ---------- --------------|
|
01
11701
10001
5,000.00
|
|
10200
404.00
|
|
20030
3,000.00
|
|
34600
200.00
|
|
70210
1,000.00 CR
|
|
80301
4,200.00 CR
|
|
|
|
03
34608
10001
200.00
|
|
10003
2,500.00
|
|
10200
300.00
|
|
20030
450.00
|
|
34600
1,575.00 CR
|
|
80301
2,300.00 CR
|
|
34902
10001
260.00
|
|
10003
428.00
|
|
10200
15.00 CR
|
|
20030
268.00
|
|
34600
45.00
|
|
80301
991.00 CR
|
+---------------------------------------------------------+
FOCEXEC
FOCEXEC is a FOCUS executable procedure.
FOCUS program is stored as a member in the 'TEST.FOCUS.EXEC' dataset.
Can include the TSO ALLOC statement in the FOCEXEC.
-* indicates that the line is a comment.
-TYPE MESSAGE sends the message to the screen.
To execute the FOCEXEC:
Go into FOCUS.
Type EX MEMBERNAME. Example:

EX TRxx01.

Request:
-* This program ....
TABLE FILE CAR
COUNT MODEL
ACROSS MPG IN-GROUPS-OF 10
BY CAR ROW-TOTAL COLUMN-TOTAL
END
-TYPE PROCESSING ENDS
Output:

+---------------------------------------------------------------------+
| PAGE
1
|
|
|
|
MPG
|
|
0
10
20
TOTAL
|
| CAR
|
| ---------------------------------------------|
|
|
| ALFA ROMEO
0
0
3
3
|
| AUDI
0
0
1
1
|
| BMW
0
4
2
6
|
| DATSUN
1
0
0
1
|
| JAGUAR
1
1
0
2
|
| JENSEN
0
1
0
1
|
| MASERATI
1
0
0
1
|
| PEUGEOT
0
0
1
1
|
| TOYOTA
0
0
1
1
|
| TRIUMPH
0
0
1
1
|
|
|
| TOTAL
3
6
9
18
|
+---------------------------------------------------------------------+
EXTRACTING FILES
Request:
TABLE FILE EMPLOYEE
SUM CURR_SAL
ACROSS DEPARTMENT
BY CURR_JOBCODE
END

TABLE FILE EMPLOYEE


SUM CURR_SAL
ACROSS DEPARTMENT
BY CURR_JOBCODE
ON TABLE HOLD
END

Output:
+-----------------------------------++--------------------------------+
|
DEPARTMENT
||
|
| CURR_JOBCODE
MIS
PRODUCTION
|| ? hold
|
| __________________________________||
|
| A01
.
$9,500.00|| DEFINITION OF CURRENT HOLD FILE|
| A07
$9,000.00
$11,000.00||
|
| A15
.
$26,862.00|| FIELDNAME
ALIAS
FORMAT |
| A17
$27,062.00
$29,700.00||
|
| B02
$18,480.00
$16,100.00|| CURR_JOBCODE
E01
A3
|
| B03
$18,480.00
.|| CURR_SAL
E02
D12.2M |
| B04
$21,780.00
$21,120.00|| CURR_SAL
E03
D12.2M |
| B14
$13,200.00
.||
|
+-----------------------------------++--------------------------------+
DEFINE FILE
Creates new fields based on existing database field values.
Changes field length to accommodate sums and totals.
Changes field format so FOCUS special functions can be used.
Creates new fields using FOCUS special functions.
Defined fields are temporary.
Exist only for this FOCUS session.
Defined fields may also be put into the file's Master File
Description if the expression uses fields from that segment only.

+----------------------------------------+
| DEFINE FILE filename
|
|
fieldname (/format)=expression;
|
| .
|

| .
|
| .
|
| END
|
+----------------------------------------+
where:
fieldname
format
expression

1-12 characters.
Any format allowed for field descriptions in FOCUS.
Default format is D12.2
Any value compatible with the format, or
Any arithmetic expression, or
Any logical expression.
Required to indicate the end of the expression.

;
1. Enter:
? DEFINE
2. The system will respond with:

FILE
FIELD NAME
EMPLOYEE INCREASE
EMPLOYEE BANK_COST

FORMAT
D8.2
F6.2

FIELDNO
36
37

SEGNO
ADDR VIEW
1
00063138
2
00063234

TYPE

IF STATEMENTS
Request:
DEFINE FILE FOCUSEXP
NEWAMT/P10.2=IF ACCTNO IS '10001' THEN AMT * 1.25 ELSE
IF ACCTNO IS '34600' THEN AMT * 2 ELSE
AMT;
END
TABLE FILE FOCUSEXP
SUM NEWAMT AND AMT
BY REGNO
BY COID
BY ACCTT
END
Output:
+----------------------------------------------------------------------+
|PAGE
1
|
|REGION_NO COMPANY_ID ACCOUNT_TYPE
NEWAMT
AMOUNT |
|--------- ---------- ---------------------- |
|01
11701
1
6,654.00
5,404.00
|
|
2
3,000.00
3,000.00
|
|
3
400.00
200.00
|
|
4
-5,200.00
5,200.00 CR |
|02
31702
1
6,530.00
6,505.00
|
|
2
1,025.00
1,025.00
|
|
3
-100.00
50.00 CR |
|
4
-3,450.00
3,450.00 CR |
|03
34608
1
3,050.00
3,000.00
|
|
2
450.00
450.00
|
|
3
-3,150.00
1,575.00 CR |
|
4
-2,300.00
2,300.00 CR |
|
34902
1
738.00
673.00
|
|
2
268.00
268.00
|
|
3
90.00
45.00
|
|
4
-991.00
991.00 CR |
+----------------------------------------------------------------------+

CONCATENATION
Request:

DEFINE FILE FOCUSEXP


NOTE/A1=IF AMT GT 2000 THEN '*' ELSE ' ';
NACCT/A6=NOTE|ACCTNO;
END
TABLE FILE FOCUSEXP
PRINT NACCT AND AMT
BY COID
END

Output:
+----------------------------------------------------------+
|
PAGE
1
|
|
COMPANY_ID NACCT
AMOUNT
|
|
---------- ---------|
|
11701
*10001
5,000.00
|
|
10200
404.00
|
|
*20030
3,000.00
|
|
34600
200.00
|
|
70210
1,000.00 CR
|
|
80301
4,200.00 CR
|
|
31702
10001
100.00
|
|
10003
405.00
|
|
*10200
6,000.00
|
|
20030
1,025.00
|
|
34600
50.00 CR
|
|
80301
3,450.00 CR
|
Request:

DEFINE FILE EMPLOYEE


NEWNAME/A26=LN||','||FN;
NEWNAME2/A26=LN|','|FN;
END
TABLE FILE EMPLOYEE
PRINT NEWNAME
NEWNAME2
END

Output:
+----------------------------------------------------------+
|
PAGE
1
|
|
NEWNAME
NEWNAME2
|
|
-------------|
|
STEVENS,ALFRED
STEVENS
,ALFR|D
|
SMITH,MARY
SMITH
,MARY|
|
JONES,DIANE
JONES
,DIAN|
|
SMITH,RICHARD
SMITH
,RICH|RD
|
BANNING,JOHN
BANNING
,JOHN|
|
IRVING,JOAN
IRVING
,JOAN|
|
ROMANS,ANTHONY
ROMANS
,ANTH|NY

CHARACTER CONVERSION
Request:

DEFINE FILE FOCUSEXP


NACCT/P5=EDIT(ACCTNO);
CHGACCT/P5=NACCT + 1;
STATE/A2=EDIT(COID,'$99$$');
SPLIT/A6=EDIT(ACCTNO,'999-99');
END
TABLE FILE FOCUSEXP

PRINT COID AND STATE AND CHGACCT AND SPLIT


END
Output:
+----------------------------------------------------------+
|
PAGE
1
|
|
COMPANY_ID STATE CHGACCT SPLIT
|
|
---------- ----- ------- ----|
|
11701
17
10002 100-01
|
|
11701
17
10201 102-00
|
|
11701
17
20031 200-30
|
|
11701
17
34601 346-00
|
|
11701
17
70211 702-10
|
|
11701
17
80302 803-01
|
DECODE

Request:
DEFINE FILE FOCUSEXP
ACCT_GROUP/A12=DECODE ACCTT (1 ASSETS 2 LIABILITIES
'3' 'REVENUE'
'4' 'EXPENSES' ELSE 'ERROR');
END
TABLE FILE FOCUSEXP
PRINT ACCTNO AND AMT
BY ACCT_GROUP
END
Output:
+----------------------------------------------------------+
|
PAGE
1
|
|
ACCT_GROUP
ACCOUNT_NO
AMOUNT
|
|
-----------------------|
|
ASSETS
10001
5,000.00
|
|
10200
404.00
|
|
10200
6,000.00
|
|
10001
260.00
|
|
10003
428.00
|
|
10200
15.00 CR
|
|
EXPENSES
70210
1,000.00 CR
|
|
80301
4,200.00 CR
|
|
80301
3,450.00 CR
|
|
80301
2,300.00 CR
|
|
80301
991.00 CR
|
|
LIABILITIES
20030
3,000.00
|
|
20030
1,025.00
|
|
20030
450.00
|
|
20030
268.00
|

NEW DATE FORMATS


The new DATE formats make it possible to:
Sort by date regardless of display format
Define date components such as year, month, quarter, etc. and extract them easily from
date fields
Do arithmetic with dates and date comparisons without using special date handling
functions
Reference dates in a natural way, such as JAN 1 1985, without regard to formats
Automatically validate dates in transactions
Convert dates easily to other formats

FOR EXAMPLE:
BY ORDERDATE
Sorts dates into date sequence regardless of the display format
DAYS/I4=SHIPDATE-ORDERDATE;
Computes the elapsed number of days between two dates
regardless of their display format.
DAYS/I4=SHIPDATE-'JAN 1 1985'; Computes the elapsed number of days regardless of the
Display format
SHIPMONTH/MONTH=SHIPDATE;
Extracts the month from SHIPDATE
For example if SHIPDATE is December 24,1985, SHIPMONTH IS
12, but would be printed as "DECEMBER".
SHIPMONTH/M=SHIPMONTH + 3;
Always produces a valid month value in the range 1 to 12.
For example, if the value of SHIPMONTH is 12 then
SHIPMONTH + 3 is 3.
SHIPMONTH/YM=SHIPDATE;
The year and month are extracted from shipdate.
In basic date formats, the components are separated by /.The separating character can be
changed.
EXAMPLES:
FORMAT
DISPLAY
__________________________
YMD
Y-M-D
Y.M.D
Y|M|D
YBMBD

85/11/22
85-11-22
85.11.22
851122
85 11 22

DATE EDIT OPTIONS:


+----------+------------+----------------------------------------------+
|
OPTION | MEANING
|
EFFECT
|
|
D
|
Day
|
Prints a value of 1 to 31 for the day.
|
+----------+------------+----------------------------------------------+
|
M
| Month
|
Prints a value of 1 to 12 for the month.
|
+----------+------------+----------------------------------------------+
|
Y
|
Year
|
Prints a two-digit year.
|
+----------+------------+----------------------------------------------+
|
YY
| Century
|
Prints additional 2 characters. Ex: 1991. |
+----------+------------+----------------------------------------------+
|
Q
| Quarter
|
Prints the quarter (1-4).
|
+----------+------------+----------------------------------------------+
|
W
|Day of Week |
Prints number of day of week.
|
|
|
|
(1-7, where Mon = 1)
|
+----------+------------+----------------------------------------------+
|
w
|Day of Week |
Prints abbreviated name of day of week.
|
+----------+------------+----------------------------------------------+
|
T
| Translate |
Prints the month/day as a 3-char. abbrev. |
+----------+------------+----------------------------------------------+
|
t
| Translate |
Same as above except 1st char. is uppercase|
|
|
|
and last 2 are lowercase.
|
+----------+------------+----------------------------------------------+
|
TR
| Translate |
Prints the month/day entire name in
|
|
|
|
uppercase.
|
+----------+------------+----------------------------------------------+
|
tr
| Translate |
Same as above except 1st char. is uppercase|
|
|
|
and the rest are lowercase.
|
+----------+------------+----------------------------------------------+

MONTH TRANSLATION:
Usage
----MT

Meaning
------short form upper case

Example
------JAN

MTR

complete upper case

JANUARY

DAY OF WEEK TRANSLATION:


WT
short form upper case
MON
WTR or
complete upper case
MONDAY
WR
If the date is December 24, 1984 which was a Thursday:
+------------------------------------------------+
| Usage
Result
|
| ---------|
| MTRDYY
DECEMBER 24, 1984
|
| MTDYY
DEC 24, 1984
|
| MTRDYYW
DECEMBER 24 1984, THU
|
| WRMTRDYY
THURSDAY, DECEMBER 24 1984 |
| WTR
THURSDAY
|
| W
4
|
+------------------------------------------------+
Masterfile:
FIELDNAME=HIRE_DATE
Request:

,HDT

,YMD

,$

DEFINE FILE EMP50


HIRED/wrMtrDYY=HIRE_DATE; TITLE='DATE OF HIRE'
END
TABLE FILE EMP50
PRINT LAST_NAME HIRED
IF HIRE_DATE LT '1985 DEC 31'
END

Output:
+----------------------------------------------------------+
|
PAGE 1
|
|
LAST_NAME
DATE OF HIRE
|
|
-------------------|
|
STEVENS
Saturday, June 2 1980
|
|
JONES
Monday, May 1 1980
|
|
BROWN
Saturday, November 25 1985
|
+----------------------------------------------------------+
Masterfile:
FIELDNAME=HIRE_DATE

,HDT

,YMD

,$

Request:
DEFINE FILE EMP50
HIREMO/YM=HIRE_DATE;
HIRED/wrMtrDYY=HIRE_DATE:
END
TABLE FILE EMP50
PRINT LAST_NAME HIREMO AS 'MONTH AND YEAR HIRED'
HIRED as 'DATE OF HIRE' AND
COMPUTE DOS/I4='1985 DEC 31' - HDT; AS 'DAYS,OF,SERVICE' AND
COMPUTE LOS/I4=DOS/30; AS 'MONTHS,OF,SERVICE'
IF HIRE_DATE LT '1985 DEC 31'
END
Output:
+---------------------------------------------------------------------+
|
PAGE 1
|
|
MONTH
DAYS
MONTHS
|
|
AND YEAR
OF
OF
|
| LAST_NAME
HIRED
DATE OF HIRE
SERVICE SERVICE
|

| ---------------- ------------------ ------|


| STEVENS
80/06
Saturday, June 2 1980
2038
67
|
| JONES
80/05
Monday, May 1 1980
1340
44
|
| BROWN
85/11
Saturday, November 25 1985
36
1
|
+---------------------------------------------------------------------+
NO DATE FORMAT A6,P6,I6
___________________________________
OLD DATE FORMAT A6MDY,P6MDY,I6MDY
___________________________________
NEW DATE FORMAT MDY,YMD
___________________________________
In order to use the NEW DATE format you must first convert The NO DATE format to the OLD
DATE format then to the NEW DATE format.
Masterfile:
FIELDNAME=HIRE_DATE,
Request:

ALIAS=HDT,

FORMAT=I6YMD,

DEFINE FILE EMPLOYEE


NEW_DATE/MDY=HIRE_DATE;
LOS1/I4='JAN 1 1983' - NEW_DATE;
PENS_ELIG/A3 = IF LOS1 GE 365 OR CURR_JOBCODE EQ 'A17'
THEN 'YES' ELSE 'NO';
END
TABLE FILE EMPLOYEE
PRINT LOS1 CURR_JOBCODE AS JOB
NEW_DATE HIRE_DATE
BY LAST_NAME BY FIRST_NAME
IF PENS_ELIG EQ 'YES'
END

Output:
+---------------------------------------------------------------------+
| PAGE
1
|
| LAST_NAME
FIRST_NAME
LOS1
JOB
NEW_DATE HIRE_DATE |
| ------------------------------ --------- |
|
|
| BANNING
JOHN
153
A17
08/01/82 82/08/01
|
| CROSS
BARBARA
425
A17
11/02/81 81/11/02
|
| MCCOY
JOHN
549
B02
07/01/81 81/07/01
|
| SMITH
MARY
549
B14
07/01/81 81/07/01
|
| STEVENS
ALFRED
943
A07
06/02/80 80/06/02
|
+---------------------------------------------------------------------+
VERB SUMMARY
A REQUEST STATEMENT MAY HAVE UP TO 6 SETS OF VERBS AND ASSOCIATED
SORT CONDITIONS.
NOTE: MUST HAVE SUM BEFORE LIST OR PRINT.
TABLE FILE FOCUSEXP
Request Set 1) SUM AVE.AMOUNT
BY REGION_NO
Request Set 2) PRINT ACCOUNT_NO COST_CENTER
BY REGION_NO
BY COMPANY_ID
END
Output:
+---------------------------------------------------------------------+
|
AVE
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|

REGION_NO
--------01

AMOUNT
-----567.33

COMPANY_ID
---------11701

02

671.66

31702

ACCOUNT_NO
---------10001
10200
20030
34600
70210
80301
10001
10003
10200
20030
34600
80301

COST_CENTER|
-----------|
22
|
20
|
19
|
19
|
32
|
29
|
22
|
18
|
20
|
19
|
19
|
29
|

WHEN
Extension of the ON phrase.
Performs conditional printing at break points in a report.
Determines when options such as "ON fieldname SUBTOTAL" appear in the report.
If the WHEN clause is used with SUBHEAD or SUBFOOT, it must be placed on the line
following the text.
ON fieldname option WHEN expression (;)
OPTION:

Allowable control option (SUBTOTAL, PAGE-BREAK, etc.)

EXPRESSION:

Request:

Any expression which evaluates to True/False.


All alphanumeric literals must be enclosed within single
quotation marks.
TABLE FILE FOCUSEXP
SUM AMT AND CNT.ACCTNO
BY REGNO
BY COID
BY ACCTT
ON COID SUBTOTAL
SUBFOOT
"** THIS IS THE CORPORATE OFFICE **"
WHEN COID EQ '11701'
END
Output:
+---------------------------------------------------------------------+
|
REGION_NO COMPANY_ID ACCOUNT_TYPE
AMOUNT COUNT
|
|
--------- ---------- ----------------- ---------|
|
01
11701
1
5,404.00
|
|
2
3,000.00
|
|
3
200.00
|
|
4
5,200.00 CR
|
|
*TOTAL COMPANY_ID 11701
3,404.00
|
|
** THIS IS THE CORPORATE OFFICE **
|
|
02
31702
1
6,505.00
|
|
2
1,025.00
|
|
3
50.00 CR
|
|
4
3,450.00 CR
|
|
*TOTAL COMPANY_ID 31702
4,030.00
|

WHERE Clause
Allows:
Field to field comparisons
Complex record screens
May replace some DEFINE statements
Syntax:
WHERE <expression> {;}

Field-To-Field Comparison
Request:
DEFINE FILE EMPLOYEE
FLAG/I1=IF CSAL * 1.1 GT 25000
THEN 1 ELSE 0;
END
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME CSAL
BY EID
IF FLAG EQ 1
END

TABLE FILE EMPLOYEE


PRINT LAST_NAME FIRST_NAME CSAL
BY EID
WHERE CSAL * 1.1 GT 25000
END

Output:
+-------------------------------------------------------------------+
|
EMP_ID
LAST_NAME
FIRST_NAME
CURR_SAL |
|
----------------------------- |
|
119329144
BANNING
JOHN
$29,700,00 |
|
123764317
IRVING
JOAN
$26,862,00 |
|
818692173
CROSS
BARBARA
$27,062,00 |
+-------------------------------------------------------------------+
Complex Record Screening
Request: TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
CURR_JOBCODE JOBCODE AS 'PREVIOUS'
BY DEPARTMENT BY EMP_ID
WHERE DEPARTMENT EQ 'MIS'
OR CURR_JOBCODE NE JOBCODE
END
Output:
+---------------------------------------------------------------------+
| DEPARTMENT
EMP_ID
LAST_NAME
FIRST_NAME CURR_JOBCODE PREVIOU|
| -------------------------------- ------------ -------|
| MIS
112847612 SMITH
MARY
B14
B14
|
|
117593129 JONES
DIANE
B03
B03
|
|
JONES
DIANE
B03
B02
|
|
219984371 MCCOY
JOHN
B02
B02
|
|
326179357 BLACKWOOD
ROSEMARIE
B04
B04
|
|
543729165 GREENSPAN
MARY
A07
A07
|
|
GREENSPAN
MARY
A07
B01
|
|
818692173 CROSS
BARBARA
A17
A17
|
|
CROSS
BARBARA
A17
A16
|
| PRODUCTION
119265415 SMITH
RICHARD
A01
B01
|
|
123764317 IRVING
JOAN
A15
A14
|
+---------------------------------------------------------------------+
WHERE TOTAL CLAUSE
WHERE screening conditions are applied to values in the internal matrix report.
Rows are eliminated before the report is printed.
Any TRUE/FALSE expression is permitted.
Alphanumeric literals must be enclosed within quotation marks(').
Syntax:
WHERE TOTAL <expression> {;}
Request: TABLE FILE EMPLOYEE
SUM SAL AND AVE.SAL AND COMPUTE PROJ_SAL = LST.SAL * 1.1;
BY EID
WHERE TOTAL SAL GT 30000
OR AVE.SAL GT 20000
OR PROJ_SAL LT 10000
END

Output:
+---------------------------------------------------------------+
|
AVE
|
| EMP_ID
SALARY
SALARY
PROJ_SAL |
| ----------------------- |
| 117593129
$36,230.00
$18,115.00
19.525.00 |
| 119265415
$18,550.00
$9,275.00
9,955.00 |
| 119329144
$29,700.00
$29,700.00
32,670.00 |
| 123764317
$51,282.00
$26,641.00
26,862.00 |
WHERE LIKE Clause

+-------------------------------------------+
|
WHERE field LIKE 'mask|
_____
______
|
WHERE NOT field LIKE 'mas|'
_____
______
+-------------------------------------------+
Used to select records based on pattern matching.
field -- can be any valid alphanumeric fieldname or alias.
'mask' -- Pattern used to match records.
Rules:
Must be enclosed in quotes.
Underscore ( _ ) matches any single character.
Percent ( % ) matches any sequence of characters.
Request:
TABLE FILE CAR
PRINT CAR BODYTYPE BY COUNTRY
WHERE BODYTYPE LIKE '%O%E%'
END
Output:
+-------------------------------------------------------------------+
|
COUNTRY
CAR
BODYTYPE
|
|
---------------|
|
ENGLAND
JAGUAR
CONVERTIBLE
|
|
ITALY
ALFA ROMEO
COUPE
|
|
ALFA ROMEO
ROADSTER
|
|
MASERATI
COUPE
|
+-------------------------------------------------------------------+
QUALIFING FIELDS: WITHIN
Reuqest:

TABLE FILE FOCUSEXP


SUM PCT.AMOUNT/P10.2 WITHIN COID
BY COID SUB-TOTAL
BY ACCTT
END

Output:
+----------------------------------------------------------+
|
PCT
|
|
COMPANY_ID ACCOUNT_TYPE
AMOUNT
|
|
---------- ----------------|
|
11701
1
158.75
|
|
2
88.13
|
|
3
5.87
|
|
4
-152.76
|
|
*TOTAL 11701
99.99
|

MATCH COMMAND
File matching is used when data from two different databases is
necessary to produce a single report.
+-------------------------------------------------------------+
|
MATCH FILE EMPLOYEE
|
|
WRITE LAST_NAME FIRST_NAME
|
|
BY JOBCODE
|
|
RUN
|
|
FILE JOBFILE
|
|
WRITE JOB_DESC
|
|
BY JOBCODE
|
|
AFTER MATCH HOLD OLD
|
|
END
|
+-------------------------------------------------------------+
This request will produce a single HOLD file containing the JOBCODE, JOB DESCRIPTION, LAST
NAME and FIRST NAME fields.
Match command can merge up to 6 files in one request
Match cannot use across, total or compute
Match retrieves records from 1st file then 2nd file compares the records based on by's and
verb's
It is important to understand the "one-to-many" relationship.
SUM can generate ONE RECORD FROM MANY while
PRINT copies EACH individual RECORD.
Request 1:

Request 2:

MATCH FILE EMPLOYEE


WRITE LAST_NAME FIRST_NAME
BY JOBCODE
RUN
FILE JOBFILE
WRITE JOB_DESC
BY JOBCODE
AFTER MATCH HOLD OLD
END
TABLE FILE HOLD
PRINT *
END

MATCH FILE EMPLOYEE


PRINT LAST_NAME FIRST_NAME
BY JOBCODE
RUN
FILE JOBFILE
WRITE JOB_DESC
BY JOBCODE
AFTER MATCH HOLD OLD
END
TABLE FILE HOLD
PRINT *
END

Output 1
+---------------------------------------------------------------+
|PAGE
1
|
|JOBCODE LAST_NAME
FIRST_NAME JOB_DESC
|
|------- ------------------ -------|
|A01
SMITH
RICHARD
PRODUCTION CLERK
|
|A07
GREENSPAN
MARY
SECRETARY
|
|A14
IRVING
JOAN
SUPERVISOR/PRODUCTION
|
|A15
IRVING
JOAN
ASSIST.MANAGER
|
|A16
CROSS
BARBARA
MANAGER
|
|A17
CROSS
BARBARA
DEPARTMENT MANAGER
|
|B01
GREENSPAN
MARY
PROGRAMMER TRAINEE
|
|B02
MCKNIGHT
ROGER
PROGRAMMER
|
|B03
JONES
DIANE
PROGRAMMER ANALYST
|
|B04
BLACKWOOD
ROSEMARIE
SYSTEMS ANALYST
|
|B14
SMITH
MARY
FILE QUALITY
|
+---------------------------------------------------------------+
Output 2

+---------------------------------------------------------------+
|PAGE
1
|
|JOBCODE LAST_NAME
FIRST_NAME JOB_DESC
|
|------- ------------------ -------|
|A01
SMITH
RICHARD
PRODUCTION CLERK
|
|A07
STEVENS
ALFRED
SECRETARY
|
|A07
STEVENS
ALFRED
SECRETARY
|
|A07
GREENSPAN
MARY
SECRETARY
|
|A14
IRVING
JOAN
SUPERVISOR/PRODUCTION
|
|A15
IRVING
JOAN
ASSIST.MANAGER
|
|A16
CROSS
BARBARA
MANAGER
|
|A17
BANNING
JOHN
DEPARTMENT MANAGER
|
|A17
CROSS
BARBARA
DEPARTMENT MANAGER
|
|B01
SMITH
RICHARD
PROGRAMMER TRAINEE
|
|B01
GREENSPAN
MARY
PROGRAMMER TRAINEE
|
|B02
JONES
DIANE
PROGRAMMER
|
|B02
MCCOY
JOHN
PROGRAMMER
|
|B02
MCKNIGHT
ROGER
PROGRAMMER
|
|B02
MCKNIGHT
ROGER
PROGRAMMER
|
|B03
JONES
DIANE
PROGRAMMER ANALYST
|
|B04
ROMANS
ANTHONY
SYSTEMS ANALYST
|
|B04
BLACKWOOD
ROSEMARIE
SYSTEMS ANALYST
|
|B14
SMITH
MARY
FILE QUALITY
|
+---------------------------------------------------------------+

MATCH FILE DISPOSITIONS


OLD-OR-NEW
Union, all values from both files (Default when disposition is not
Specified)
OLD-AND-NEW
Intersection, the values common to both files
OLD-NOT-NEW
Only in the OLD file
NEW-NOT-OLD
Only in the NEW file
OLD-NOR-NEW
Only in the OLD file or only in NEW
OLD
OLD and matches from NEW
NEW
NEW and matches from OLD

Request:
MATCH FILE EMPLOYEE
SUM LAST_NAME BY EMP_ID
RUN
FILE EDUCFILE
SUM COURSE_CODE BY EMP_ID
AFTER MATCH HOLD OLD
END
TABLE FILE HOLD
PRINT *
END

MATCH FILE EMPLOYEE


SUM LAST_NAME BY EMP_ID
RUN
FILE EDUCFILE
SUM COURSE_CODE BY EMP_ID
AFTER MATCH HOLD NEW
END
TABLE FILE HOLD
PRINT *
END

Output:
+-----------------------------------++----------------------------------+
| EMP_ID
LAST_NAME
COURSE_CODE||EMP_ID
LAST_NAME
COURSE_CODE|
| ------------------------||------------------------|
| 071382660 STEVENS
101
||071382660 STEVENS
101
|
| 112847612 SMITH
103
||112847612 SMITH
103
|
| 117593129 JONES
203
||117593129 JONES
203
|
| 119265415 SMITH
108
||119265415 SMITH
108
|
| 119329144 BANNING
||212289111
103
|
| 123764317 IRVING
||315548712
108
|
| 126724188 ROMANS
||326179357 BLACKWOOD
301
|
| 219984371 MCCOY
||451123478 MCKNIGHT
101
|
| 326179357 BLACKWOOD
301
||818692173 CROSS
302
|
| 451123478 MCKNIGHT
101
||
|

| 543729165 GREENSPAN
||
|
| 818691273 CROSS
302
||
|
+-----------------------------------++----------------------------------+
Request:
MATCH FILE EMPLOYEE
SUM LAST_NAME BY EMP_ID
RUN
FILE EDUCFILE
SUM COURSE_CODE BY EMP_ID
AFTER MATCH HOLD OLD-OR-NEW
END
TABLE FILE HOLD
PRINT *
END

MATCH FILE EMPLOYEE


SUM LAST_NAME BY EMP_ID
RUN
FILE EDUCFILE
SUM COURSE_CODE BY EMP_ID
AFTER MATCH HOLD OLD-AND-NEW
END
TABLE FILE HOLD
PRINT *
END

Output:
+-----------------------------------++----------------------------------+
| EMP_ID
LAST_NAME
COURSE_CODE||EMP_ID
LAST_NAME
COURSE_CODE|
| ------------------------||------------------------|
| 071382660 STEVENS
101
||071382660 STEVENS
101
|
| 112847612 SMITH
103
||112847612 SMITH
103
|
| 117593129 JONES
203
||117593129 JONES
203
|
| 119265415 SMITH
108
||119265415 SMITH
108
|
| 119329144 BANNING
||326179357 BLACKWOOD
301
|
| 123764317 IRVING
||451123478 MCKNIGHT
101
|
| 126724188 ROMANS
||818692173 CROSS
302
|
| 212289111
103
||
|
| 219984371 MCCOY
||
|
| 615548712
108
||
|
| 326179357 BLACKWOOD
301
||
|
| 451123478 MCKNIGHT
101
||
|
| 543729165 GREENSPAN
||
|
| 818692173 CROSS
302
||
|
+-----------------------------------++----------------------------------+
Request:

MATCH FILE FOCUSEXP


SUM AMOUNT CNT.ACCOUNT_NO
BY COMPANY_ID as COID
BY REGION_NO
RUN
FILE COMASTER
WRITE CONAME BEDS
BY COID
AFTER MATCH HOLD as HOLD1 OLD-AND-NEW
END
? HOLD HOLD1
TABLE FILE HOLD1
PRINT E03
E04 as 'ACCT,NO'
E06
BY E02
BY E05 SKIP-LINE
END

Output:
+---------------------------------------------------------------------+
| PAGE
1
|
|
ACCT
|
| REGION_NO CONAME
AMOUNT
NO
BEDS
|
| --------- ----------- -----|
| 01
HUMANA INC.
3,404.00
6 0000
|
| 02
AUDUBON HOSPITAL
4,030.00
6 0484
|

| 03
GREENBRIER VALLEY HOSPITAL
5.00 CR
6 0122
|
|
RESTON N/P
425.00 CR
6 0000
|
+---------------------------------------------------------------------+
JOIN COMMAND
THE FORMAT OF A SIMPLE JOIN COMMAND
-------------------------------------*************************************************************
JOIN field1 in HOSTFILE TO (ALL) field2 in CRFILE as JOINNAME
*************************************************************
Join command is very similar to a match, however it is much more efficient.
Join does not create a file like match. Just lets you use two files as one.
The format for the two fields specified in the JOIN must be the same.
Up to 16 JOIN commands may be issued for any combination of files.
Join commands are active for current FOCUS session or until you release the connection.
FIELD2 must be indexed. (FIELDTYPE=I)
Join does not always work with sequential files.
The first file is called the 'HOST FILE' and the other is the 'CROSS-REFERENCED FILE'.
Each time FOCUS retrieves a record from the HOST FILE. It then retrieves the records in
the CROSS-REFERENCED FILE containing this value.
Join releases all pre-existing DEFINEd fields for the file being joined.
+-----------------------------------+
|
Check File(filename) Picture
|
+-----------------------------------+
shows the actual structure of the join.
+---------------------------------------------------------------------+
|
JOIN COID IN FOCUSEXP TO COID IN COMASTER AS CDONE
|
|
? JOIN
|
|
CHECK FILE FOCUSEXP PICTURE
|
|
TABLE FILE FOCUSEXP
|
|
SUM AMOUNT
|
|
BY CONAME SKIP-LINE
|
|
BY COID NOPRINT
|
|
BY ACCOUNT_NO
|
|
END
|
+---------------------------------------------------------------------+
DEFINE-based JOIN
----------------In addition to the simple JOIN command, another JOIN syntax is the DEFINE-based JOIN which
allows the field in the host file to be created by a DEFINE statement. The corresponding
field in the cross-referenced file must be a real database field.
The DEFINE command must bE BETWEEN THE JOIN AND TABLE. JOIN'S CLEAR defines. The JOIN
command must fit on one line.
THE FORMAT OF THE DEFINE-based JOIN
----------------------------------************************************************************************
JOIN deffld WITH dbfld in HOSTFILE TO (ALL) field2 in CRFILE as JOINNAME
************************************************************************
EXAMPLE OF THE DEFINED-based JOIN
--------------------------------JOIN ID_NUM WITH CITY IN SALES TO EMP_ID IN EDUCFILE AS SALEDUC
DEFINE FILE SALES
ID_NUM/A9 = DECODE CITY ('NEW YORK' 451123478 'NEWARK' 119265415

'STAMFORD' 818692173 'UNIONDALE' 112847612);


END
TABLE FILE SALES
PRINT DATE_ATTEND
BY CITY
BY COURSE_NAME
END
+--------------------------------------------------------------------+
|
PAGE 1
|
|
CITY
COURSE_NAME
DATE_ATTEND
|
|
-----------------------|
|
NEW YORK
FILE DESCRPT & MAINT
81/11/15
|
|
NEWARK
BASIC EPR NONR-DP MGRS
82/08/24
|
|
STAMFORD
BASIC REPORT PREP DP MGRS
82/08/02
|
|
UNIONDALE
FILE DESCRPT & MAINT
81/11/15
|
+--------------------------------------------------------------------+
JOIN UTILITY COMMANDS
1. To display a list of active JOIN commands, input: ? JOIN
2. To clear all JOIN commands, input: JOIN CLEAR *
3. To clear a specific JOIN, input: JOIN CLEAR joinname

COMMAND RECAP
JOIN field1 IN fromfile TO (ALL) field2 IN tofile AS joinname

TABLE FILE fromfile


PRINT
LIST
\
====> Request fields from both files
COUNT
BY
IF
END

SUM/WRITE /

MATCH FILE oldfile


PRINT
LIST

\
====> Request fields from both files

COUNT
BY
IF
RUN

SUM/WRITE /

FILE newfile
PRINT
LIST

====> Request fields from both files


COUNT
SUM/WRITE /
BY ---- Must use the same name and layout of at least one by
in oldfile
IF
ON MATCH HOLD AS holdname disposition
END

WINDOWS
Six Different Types
Default is Window Off
To Activate-Window On

Types of Windows
+----------------------+----------------------------------------------+
|Window
| Activity
|
+----------------------+----------------------------------------------+
|
|
|
|Command Window
| Enter FOCUS Commands.
|
+----------------------+----------------------------------------------+
|
|
|
|Output Window
| View Window input and resulting
|
|
| output
|
+----------------------+----------------------------------------------+
|
|
|
|History Window
| See a record of commands entered
|
|
| in the Command Window.
|
+----------------------+----------------------------------------------+
|
|
|
|Help Window
| Display and edit key settings.
|
+----------------------+----------------------------------------------+
|
|
|
|Table Window
| Review output from the previous
|
|
| TABLE request.
|
+----------------------+----------------------------------------------+
|
|
|
|Error Window
| FOCUS error messages.
|
+----------------------+----------------------------------------------+
Command Window
All FOCUS commands are entered at the Command Window.
Up to 4 lines of commands may be entered at a time.
The title area displays the current command mode (TABLE, FOCUS, etc.)
Copied to Output and History Windows.
Submitted for execution.
Output Window
Functions as a session log.
Lines of input are preceded by a caret (>).
Cannot be altered.
History Window
Logs every command entered at the Command Window.
Cursor must be within the history window to view previous commands.
Allows the user to review up to 40 lines entered.
Main FOCUS commands are preceded by caret (>).
Incorrect commands are maintained and preceded by asterisk (*).
Help Window
Displays the PF key settings.
Appears on the screen when:
PF1 key is pressed.
WINDOW HELP is entered on the command line.
To remove from the screen, press PF1 again.
Table Window
Displays the results of the most recent TABLE request.
Holds up to the first 10 pages of report data, to a width of 130 characters.
Use ZOOM (PF2) to view previous results.
Error Window
Appears in the middle to top of the screen when a FOCUS error is generated.
Remains on the screen until the error is corrected.
Cursor positioned in the Command Window at the error.
The part of the command accepted by FOCUS is protected.
After error correction:

Press ENTER to resubmit the command.


Enter QUIT to terminate the command.

FOCUS RELATED DATASETS


MASTER
FOCUS.PROD.MASTER

PROD.FOCUS.MASTER

FOCUS.USER.MASTER
TEST.FOCUS.MASTER

Info. ctr. maintained schemas **


(These schemas are supported by systems staff.)
System maintained schemas.
(These schemas are supported by systems staff.)
User created schemas.
Schemas being developed and tested by system staff.
(This library should only be used when recommended by InfoCtr, Data
Administration or system staff.)

FOCEXEC
FOCUS.PROD.EXEC

FOCUS.PROD.GENJCL

TEST.FOCUS.EXEC
PROD.FOCUS.EXEC
FOCUS.USER.EXEC
INFOCTR.ID#___.EXEC

HOLDMAST
ID#___.FOCUS.HOLDMAST -

Info. ctr. maintained programs **


Also, where the file ALLOCATES are stored. (Browse the allocate for
the data set name.)
Info. ctr. maintained programs **
The file ALLOCATES for GENBATCH.
Programs being developed and tested by systems.
System maintained programs.
User created programs.
Individal user created programs. User must have an infoctr
allocated in order for FOCBEGIN or INFOTSO FOCUS to work

user created schemas. This is the dataset that holds schemas that
are created when requesting data to be held.

ACCESS PATHS FOR IDMS FILES


GINFOCTR.IDMS.ACCESS
INFOCTR.IDMS.ACCESS
PRODUTN.FOCUS.IDMS.ACCESS OTHER
FOCUS.PROD.SCHEMAS
FOCUS.USER.JCL
PROD.SPECIAL.PROCLIB
FOCPP.LOADLIB

Access path for Group Health IDMS databases


Access path for IDMS databases
Access path for Production IDMS databases

- Schema documentation **
- Jcl to submit batch jobs. (Note: All TSO logons have read, write,
and create access to all FOCUS.USER files)
- Procedures library for programs such as FOCPRINT, and LSTPRINT.**
- Dataset which contains software modules necessary to run FOCUS.**

** ID# logons have read only access to FOCUS.PROD files.

BATCH JOB PROCESSING


//TSOXXXA JOB (TXXX,9999,UT999),'JCLSYS',CLASS=R,
//
NOTIFY=TSOXXX,
//
MSGCLASS=X
//FOCUCC EXEC FOCUCC
//********************************************************************
//* FOCUCC SCANS THE JCL AND MAKES SURE ANY DATASETS DESIGNATED
//* AS - NEW,CATLG - DOES NOT ALREADY EXIST.
//* IF THE DATASET EXISTS IT WILL BE DELETED AND
//* YOUR FOCUS STEP WILL EXECUTE WITHOUT GENERATING THE 'DUPLICATE
//* NAME ON DIRECT ACCESS VOLUME' ERROR MESSAGE.
//********************************************************************
//FOCUS EXEC PGM=FOCUS
//STEPLIB DD DSN=FOCPP.LOADLIB,DISP=SHR

//MASTER
DD DSN=PROD.FOCUS.MASTER,DISP=SHR
//
DD DSN=TEST.FOCUS.MASTER,DISP=SHR
//FOCEXEC DD DSN=TEST.FOCUS.EXEC,DISP=SHR
//
DD DSN=PROD.FOCUS.EXEC,DISP=SHR
//ERRORS
DD DSN=FOCPP.ERRORS,DISP=SHR
//*************************************************************
//HOLDMAST DD DSN=TSOXXX.FOCUS.HOLDMAST,DISP=SHR
//*************************************************************
//HOLD
DD UNIT=SYSDA,SPACE=(TRK,(5,10))
//FOCSORT DD UNIT=SYSDA,SPACE=(TRK,(120,120))
//FOCSTACK DD UNIT=SYSDA,SPACE=(TRK,(20,10),RLSE)
//FOCIDMS DD DSN=INFOCTR.IDMS.ACCESS,DISP=SHR
//
DD DSN=GINFOCTR.IDMS.ACCESS,DISP=SHR
//SYSOUT
DD SYSOUT=*
//OFFLINE DD SYSOUT=*,COPIES=1
//SYSPRINT DD SYSOUT=*
//*********************************************************************
//HOLDNAME DD DSN=TSOXXX.HOLDNAME,
//
DISP=(NEW,CATLG,DELETE),
//
UNIT=SYSDA,
//
SPACE=(TRK,(150,100),RLSE)
//*********************************************************************
//* AFTER THE HOLDFILE IS CREATED THE LRECL AND BLCKSIZE WILL BE
//* ADJUSTED BY FOCUS TO THE ACTUAL LENGTH AND SIZE OF THE FILE
//*********************************************************************
//**************FORMAT USED TO ACCESS THE FILES*******************
//*"SCHEMA" DD DSN="DATASET NAME",DISP=SHR
//*****************************************************************
//**************FOLLOWING FILES THAT ARE TO BE ACCESSED***********
//GLEDGER DD DSN=PRODVSAM.GL.ACCOUNT.MASTER,DISP=SHR
//GLEDRDF DD DSN=PRODVSAM.GL.ACCOUNT.MASTER,DISP=SHR
//SYSIN
DD *
OFFLINE
EX PRGNAME
FIN
/*
ACTUAL & USAGE PARAMETERS

TYPE
I
F
D
P
A
Z

MEANING

LENGTH

Integer number, no decimal


Decimal number, single precision
Decimal number, double precision
Packed decimal
Character
Signed zoned decimal (ACTUAL only)

1
1
1
1
1
1

USAGE PARAMETERS
OPTION
S
C
B
R
M
N
MDY
YMD
DMY
T

MEANING
Zero Suppress
Comma Edit
Bracket Negatives
Print CR with negatives
Floating dollar sign
Fixed dollar sign
Month/Day/Year (MM/DD/YY)
Year/Month/Day
(YY/MM/DD)
Day/Month/Year (DD/MM/YY)
Translate month into alpha

to
to
to
to
to
to

9
9
16
15
256
15

L
E

(ie JAN - used as MTDY)


Print leading zeroes
Scientific notation

Appendix B. Report Commands


ACROSS
Print fields across page.
ROW-TOTAL
Totals rows across page.
COLUMN-TOTAL
Totals columns down page.
OVER
Prints field over field.
AS
Specifies column headings.
SUB-TOTAL
Provides subtotals for numeric fields in this and all higher control
breaks.
SUBTOTAL
Provides subtotals for numeric fields in this control break only.
SUMMARIZE
Provides numeric field totals and recalculations.
RECOMPUTE
Provides numeric field totals and recalculations for control break
specified.
SUBHEAD
Places text before data associated with control break.
SUBFOOT
Places text after data associated with control break.
COMPUTE
Allow additional calculations at control
RECAP
break.
PAGE-BREAK
Start a new page.
SKIP-LINE
Print a blank line.
FOLD-LINE
Fold a line.
UNDER-LINE
Print underline across page.
REPAGE
Set page counter to 1.
Appendix C. Output Control Options
COLUMN-TOTAL
ROW-TOTAL
SUMMARIZE
RECAP
NOTOTAL
SUBFOOT
SUBHEAD
SAVE
HOLD

Provide column totals for the report.


Provide row totals for the report.
Provide column totals and recalculate computations for the report.
Compute recaps of columns.
Eliminate report totals generated by sort control breaks.
Print text after the report.
Print text before the report.
Write output to an external EBCDIC file.
Write output to a temporary FOCUS file.

Appendix D. Direct Operations


PREFIX
---------AVE.fieldname
ASQ.fieldname
MIN.fieldname
MAX.fieldname
LST.fieldname
FST.fieldname
PCT.fieldname
TOT.fieldname
ALL.fieldname
SUM.fieldname
CNT.fieldname
ST.fieldname
CT.fieldname

MEANING
--------------Average Value
Average Sum of Squares
Minimum Value
Maximum Value
Last Value
First Value
Percent of Column Total
Grand Total
All Occurrences
Sum of the Values
Count of the Values
Subtotal on Subheadings and
Subfootings
Column Total on Subheadings and
Subfootings

Appendix E. Query Commands


OPTION
? DEFINE
?F filename
? FDT

MEANING
Displays the fields currently defined for a file.
Lists fields in the master file. (string)
Displays the file directory table.

(ie.?F EMPLOYEE)

?
?
?
?

FILE filename
HOLD
JOIN
n

? SET
? STAT
the last request.

Displays the number of records and segments.


Displays the active hold files
Lists the JOIN structures currently in effect.
Displays detailed explanations of error messages. (ie.FOC125 - enter ?
125 for explanation)
Displays the current parameter values.
Displays the operating statistics (records read and lines printed) for

You might also like