Download presentation
Presentation is loading. Please wait.
Published byDeonte Umble Modified over 10 years ago
2
FOCUS for SIS Beginning Report Writing FOCUS for SIS Beginning Report Writing
3
Cheri Harwell (775) 784-4357(help) support@nevada.edu Create Detail Reports against SIS data. Basic Calculations in Reports. Generate Summary Reports. Name and Institution, Experience with FOCUS, SIS/Job Submittal, Expectations FOCUS for SIS Beginning Report Writing
4
Agenda 1.Overview 2.Write a Report 3.Formatting 4.Data Selection 5.New Fields Agenda FOCUS for SIS Beginning Report Writing 6)Summary Reports 7)More Summary Reports 8)Multiples 9)Bonus
5
1. Overview A.What is Focus B.Databases, Tables and Fields C.Master File Descriptions – MFD D.Getting in to FOCUS E.TED 1. Overview FOCUS for SIS Beginning Report Writing
6
Reporting Tool Information Builders Product www.informationbuilders.com Information Builders provides all of the software and services to develop complete state-of-the-art information systems for turning data into useful business intelligence for real-time management of business. We call our solutions "i-business": the ability to get to any data in the enterprise, turn it into information, and deliver it so that people can use it to make their businesses more intelligent. 1.A. What is Focus 1.A.
7
FOCUS for SIS Beginning Report Writing NAME TOOK ADDR CLAS Table/File Fields PID TERM CLASS GRADE 1.B. Databases, Tables and Fields 1.B.1
8
FOCUS for SIS Beginning Report Writing 1.B. Databases, Tables and Fields PERSON ID NAME __________ ___________ L000007774 SIMPSON, BARTHOLOMEW L II L000007772 MAYBELL, MARTHA L000007773 LIZARD, LARRY What is a record ? 1.B.2
9
FOCUS for SIS Beginning Report Writing FILENAME=NAME,SUFFIX=PRIVATE,$ SEGMENT=ROOT,$ GROUP=NAMEKEY, ALIAS=KEY, USAGE=A010, ACTUAL=A010,$ FIELD=NAMEPID, ALIAS=NAMEPID, USAGE=A010, ACTUAL=A010, TITLE='PERSON,ID',$ FIELD=NAMELTNM, ALIAS=NAMELTNM, USAGE=A025, ACTUAL=A025, TITLE='LAST,NAME',$ FIELD=NAMEFRSTNM, ALIAS=NAMEFRSTNM, USAGE=A015, ACTUAL=A015, TITLE='FIRST,NAME',$ FILE=NAME FIELDUSAGEUSAGEACTUAL NAMEFORMATLENGTHFORMATTITLE NAMEKEYALPHA10A010 NAMEPIDALPHA10A010'PERSON,ID' NAMELTNMALPHA25A025'LAST,NAME' NAMEFRSTNMALPHA15A015 'FIRST,NAME' FOCUS MFD Type: TED MASTER(filename) FOCUS MFD Type: TED MASTER(filename) X/NET Report 1.C. Master File Descriptions - MFD 1.C.1
10
FOCUS for SIS Beginning Report Writing 1.C. Master File Descriptions - MFD 1.C.2 Formats A- Alphanumeric N-Numeric I-Integer Actual P- Packed to conserve space Formats A- Alphanumeric N-Numeric I-Integer Actual P- Packed to conserve space
11
FOCUS for SIS Beginning Report Writing 1.C. Master File Descriptions - MFD 1.C.3 Key Length
12
FOCUS for SIS Beginning Report Writing 1.C. Master File Descriptions - MFD 1.C.4 SIS Screens vs. FOCUS Tables SIS Screens vs. FOCUS Tables
13
FOCUS for SIS Beginning Report Writing 1.D. Getting in to FOCUS 1.D.1 1 Logon Mainframe 2 Select TSOSIS 3 F;S;region 1 Logon Mainframe 2 Select TSOSIS 3 F;S;region
14
FOCUS for SIS Beginning Report Writing 1.D. Getting in to FOCUS 1.D.2
15
FOCUS for SIS Beginning Report Writing 1.D. Getting in to FOCUS 1.D.3 TED FOCEXEC(pgmname) Open a FOCEXEC Create a new FOCEXEC Run a FOCEXEC Open a FOCEXEC Create a new FOCEXEC Run a FOCEXEC FIN to Exit FOCUS
16
FOCUS for SIS Beginning Report Writing TED is the FOCUS text editor that is used to create and change your procedures called FOCEXECs. 1.E. TED – Text Editor Commands 1.E.1 Primary Command Line Line Commands
17
FOCUS for SIS Beginning Report Writing 1.E. TED – Text Editor Commands Primary Command Line GET FOCEXEC(pgmname) SAVE or FILE TOP or BOTTOM F7 (back) F8 (forward) F1 (help) LOCATE/ TED MASTER(file) RUN (please use caution) QUIT or F3 QQUIT (changes are cancelled) Line Commands (Prefix Area) I / I#Insert D/DD/D#Delete/Block Delete C/CC/C#Copy/Block Copy M/MMMove/Block Move PPreceding FFollowing ”Repeat Line 1.E.2
18
FOCUS for SIS Beginning Report Writing 1.E. TED – Text Editor Commands 1.E.3
19
1. Review FOCUS is a reporting tool. Data is stored in tables and fields which are defined by MFD’s. Format of field can be Alphanumeric, Numeric, Integer or Date. Key defines the unique identifier of a table. Start FOCUS. TED is the text editor for FOCUS. Primary and Line Commands of TED. Exit FOCUS using FIN command. 1. Review FOCUS for SIS Beginning Report Writing
20
2. Write a Report A.Basic Rules B.Print C.Sort D.Select 2. Reporting Basics FOCUS for SIS Beginning Report Writing
21
2.A. Basic Rules All you need for a FOCUS report are: 1.Data 2.File Description 3.FOCEXEC 2.A.1 Running online isn’t recommended, unless you run against QA data or have a record limit defined. Use the batch methods with FOCBAT or Job Submittal to run Production reports.
22
FOCUS for SIS Beginning Report Writing 2.A. Basic Rules 2.A.2 FOCEXEC Report
23
FOCUS for SIS Beginning Report Writing 2.A. Basic Rules 2.A.3 00000 * * * TOP OF FILE * * * 00001 -* SAMPLE FOCEXEC 00001 TABLE FILE NAME 00002 PRINT 00003 NAMEFRSTNM 00004 NAMEDTOFBTH 00005 NAMEPID 00006 END 00007 * * * END OF FILE * * * TABLE FILE filename Required Components At least one space between words is required. Recommend using indentation, but not required. Verb – PRINT display all records END – must be on separate line.
24
FOCUS for SIS Beginning Report Writing 2.B. Print 2.B. 00000 * * * TOP OF FILE * * * 00001 TABLE FILE filename 00002 PRINT 00003 NAMEFRSTNM 00004 NAMEDTOFBTH 00005 NAMEPID 00006 00007 END 00008 * * * END OF FILE * * * Print is a Verb – Only 1 Verb Objects – Fields to Print Sort Command – BY fieldname 00000 * * * TOP OF FILE * * * 00001 TABLE FILE filename 00002 PRINT 00003 NAMEFRSTNM 00004 NAMEDTOFBTH 00005 NAMEPID 00006 BY NAMELTNM 00007 END 00008 * * * END OF FILE * * *
25
FOCUS for SIS Beginning Report Writing 2.C. Sort 2.C.1 No Sort Sorted BY statement is placed after the PRINT fields, although it prints first and in the order listed. Up to 31 Sort Phrases.
26
FOCUS for SIS Beginning Report Writing 2.C. Sort 2.C.2 Multiple Sort Fields RESI sample with 2 sort fields. Change Sort Direction
27
FOCUS for SIS Beginning Report Writing 2.C. Sort 2.C.3 Repeat Field Invisible Sort Field -Every occurrence is displayed -Move sort field to print where desired. -Every occurrence is displayed -Move sort field to print where desired.
28
FOCUS for SIS Beginning Report Writing 2.D. Select 2.D.1 Limit Records Multiple Selection WHERE expression [;] Simple compare of a field to a set value. If comparing to an alphanumeric field then place value in single quotes, ‘?’. Expression
29
FOCUS for SIS Beginning Report Writing 2.D. Select 2.D.2 Relationship
30
2. Review Need a TABLE FILE, Verb and END statement to create FOCUS report. PRINT verb is used to list data. PRINT field field Sort in descending order with HIGHEST. Hide sort fields - NOPRINT. BY [HIGHEST] field [NOPRINT] Select with the WHERE command using EQ, NE, GT, GE, LT, LE, and others. 2. Review FOCUS for SIS Beginning Report Writing
31
3. Formatting A.Column Title B.Heading C.Footing D.Separations E.Fields 3. Formatting FOCUS for SIS Beginning Report Writing
32
3.A. Column Title 3.A. Column Titles The column titles have been set for us in the MFD Title field. To override the assigned title use the AS option. Use a comma to split title onto multiple lines. /C /L /R to align the column heading as center,left,right: AWRDPID/C AS ‘PERSON’
33
FOCUS for SIS Beginning Report Writing 3.B. Heading Center the heading above the report, multiple lines of text and skip two lines before the data. 3.B. Heading Line between Table File and End. TABLE FILE AWRD HEADING CENTER “GREAT BASIN COLLEGE” “AWARDS FOR 2001 </2” PRINT AWRDPID … END To add run date to heading, include &DATE within quotes.
34
FOCUS for SIS Beginning Report Writing 3.C. Footing Center the footing at the bottom of the page. 3.C. FOOTING BOTTOM CENTER "UADCJH1.AWRDLIST" Footing Line between Table File and End Recommend placing name of focexec in footing.
35
FOCUS for SIS Beginning Report Writing 3.D. Separations Can separate sections of a report with blank lines, underlines or put them on separate pages. 3.D. BY field UNDER-LINE BY field SKIP-LINE BY field PAGE-BREAK REPAGE BY field UNDER-LINE BY field SKIP-LINE BY field PAGE-BREAK REPAGE
36
FOCUS for SIS Beginning Report Writing 3.E. Fields An MFD has a defined format for each field, you may change that format for reporting purposes. 3.E.1
37
FOCUS for SIS Beginning Report Writing 3.E. Fields 3.E.2
38
FOCUS for SIS Beginning Report Writing 3.E. Fields 3.E.3 PRINT AWRDPID/C AS 'PERSON' AWRDOROFRAM/D7 AS 'ORIG AMT' AWRDCUOFRAM/D9.2M AS 'CURR AMT‘ AWRDCRSNCD AS 'REASON'
39
FOCUS for SIS Beginning Report Writing 3.E. Fields 3.E.4 D9.2M Length.Decimal Examples
40
3. Review Column title is changed with the AS option. To change alignment of the column title use /C, /L, or /R. HEADING should be between TABLE FILE statement and END. Use double quotes around text. CENTER is optional. Use </# within quotes to skip lines. FOOTING statement with CENTER and BOTTOM options. Separate section options UNDER-LINE, SKIP-LINE, and PAGE-BREAK. Field definitions have 3 parts a type, length and edit option. 3. Review FOCUS for SIS Beginning Report Writing
41
4. Data Selection A.Available Operators B.Alphabetic Comparison C.Numeric Comparison D.Multiple Criteria E.Date Comparison F.Field to Field Comparison 4. Data Selection FOCUS for SIS Beginning Report Writing
42
4.A. Available Operators 4.A. Relation WHERE expression; WHERE fieldname relation value1 [OR/AND expression] [;] Compare a field to a set value, compare field to another field, compare field calculation to value, complex relationships with AND/OR. Other Options
43
FOCUS for SIS Beginning Report Writing 4.B. Alphabetic Comparison 4.B.1 Alphanumeric Comparison Value is enclosed in single quotes. WHERE RECORDLIMIT EQ 5 WHERE NAMELTNM LT ‘M’ WHERE AWRDAWYR EQ ‘2001’ WHERE RESISTCD EQ ‘NV’; WHERE RESISTCD EQ ‘NV’ OR ‘CA’; WHERE RESISTCD NE ‘NV’ OR ‘ ‘; Examples already used And/Or Conditions
44
FOCUS for SIS Beginning Report Writing 4.B. Alphabetic Comparison 4.B.2 Mask Trailing Characters WHERE NAMELSTNM EQ ‘SMITH$*'; Mask Leading Character WHERE RESICNTCD EQ '$W$'; Contains characters somewhere within field WHERE CLASCLNM CONTAINS ‘COMPUTER'; Omit a character string from the result. WHERE CLASCLNM OMITS ‘COMPUTER';
45
FOCUS for SIS Beginning Report Writing 4.C. Numeric Comparison 4.C.1 WHERE SGPAGPAVL GT 3.5; WHERE (SGPATOTUNEN LE 60) OR (SGPATOTUNEN GE 170);
46
FOCUS for SIS Beginning Report Writing 4.C. Numeric Comparison 4.C.2 Calculation in the WHERE statement.
47
FOCUS for SIS Beginning Report Writing 4.D. Multiple Criteria 4.D.1 WHERE RESISTCD EQ ‘NV’ OR ‘CA’; In English ask “I want Nevada and California”. Outside of Range. WHERE (SGPATOTUNEN GE 60) AND (SGPATOTUNEN LE 170); Inside a Range. AND – all must be true. OR – one must be true.
48
FOCUS for SIS Beginning Report Writing 4.D. Multiple Criteria 4.D.2 Each line is an “AND” condition. WHERE (SGPATOTUNEN GE 80) AND (SGPATOTUNEN LE 100); Is the same as: WHERE SGPATOTUNEN GE 80; WHERE SGPATOTUNEN LE 100;
49
FOCUS for SIS Beginning Report Writing 4.E. Date Comparison 4.E. SIS Dates are stored as “Numeric 9” and are formatted as YYYYMMDD. Example would be “20001031”. Can use Numeric Comparison techniques to select with these fields. Numeric edit options don’t help much to format the field. Calculations with these dates? How many days between Begin Date and End Date? 20010512-20010116= 396 days. We would like to get 116 days, cover in Chapter 5.
50
FOCUS for SIS Beginning Report Writing 4.F. Field to Field Comparison 4.F.
51
4. Review Syntax: WHERE expression; Compare Alphanumeric, Numeric, Dates, calculated values, and fields. Enclose an Alphanumeric value in single quotes. Masks can be used for character fields using the $ as a place holder. Numeric comparison can include decimal values (no quotes). 4. Review FOCUS for SIS Beginning Report Writing
52
5. New Fields A.Define Fields B.Numeric C.Alphanumeric D.Dates E.Conditional Define 5. New Fields FOCUS for SIS Beginning Report Writing
53
5.A. Define Fields 5.A. Define new fields in their own section. Located before the TABLE section. While it appears first, it builds the field during execution time, but before verbs. FOCUS uses efficiency and will perform the WHERE commands that it can before it does the calculate. DEFINE FILE filename [ADD] Newfield/Format = expression; END The END is required. New fields can be printed, used in where expressions, used to create more new fields, sorted on. Anything a regular field can do, it can do too. The ADD option will add the new fields to the existing DEFINE fields; if not specified, it will overwrite the previous fields.
54
FOCUS for SIS Beginning Report Writing 5.B. Numeric 5.B. Define a new calculated field and display it on the report and use it as selection criteria.
55
FOCUS for SIS Beginning Report Writing 5.C. Alphanumeric 5.C.1 Alphanumeric defines can break a field apart or put multiple together. Break apart Zip Code.
56
FOCUS for SIS Beginning Report Writing 5.C. Alphanumeric 5.C.2 Put fields together. Concatenation Symbols: | - Weak, Don’t remove the trailing blanks || - Strong, Remove the trailing blanks. Note: The resulting field length must be as long as the combination of all the fields. It can be shortened on the print line.
57
FOCUS for SIS Beginning Report Writing 5.C. Alphanumeric 5.C.3 Add characters.
58
FOCUS for SIS Beginning Report Writing 5.D. Dates 5.D.1 Format Date fields to look better. Actually a numeric format. Example already used
59
FOCUS for SIS Beginning Report Writing 5.D. Dates 5.D.2 Use subroutines and edits to format the date.
60
FOCUS for SIS Beginning Report Writing 5.D. Dates 5.D.3 Version 7.0 FOCUS Makes date processing much easier. DEFINE FILE filename new_date/YMD = sis_date; END PRINT new_date/dformats END YMD01/10/31 YYMD2001/10/31 MDY10/31/01 MTDYYOCT 31, 2001 MtrDYYOctober 31, 2001 YY2001 MTROCTOBER M10 D31 WTRWednesday QQ4 QYYQ4 2001
61
FOCUS for SIS Beginning Report Writing 5.E. Conditional Define 5.E. Can conditionally set a field to a value using an “IF” statement or the “DECODE” function.
62
5. Review Define section can create new fields which can be printed, used in a where statement, and sorted on. DEFINE FILE filename Newfield/Format=expression END Use calculations to create new fields. Break fields apart. Put fields together or add characters into a field. Create date fields using functions. Conditional field creation. 5. Review FOCUS for SIS Beginning Report Writing
63
6. Summary Reports A.Sum Verb B.Sum with Sort C.Across – Spreadsheet D.Select on Sum E.Compute F.Compute vs. Define G.Holding Data 6. Summary Reports FOCUS for SIS Beginning Report Writing
64
6.A. Sum Verb 6.A. SUM Verb very similar to Print verb, select data, specify fields to sum, can use sorting.
65
FOCUS for SIS Beginning Report Writing 6.B. Sum with Sort 6.B. Use the BY statement.
66
FOCUS for SIS Beginning Report Writing 6.C. Across – Spreadsheet 6.C. Put into spreadsheet format.
67
FOCUS for SIS Beginning Report Writing 6.D. Select on Sum 6.D.
68
FOCUS for SIS Beginning Report Writing 6.E. Compute 6.E. Compute is a method of creating new fields.
69
FOCUS for SIS Beginning Report Writing 6.F. Compute vs. Define 6.F. QuestionDEFINECOMPUTE When is the field evaluated (created)? Before any verb acts on the value. After aggrega- tion with BY statement. Can I use the new field to SORT with? Yes.No. Can I use it to select the field using a WHERE? Yes, either TOTAL or individual value. Only with TOTAL tests.
70
FOCUS for SIS Beginning Report Writing 6.G. Holding Data 6.G. How do you sort with a COMPUTEd field? Or with a calculated total? Hold the data for further processing. ON TABLE HOLD [AS filename]
71
6. Review Summary reports can be created with the SUM verb. Use the ACROSS to create a spreadsheet format. WHERE TOTAL will select based on the aggregated values. A COMPUTE can be used within a verb to create a new field. Use care in determining whether to use the COMPUTE or the DEFINE. Can use HOLD statement to store data for subsequent use. 6. Review FOCUS for SIS Beginning Report Writing
72
7. More Summary Reports A.Prefixes B.Column & Row Totals C.Section Totals 7. More Summary FOCUS for SIS Beginning Report Writing
73
7.A. Prefixes 7.A.1 Sample PRINT of MSID file.
74
FOCUS for SIS Beginning Report Writing 7.A. Prefixes 7.A.2
75
FOCUS for SIS Beginning Report Writing 7.A. Prefixes 7.A.3 Available prefixes: CNTMINPCT AVEMAX Available prefixes: CNTMINPCT AVEMAX
76
FOCUS for SIS Beginning Report Writing 7.A. Prefixes 7.A.4 To select based on the prefixes, use the WHERE TOTAL command.
77
FOCUS for SIS Beginning Report Writing 7.B. Column & Row Totals 7.B.1
78
FOCUS for SIS Beginning Report Writing 7.B. Column & Row Totals 7.B.2 Row Total Column Total ROW-TOTAL [fieldname fieldname]
79
FOCUS for SIS Beginning Report Writing 7.C. Section Totals 7.C. Ability to subtotal fields with the following commands. SUBTOTAL/ SUB-TOTAL Add all numeric columns. For specified sortfield only/And all higher sort fields. RECOMPUTE/ SUMMARIZE Add all numeric columns and recalculate COMPUTEd fields. For specified sort field only/And all higher sort fields. (PCT) ON|BY sortfield subtotal [MULTILINES] [field1 field2] [AS ‘text’]; MULTILINES – Won’t print a subtotal line if only 1 detail.
80
7. Review In the SUM Verb can use prefixes of CNT, AVE, MIN, MAX and PCT to create additional statistics. Use the WHERE TOTAL to select based on these new values. The ROW-TOTAL and COLUMN-TOTAL verb objects. Use the ON field SUBTOTAL object to create section totals. 7. Review FOCUS for SIS Beginning Report Writing
81
8. Multiples A.Join Multiple Files B.Multiple Verbs C.Fields for use in Multiple Runs 8. Multiples FOCUS for SIS Beginning Report Writing
82
8.A. Join Multiple Files 8.A.1 NAME NAMEKEY NAMEPID NAMELTNM NAMEFRSTNM NAMESSN RESI RESIKEY RESIPID RESIDSTRCD RESICNTCD RESIRSCD Use the JOIN to have fields from two files in one report. JOIN CLEAR * JOIN field IN file TO field IN file AS asname JOIN CLEAR * JOIN NAMEPID IN NAME TO RESIPID IN RESI AS JOIN1
83
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.2 Example of JOIN.
84
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.3 ADDRKEYA17 ADDRPIDA10 ADDRADRCDA2 ADDRADRGDFRP5 ADDRADRLN1A30 ADDRADRLN2A30 ADDRCYNMA20 ADDRSTCDA2 ADDR NAME NAMEKEYA10 NAMEPIDA10 NAMELTNMA25 NAMEFRSTNMA15 NAMESSNA10 RESI RESIKEYA10 RESIPIDA10 RESIDSTRCDA2 RESICNTCDA3 NAME to RESI is a one-to-one relationship. For every NAME there is only one RESI. Their keys are the same. The 2 files must have something in common. The name of the common field can be different, but the format must match. Reminder: Use Actual lengths to determine fields within the key. The 2 files must have something in common. The name of the common field can be different, but the format must match. Reminder: Use Actual lengths to determine fields within the key. NAME to ADDR is a one-to-many relationship. For every NAME there could be multiple ADDR records with various Codes or Start Dates.
85
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.4 One-to-Many Join NAME to ADDR is a 1/many join. The ALL will match from NAME to every occurrence in the ADDR file. Without the ALL, only the first occurrence would appear. One-to-Many Join NAME to ADDR is a 1/many join. The ALL will match from NAME to every occurrence in the ADDR file. Without the ALL, only the first occurrence would appear.
86
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.5 NAME R00000001 JONES R00000003 SMITH R00000002 DOE ADDR R00000001 MA 19990101 123 MAIN R00000003 MA 20000801 123 VINE ST. R00000003 MA 19990101 123 A ST. No Path Multiplicative Effect Selecting the correct HOST file is very important. This shows the differences between results based on switching host file.
87
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.6 JOIN Checklist Determine which files need Check for common fields Decide which file will be Host file and whether you need an ALL for the 1/many. (See Flowchart) Write the JOIN Check the file structure Run requests
88
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.7 Find the common fields. Advanced Join Create Defined field, use a linking file, or create hold files. Determine which file is Host/Cross Reference and whether the ALL is needed. This file is the Cross Reference Use ALL This file is the Cross Reference No ALL In this file, are there more fields in the key than just the common field? Yes No The file with the longer key is the Cross Reference Use ALL Is either file optional? Yes No Optional file is the Cross Reference No ALL Either file can be Cross Reference No ALL Is the entire key on both files the same? No Yes How many files have the common field first? Both Only 1Neither
89
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.8 NAME to RESI Either file could be the Host or Cross-Reference based on the keys. However if RESI data is optional, it should be the Cross Reference. NAME to RESI Either file could be the Host or Cross-Reference based on the keys. However if RESI data is optional, it should be the Cross Reference. JOIN NAMEPID IN NAME TO RESIPID IN RESI AS JOIN1 * * Common Field * -- Key Fields
90
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.9 NAME to TOOK The NAME file should be the Host file. Use the ALL. NAME to TOOK The NAME file should be the Host file. Use the ALL. JOIN NAMEPID IN NAME TO ALL TOOKPID IN TOOK AS JOIN1 * *
91
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.10 NAME to AWRD The NAME file must be the Cross-Reference (second) file. It is the only file that has the common field as the first part of the key. NAME to AWRD The NAME file must be the Cross-Reference (second) file. It is the only file that has the common field as the first part of the key. JOIN AWRDPID IN AWRD TO NAMEPID IN NAME AS JOIN1 * *
92
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.11 PERSON FIRST STUDENT TOOK NUM ID NAME COUNTER CLASS UNITS ------ ----- ------- ----- ----- N000000001 DEBBIE 1.00 N000000002 JOANNE 1 PN 118 1.00 N000000003 LINDA 1 DP 252 3.00 SET ALL = ON JOIN NAMEPID IN NAME TO TOOKPID IN TOOK AS JOIN1 Missing Multiple Classes N000000002 JOANNE 1 PN 118 1.00 JOANNE 1 ABE 111 1.00 JOANNE 1 ACC 136 3.00 JOANNE 1 ACC 152 3.00 N000000003 LINDA 1 DP 252 3.00 LINDA 1 JOUR298 1.00 LINDA 1 RPED178 2.00 JOIN TOOKPID IN TOOK TO NAMEPID IN NAME AS JOIN1 Missing Students without Classes JOIN NAMEPID IN NAME TO ALL TOOKPID IN TOOK AS JOIN1 N000000001 DEBBIE 1.. N000000002 JOANNE 1 PN 118 1.00 JOANNE 1 ABE 111 1.00 JOANNE 1 ACC 136 3.00 JOANNE 1 ACC 152 3.00 N000000003 LINDA 1 DP 252 3.00 LINDA 1 JOUR298 1.00 LINDA 1 RPED178 2.00 NAME / TOOK Join Examples NAME / TOOK Join Examples
93
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.12 PERSON FIRST STUDENT TOOK CLASS NUM ID NAME COUNTER CLASS COUNT UNITS ------ ----- ------- ----- ----- ----- N000000002 JOANNE 4 ACC 152 4 8.00 N000000003 LINDA 19 AUTO299 19 35.00 JOIN TOOKPID IN TOOK TO NAMEPID IN NAME AS JOIN1 Incorrect Sum of the Name File Student Counter. JOIN NAMEPID IN NAME TO ALL TOOKPID IN TOOK AS JOIN1 PERSON FIRST STUDENT TOOK CLASS NUM ID NAME COUNTER CLASS COUNT UNITS ------ ----- ------- ----- ----- ----- N000000001 DEBBIE 1. 0. N000000002 JOANNE 1 ACC 152 4 8.00 N000000003 LINDA 1 AUTO299 19 35.00 NAME / TOOK Sum the Joined File NAME / TOOK Sum the Joined File SUM NAMEFRSTNM NAMESCNT CLASS AS 'TOOK,CLASS' CNT.CLASS TOOKNOUN BY NAMEPID
94
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.13 If 1/1 – Nothing to report. If 1/many – Show several with their counts. Run this to verify the number of records, and fields.
95
FOCUS for SIS Beginning Report Writing 8.A. Join Multiple Files 8.A.14 JOIN multiple files.
96
FOCUS for SIS Beginning Report Writing 8.B. Multiple Verbs 8.B. Multiple Verbs, both a SUM and a PRINT. Rules: Up to 6 Verbs per TABLE FILE. PRINT can only be used once and last. If SUM has a BY, the next must repeat all of the BYs. Rules: Up to 6 Verbs per TABLE FILE. PRINT can only be used once and last. If SUM has a BY, the next must repeat all of the BYs.
97
FOCUS for SIS Beginning Report Writing 8.C. Fields for Use in Multiple Runs 8.C.1 &DATE – gets the current date. &field – set a value once and use it multiple times. &DATE – gets the current date. &field – set a value once and use it multiple times.
98
FOCUS for SIS Beginning Report Writing 8.C. Fields for Use in Multiple Runs 8.C.2 To set a variable at execution time EX focexec var1=value, var2=value Batch processing using FOCBAT will allow your terminal to be released for other tasks while your FOCEXEC runs. The output will be stored in VMCF for you to view, route to a printer, or cancel.
99
8. Review Use the JOIN command to combine two files. If it is a one-to-many relationship use the ALL option. Use the JOIN CLEAR * to clear old joins. Multiple verbs may be used in the TABLE FILE command, PRINT must be last. Can use variables to add flexibility you your reports. Use FOCBAT to submit jobs in batch – so you can do something else while it runs. 8. Review FOCUS for SIS Beginning Report Writing
100
9. Bonus A.Focus Processing Flow B.Set Parameters C.Common Errors/Problems D.Tips E.FOCBAT/VMCF/Job Submittal F.Managing FOCEXECs 9. Bonus FOCUS for SIS Beginning Report Writing
101
9.A. Processing Flow 9.A. FOCUS Processing Flow Locate MFD’s and Data Format & Print WHERE TOTAL – Select on aggregated and computed values. COMPUTE – Create new values. WHERE – Select based on DEFINEd values. CNT, AVE – Prefix operators applied. DEFINE – Create new values. WHERE - Select based on database values. JOIN/BY – Merge and sort.
102
FOCUS for SIS Beginning Report Writing 9.B. Set Values 9.B. PARAMETER SETTINGS ALL. OFF HOLDATTR FOCUS PREFIX ASNAMES ON HOLDLIST ALL PRINT ONLINE BINS 64 HOLDSTAT OFF QUALCHAR. BLKCALC NEW HOTMENU OFF QUALTITLES OFF BYPANELING OFF INDEX TYPE NEW SCREEN ON CACHE 0 LANGUAGE AMENGLISH SESSION MONITOR OFF CARTESIAN OFF LINES/PAGE 66 SHADOW PAGES OFF COLUMNSCROLL OFF LINES/PRINT 57 SPACES AUTO CONSULTOPTN INVISIBL MESSAGE ON TITLE ON EMPTYREPORT OFF MODE TSO WIDTH 130 FIELDNAME NEW NODATA. XRETRIEVAL ON FOCSAM NEW PAGE-NUM ON FOCSTACK SIZE 8K PAUSE ON > > > ? SET
103
FOCUS for SIS Beginning Report Writing 9.C. Common Errors/Problems 9.C. Space Error Error: Abend SB37 If holding files and don’t get any data. Solution: Add Allocation statements to increase file size. DYNAM FREE FILE xxx DYNAM ALLOC FILE xxx SPACE 20 5 CYL Error: S322 Ran out of time. Solution: There are 3 ways to submit FOCUS. Try the next method to get more time. FOCBAT get 30 minutes of CPU, overnight Job Submittal gets lots more. If running multiple focexecs in one focbat, need to submit them separately. Time Error Lose Fields on Hold File Error: If holding files and have missing fields. Solution: Add Allocation to increase file length. DYNAM FREE FILE xxx DYNAM ALLOC FILE xxx LRECL 800
104
FOCUS for SIS Beginning Report Writing 9.D. Tips 9.D.1 STATFILE or other external file Use the DYNAM command to show FOCUS where to find the file. DYNAM FREE FILE STATFILE DYNAM ALLOC FILE STATFILE DS 'LADSISQ.USRSTATR.DATA.D010205.T20003P' SHR To Save a File on disk or to download. Use the DYNAM command to save to permanent hold file. DYNAM FREE FILE xxx DYNAM ALLOC FILE xxx DS ‘UADCJH1.FOCUS.DATA.D010725’ SPACE 20 5 CYL If need to run again, change the name within the quotes, delete the file manually or add delete before the allocate. DYNAM DELETE UADCJH1.FOCUS.DATA.D010725
105
FOCUS for SIS Beginning Report Writing 9.D. Tips 9.D.2 HOLD File?? Since HOLD is a function in FOCUS, we couldn’t use HOLD as the name of an MFD. Therefore, HLDS is the file name in FOCUS Don’t Overtype Create a new program then copy the old one into it with the GET. If already changed program, use FILE to create new program and then get out with QQUIT to cancel all changes to original program.
106
FOCUS for SIS Beginning Report Writing 9.E. FOCBAT/VMCF/Job Submittal 9.E.1 FOCBAT is a procedure to submit FOCUS in batch. To execute: > > ex focbat > > sis The above screen will appear. You will enter your FOCEXEC name and print options. You may submit up to 3 focexecs in one job. There is a limit of 30 minutes CPU time (not clock time).
107
FOCUS for SIS Beginning Report Writing 9.E. FOCBAT/VMCF/Job Submittal 9.E.2 VMCF – Look at batch jobs and send them to a printer. TSO Option Line:=V VMCF Command Line:2, printer U9000 or U9* Select Printer Name:Q Select Report:S to view, PF3 to return. Print a Report:Tab to DEST and enter printer id, PF3 to return.
108
FOCUS for SIS Beginning Report Writing 9.E. FOCBAT/VMCF/Job Submittal 9.E.3 FOCUSAD FOCUSCMP FOCUSDS FOCUSFA FOCUSLAB FOCUSSA FOCUSSR Job Submittal LDEF’s Job Submittal is used to submit batch jobs for overnight processing. FunctionDescription LDEF Definition - created by systems, default values. LREQ Request - Your name and when to run. LRPF Parameter Fields - Name of the FOCEXEC. LRSB Substitutions - Printer name, UserID
109
FOCUS for SIS Beginning Report Writing 9.F. Managing FOCEXECs 9.F. Commands to assist in managing your files within TED. DescriptionFOCUS Command List your FOCEXECs >>EX LIST List your MFD’s >>EX LISTMFD Delete a FOCEXEC >>EX DELETE Copy a FOCEXEC from group copy area. >>TED FOCEXEC(newname) =>GET COPYEXEC(copyname) Copy your FOCEXEC to the group area. >>TED FOCEXEC(yourname) =>SAVE COPYEXEC(newcopy)
110
9. Bonus Review A.Focus Processing Flow B.Set Parameters C.Common Errors/Problems D.Tips E.FOCBAT/VMCF/Job Submittal F.Managing FOCEXECs 9. Review FOCUS for SIS Beginning Report Writing
111
Syntax Summary DEFINE FILE filename CLEAR|ADD tempfield[/format] [WITH realfield]=expression; tempfield[/format] REDEFINES qualifier.fieldname=expression; END Syntax Summary FOCUS for SIS Beginning Report Writing
112
TABLE FILE filename HEADING [CENTER] "text" display command} [SEG.]field [/R|/L|/C] [/format] display command}[prefixop.][field] [/R|/L|/C] [/format] [NOPRINT|AS 'title1,...,title5'] [AND|OVER] [obj2...obj495] [WITHIN field] [IN n] COMPUTE field[/format ]=expression;[AS 'title,...,title5'] [IN n] [AND] ROW-TOTAL [/R|/L|/C] [/format][AS 'name'] [AND] COLUMN-TOTAL [/R|/L|/C] [AS 'name'] ACROSS [HIGHEST] sortfieldn [IN-GROUPS-OF qty] [NOPRINT|AS'title1,...,title5'] BY [HIGHEST] sortfieldn [IN-GROUPS-OF qty] [NOPRINT|AS'title1,...,title5'] BY [HIGHEST|LOWEST{n}]TOTAL[prefix_operator]{field|code_valu e} RANKED BY {TOP|HIGHEST|LOWEST} [n]field ON sortfield option1 [AND] option2 [WHEN expression;...] Syntax Summary FOCUS for SIS Beginning Report Writing
113
WHERE [TOTAL] expression WHERE RECORDLIMIT EQ n WHERE READLIMIT EQ n IF [TOTAL] field relation value [OR value...] ON TABLE SET parameter value ON TABLE HOLD [VIA program][AS name] [FORMAT format] [MISSING {ON|OFF}] ON TABLE PCHOLD [AS name] [FORMAT format] [MISSING {ON|OFF}] ON TABLE SAVE [AS name] [FORMAT format] [MISSING {ON|OFF}] ON TABLE SAVB [AS name] [FORMAT format] [MISSING {ON|OFF}] ON TABLE NOTOTAL ON TABLE COLUMN-TOTAL [/R|/L|/C] [AS 'name'] fieldname ON TABLE ROW-TOTAL [/R|/L|/C] [format] [AS 'name'] fieldname Syntax Summary FOCUS for SIS Beginning Report Writing
114
FOOTING [CENTER] [BOTTOM] "text" MORE FILE file2 [IF field relation value [OR value...]|WHERE expression] {END|RUN|QUIT} Syntax Summary FOCUS for SIS Beginning Report Writing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.