VSAM - Information Builders

advertisement
“You Asked For It, You Got It!”
Best New [Backend] Features of WebFOCUS 7.7.03
Walter Blood
Noreen Redden
Joel Starkman
Information Builders, Inc.
August, 2011
You Asked For It, You Got It!
You Asked For It, You Got It!
WebFOCUS and FOCUS are Like Twins
7.7.03 finally brings together WebFOCUS and FOCUS
Virtually identical backend features and functionality
 New features hit all products and platforms together
 Minimal difference between internal code paths
 Focexecs work identically in either product
 Bugs are fixed once for everyone
The Siamese Twins at
Garden of the Gods Park,
Colorado Springs, Co.
You Asked For It, You Got It!
MASTER
Joel
TABLE
Noreen
OUTPUT
and Efficiencies
Walter
You Asked For It, You Got It!
MASTER
JOEL STARKMAN
Director of Operations
FOCUS Division, Information Builders
Absolute Value format
TABLE
DBA
WHERE
FILTER in the Master
Extended Limits
Business Views
OUTPUT
and Efficiencies
You Asked For It, You Got It!
Absolute Value Format Option
A – IF
absolute
implied
value
FILE = filename
SEGMENT =
FIELD= VALUE1,, FORMAT = F8.2 ,$
DEFINE VALUE2/F8.2AM = VALUE1; ,$
DEFINE VALUE3/D8.2B
= VALUE1; ,$
DEFINE VALUE4/D12.2Ac = VALUE1; ,$
MASTER
VALUE1
VALUE2
VALUE3
VALUE4
-1484.27
$1484.27
[1,484.27]
1484.27
!! Column totals add
original signed values
REPORT
You Asked For It, You Got It!
WHERE in DBA
Use WHERE in DBA instead of IF
FILE =
SEGMENT =
FIELD=
END
DBA
USER=XYZ, RESTRICT=VALUE, VALUE=ITEM NE RADIO
MASTER
FILE =
MASTER
SEGMENT =
FIELD=
END
DBA
USER=XYZ, RESTRICT=VALUE_WHERE, VALUE=ITEM NE 'RADIO '; ,$
USER=ABC, RESTRICT=VALUE_WHERE, VALUE=ITEM NE 'RADIO'
AND BB NE 'AA ' ; ,$
More complex
expressions
You Asked For It, You Got It!
COMPUTE in MFD
Put global Computes into the metadata
for general availability
FILE = filename
MASTER
SEGMENT =
Any format
FIELD=FIELD1,, A3,$
Any expression
FIELD=FIELD2,, A4,$
DEFINE DEFFIELD/A7 = FIELD1 | FIELD2 ; ,$
COMPUTE COMPFIELD/D12.2 = IF…THEN…ELSE… ; ,$
TABLE FILE filename
PRINT FIELD1 FIELD2 DEFFIELD
COMPUTE COMPFIELD;
END
No operator,
no expression,
add semicolon
FOCEXEC
It was actually
in Release 7.6 !
You Asked For It, You Got It!
FILTER in MFD
Put your global filters into the
metadata for general availability *
FILE = filename
MASTER
SEGMENT =
Filter format is always I1
FIELD=FIELD1,, A3,$
FIELD=FIELD2,, A4,$
DEFINE DEFFIELD/A7 = FIELD1 | FIELD2 ; ,$
FILTER FILTFIELD = FIELD1 NE FIELD2; ,$
TABLE FILE filename
PRINT FIELD1 FIELD2 DEFFIELD
WHERE FILTFIELD
END
Expression must
resolve to 0 or 1
(false or true)
FOCEXEC
No operator, no
expression
* Works independently of FILTER FILE syntax
You Asked For It, You Got It!
Business “View” of a Database
A VIEW into the original file – no new data, no separate extraction
 Reflect the business instead of physical field arrangement
 Limit the fields accessible in the main file, without DBA
 Have as many different Business Views as required; Direct via USE
 BV recognized only for extract (TABLE[F], GRAPH, MATCH, MORE)
 JOIN a Business View to other files
Business
View
MFD
Original
MFD
FILE=ORIG,
SUFFIX=any
FILE=anyname,
CRFILE = ORIG
FOLDER=
You Asked For It, You Got It!
Business “View” of a Database
FILE=ORIG, SUFFIX=FOC
SEGNAME=SEG1, …
FILE=BUSVIEW, …
FIELD=SOCSECNO, …
SEGNAME=SEG1, CRFILE=ORIG,
FIELD=NAME, …
CRINCLUDE=ALL, $
FIELD=SALARY, …
FOLDER=FOLDER1,$
SEGNAME=SEG2, PARENT=SEG1
FIELD=FULLNAME,, ALIAS=NAME,$
FIELD=COMPANY, …
FIELD=SSN,, ALIAS=SOCSECNO,$
this Business
View
FIELD=COMPANY,,TITLE=‘CO
NAME’,$
omits SALARY
Rename or rearrange fields without touching original file
 Each Business View field relates (maps) to an original field
 TABLE with BV field names translates to original names
• Attributes and relationships are taken from the original field
 New DEFINEs permitted in Business View master
SET FOCTRANSFORM = ON
You Asked For It, You Got It!
Extended Limits
256K total length of all fields in a request
64 character Define Function name
32 gigabyte XFOCUS partition
128 BY/ACROSS sort phrases
1022 JOIN segments
You Asked For It, You Got It!
NOREEN REDDEN
MASTER
FocWizard, Core Product Specialist
Advanced Technical Services
Information Builders
TABLE
Across Print
Hide Null Across
Heading WhenOUTPUT
and Efficiencies
Subtotal Above
You Asked For It, You Got It!
ACROSSPRT and HIDENULLACRS
One line per
record retrieved
TABLE FILE EMPDATA
PRINT
'EMPDATA.EMPDATA.SALARY'
BY 'EMPDATA.EMPDATA.MAJ' NOPRINT
BY 'EMPDATA.EMPDATA.LCAREA' AS 'Area'
ACROSS 'EMPDATA.EMPDATA.LCDEPT' AS 'Dept:‘
WHERE LCDEPT EQ 'Admin Services' OR 'Consulting'
OR 'Accounting' OR 'Marketing'
ON EMPDATA.EMPDATA.MAJ SUBTOTAL AS ''
ON EMPDATA.EMPDATA.MAJ PAGE-BREAK
HEADING
"Compensation Report“
…
One column for
each value
You Asked For It, You Got It!
ACROSSPRT and HIDENULLACRS
One column for
each ACROSS value
AREA
Central
North Eastern
PAGE 1
COMPENSATION REPORT
DEPT
Accounting
Admin Services
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
$25,400.00
.
.
.
.
.
No values in
.
Accounting
.
.
column
.
.
.
.
You Asked For It, You Got It!
ACROSSPRT and HIDENULLACRS
SET ACROSSPRT = COMPRESS
Eliminates MISSING cells
Moves up non-missing values within BY
Default is NORMAL
SET HIDENULLACRS = ON
 Null ACROSS columns are removed when no value exists
for that ACROSS column within the BY group
BY group must specify PAGE-BREAK
 Higher “BY” SUBTOTAL may force column display
Ignored with ACROSS FIELD COLUMNS value …
Default is OFF
You Asked For It, You Got It!
ACROSSPRT and HIDENULLACRS
SET ACROSSPRT=COMPRESS
Empty rows are removed
COMPENSATION REPORT
DEPT:
Admin Services
Consulting
Marketing
AREA
Central
North Eastern
South Eastern
Western
Branch Admin
PAGE 1
$25,400.00
.
.
.
.
.
$30,800.00
.
.
.
.
.
$49,500.00
$35,900.00
$40,900.00
.
$62,500.00
$55,500.00
$52,000.00
$32,300.00
$62,500.00
$50,500.00
$43,400.00
$58,800.00
$56,200.00
$126,300.00
$417,500.00
SET HIDENULLACRS=ON
Accounting column is suppressed
Columns may change per pagebreak
You Asked For It, You Got It!
ACROSSPRT and HIDENULLACRS
COMPENSATION REPORT
DEPT:
Accounting
Marketing
AREA
Corporate
$83,000.00
$32,400.00
$79,000.00
$62,500.00
$26,400.00
$55,500.00
$62,500.00
$35,200.00
.
.
Total Corp
$283,300.00
$153,200.00
PAGE 2
SET HIDENULLACRS=ON
Accounting column returns on this page
You Asked For It, You Got It!
Subtotals Above the Line
SET SUMMARYLINES = EXPLICIT
SET SUBTOTALS = ABOVE
TABLE FILE EMPDATA
PRINT PIN SALARY AS 'Pay'
BY MAJ NOPRINT PAGE-BREAK REPAGE SUBTOTAL
BY AREA NOPRINT PAGE-BREAK
ON AREA SUBTOTAL AS 'Total Area'
WHEN MAJ NE 'Corporate'
BY DEPT AS 'Department'
Code continues…
You Asked For It, You Got It!
Headings WHEN
HEADING CENTER
"&DATEMTRDYY
Compensation Report "
HEADING
This heading
"Corporate Division "
always appears
WHEN MAJ EQ 'Corporate';
HEADING
"<MAJ "
"<AREA "
WHEN MAJ NE 'Corporate' AND TABPAGENO EQ 1;
HEADING
"<MAJ (Continued) "
"<AREA "
WHEN MAJ NE 'Corporate’ AND TABPAGENO GT 1 ;
END
You Asked For It, You Got It!
Subtotals Above and Headings WHEN
HEADING WHEN
2 headings selected
SET SUBTOTALS = ABOVE
Subtotals moved above detail lines
Compensation Report
Branch Admin
Central
Department
PIN
Pay
Total Branch Admin
$1,592,700.00
Total Area Central
$493,700.00
ADMIN SERVICES
000000180
$25,400.00
MARKETING
000000040
$62,500.00
PERSONNEL
000000240
$33,300.00
PERSONNEL
000000250
$25,000.00
PERSONNEL
000000390
$45,000.00
PROGRMING & DVLPMT 000000260
$49,500.00
PROGRMING & DVLPMT 000000290
$40,900.00
SALES
000000050
$54,100.00
SALES
000000200
$115,000.00
SALES
000000360
$43,000.00
Page 1of 4
You Asked For It, You Got It!
Subtotals Above and Headings WHEN
HEADING WHEN
2 different headings selected
(due to page 2)
Compensation Report
Branch Admin (Continued)
North Eastern
Department
PIN
Total Area North Eastern
CUSTOMER SUPPORT
CUSTOMER SUPPORT
MARKETING
MARKETING
MARKETING
SALES
SALES
Page 2of 4
000000110
000000140
000000060
000000310
000000410
000000190
000000210
Subtotal above detail
Pay
$304,200.00
$19,300.00
$62,500.00
$55,500.00
$52,000.00
$32,300.00
$39,000.00
$43,600.00
You Asked For It, You Got It!
Subtotals Above and Headings WHEN
HEADING WHEN
just Corporate heading selected
Compensation Report
Corporate Division
Department
PIN
Total Corporate
ACCOUNTING
ACCOUNTING
ACCOUNTING
ACCOUNTING
ACCOUNTING
MARKETING
MARKETING
MARKETING
Page 1of 1
000000070
000000100
000000300
000000370
000000400
000000010
000000130
000000320
Subtotal above detail
Pay
$436,500.00
$83,000.00
$32,400.00
$79,000.00
$62,500.00
$26,400.00
$55,500.00
$62,500.00
$35,200.00
You Asked For It, You Got It!
MASTER
WALTER BLOOD
Technical Director of Product Management
FOCUS Division, Information Builders
Active Reports
Output to Powerpoint
TABLE
SQL Efficiencies
Character Collation
MFACT – Multipath Handling
OUTPUT
and Efficiencies
You Asked For It, You Got It!
Output and Efficiencies
Active Reports for FOCUS
 Provide enduser the same ability to manipulate report
 Limited to HTML reports
 Complete report including javascript created in FOCUS
TABLE FILE filename
SUM ….
…
ON TABLE HOLD AS ABC FORMAT AHTML
END
You Asked For It, You Got It!
Active Reports for FOCUS
COUNTRY
CAR
MODEL
RETAIL_COST
DEALER_COST
SALES
ENGLAND
JAGUAR
V12XKE AUTO
8,878
7,427
0
8,878
7,427
0
13,491
11,194
12000
*TOTAL MODEL XJ12L AUTO
13,491
11,194
12000
*TOTAL CAR JAGUAR
22,369
18,621
12000
17,850
14,940
0
*TOTAL MODEL INTERCEPTOR III
17,850
14,940
0
*TOTAL CAR JENSEN
17,850
14,940
0
5,100
4,292
0
5,100
5,100
4,292
4,292
0
0
45,319
37,853
12000
*TOTAL MODEL V12XKE AUTO
XJ12L AUTO
JENSEN
TRIUMPH
*TOTAL MODEL TR7
*TOTAL CAR TRIUMPH
*TOTAL COUNTRY ENGLAND
INTERCEPTOR III
TR7
ON TABLE HOLD FORMAT HTML
You Asked For It, You Got It!
Active Reports for FOCUS
ON TABLE HOLD FORMAT AHTML
You Asked For It, You Got It!
Active Reports for FOCUS
Additional Stylesheet Controls allow you to –
 Apply calculations to columns and control display location
 Control data display by hiding or freezing columns
 Control the user menu display
 Limit the number of rows per page
 Add graphic visualization of numeric data
 Customize colors for most of the report components
 Control the Report Menu options available to the user
You Asked For It, You Got It!
Output to Powerpoint
Instant Presentations
HOLD FORMAT PPT
TABLE FILE CAR
HEADING CENTER
"CAR SALES - CURRENT STATISTICS"
"CREATED ON &DATEMTRDYY"
"FOR COUNTRY <COUNTRY"
""
SUM RCOST DCOST SALES
BY COUNTRY PAGE-BREAK NOPRINT
BY CAR UNDER-LINE NOPRINT
ON CAR SUBHEAD
"Current Sales for <CAR "
""
BY MODEL SUB-TOTAL MULTILINES
ON TABLE HOLD AS PPT4 FORMAT PPT
ON TABLE SET STYLE *
You Asked For It, You Got It!
Output to Powerpoint
WebFOCUS Graphics !
WebFOCUS Reports
Excel, HTML, PDF
Dashboard, Graphics
Visual Discovery
You Asked For It, You Got It!
SQL Efficiencies
More Optimization to speed your requests!
DEFINE FUNCTION – optimized where possible
Boolean expressions – optimized as SQL CASE
statements
SQL.<sqlfunctionname> – passed directly to the
relational engine
DEFINE and IFTHENELSE – optimized as
SQL CASE or SQL COUNT statements
WebFOCUS sorting optimized to ORDER BY
expression
You Asked For It, You Got It!
SET COLLATION
When does DIGITAL = digital?
In 7.7 – with SET COLLATION !
SET COLLATION =
{BINARY|SRV_CI|SRV_CS|CODEPAGE}
Case Insensitive -- all WHERE tests and sorts
ignore the case of the elements being compared
Affects sorting, WHERE conditions, Comparison
in Calculations, StyleSheets
**** Server-only Setting ****
Copyright 2007, Information Builders. Slide 32
You Asked For It, You Got It!
Collation
DEFINE FILE CENTINV
FLAG/A1=IF CENTINV.INVINFO.PRODNAME CONTAINS 'ZT' THEN '$'
ELSE 'Y';
END
SET EQTEST = &EQTEST
TABLE FILE CENTINV
PRINT
'CENTINV.INVINFO.FLAG'
'CENTINV.INVINFO.PRICE'
BY 'CENTINV.INVINFO.PRODNAME'
HEADING
" Setting of EQTEST is &EQTEST “
“ COLLATION is set to SRV_CI “
" Filter: WHERE CENTINV.INVINFO.FLAG EQ '$'; “
"
AND PRODTYPE EQ 'DIGITAL'; "
FOOTING
""
WHERE ( CENTINV.INVINFO.FLAG EQ '$' )
AND ( CENTINV.INVINFO.PRODTYPE EQ 'Digital' );
…
Copyright 2007, Information Builders. Slide 33
You Asked For It, You Got It!
SET COLLATION
Setting of EQTEST is EXACT
COLLATION is set to SRV_CI
Filter: WHERE CENTINV.INVINFO.FLAG EQ '$'
AND PRODUCT CONTAINS 'DIGITAL';
Product
Name:
ZT Digital PDA – Commercial
FLAG
$
Price:
499.00
Copyright 2007, Information Builders. Slide 34
You Asked For It, You Got It!
MFACT for Multi-Path
 Sort within request must be consistent –
all sort fields within path of all verb objects
 Multiple parents requires change to this requirement
 SET FOCTRANSFORM = MFACT
supports requests where sorts are applicable to only
some of the verb objects
 Request is decomposed to MATCH to sort the
appropriate fields, followed by TABLE to format and
display the results
You Asked For It, You Got It!
MFACT for Multi-Path
EMPINFO
BY
PAY_DATE
PAYINFO
TABLE FILE EMPLOYEE
SUM SALARY GROSS
BY EID
BY LAST_NAME
BY HIGHEST DAT_INC
BY PAY_DATE
END
BY EID
BY LAST_NAME
SALINFO
BY
DAT_INC
You Asked For It, You Got It!
MFACT for Multi-Path
PAGE
EMP_ID
LAST_NAME
-------------071382660 STEVENS
112847612 SMITH
1
DAT_INC PAY_DATE
------- -------82/01/01 81/12/31
81/01/01 81/11/30
. 82/01/29
82/02/26
82/03/31
82/04/30
82/05/28
82/06/30
82/07/30
82/08/31
82/01/01 82/01/29
. 82/02/26
82/03/31
82/04/30
82/05/28
82/06/30
82/07/30
SALARY
-----$11,000.00
$10,000.00
.
.
.
.
.
.
.
.
$13,200.00
.
.
.
.
.
.
GROSS
----$833.33
$833.33
$916.67
$916.67
$916.67
$916.67
$916.67
$916.67
$916.67
$916.67
$1,100.00
$1,100.00
$1,100.00
$1,100.00
$1,100.00
$1,100.00
$1,100.00
Download