www.informationbuilders.com

Download Report

Transcript www.informationbuilders.com

ONE-LINERS
for WebFOCUS Efficiency
Joel Starkman
Director of Operations, FOCUS Division
Information Builders, Inc.
June 2012
Copyright 2007, Information Builders.
Slidevideo
1
Skip
One-Liners For WebFOCUS Efficiency
Perform one extra pre-step in your process, or
Replace one type of statement with another, or
Add one line into or before your request, or
Issue just one additional SET statement.
Copyright 2007, Information Builders. Slide 2
Prove it - How do I see these savings?
-SET &STARTCPU = &FOCCPU ;
TABLE ….
Capture CPU
-RUN
in-stream
-SET &ENDCPU = &FOCCPU ;
-SET &USED=(&ENDCPU - &STARTCPU) /1000;
-TYPE Table used &USED CPU seconds
Examine
post-execution
operating system
statistics
Use TABLEF when appropriate
“I installed a skylight in my apartment yesterday.
Liners
FOCUS
Efficiency
The people whoOne
live above
me For
are really
furious.”
F
TABLE
FILE CAR
SUM DCOST
BY COUNTRY
BY CAR
ON CAR SUBFOOT
END
Extract
data
Steven Wright
Data already sorted in the
order of the report request?
Use TABLEF !!
Sort and
Merge
data
Generate
report
S
AVINGS: Eliminates large cost of sorting, even if none to do.
Copyright 2007, Information Builders. Slide 4
Use AUTOTABLEF to bypass the Merge phase
“My grandmother started walking five miles a day
when she was sixty.
ninety-seven
now, Efficiency
One She’s
Liners
For FOCUS
and we have no idea where she is.”
SET AUTOTABLEF=ON
TABLE FILE …
SUM [~200 fields]
BY [3 sorts]
ON TABLE HOLD
END
Extract
data
Ellen Degeneres
Performs the sort phase, but
does not build internal matrix.
Sort and
merge
data
Generate
report
S
AVINGS: This customer cut a 6-hour report to 6-minutes.
Copyright 2007, Information Builders. Slide 5
Most of the time, you don’t need the Internal Matrix
"If you live to the age of a hundred you have it made
because very few people
past theFor
age FOCUS
of a hundred.”
OnedieLiners
Efficiency
SET SAVEMATRIX = OFF
TABLE FILE CAR
SUM DCOST
BY COUNTRY
ON TABLE HOLD
END
No need to
create or preserve
the Internal Matrix?
When is SAVEMATRIX=ON
needed ? See next slide.
George
Burns
born Nathan Birnbaum
Savematrix defaults
to OFF in Rel 7.2+,
but might be set ON
in a site-wide profile.
S
AVINGS: Significant cost of creating a matrix that is not used.
Copyright 2007, Information Builders. Slide 6
Do the HOLDs after the END
“I’m not going to buy my kids an encyclopedia.
Let them walk
school like
OnetoLiners
ForI did.”
FOCUS Efficiency
HOLD’ing the same results
in 3 different formats?
S
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE HOLD AS HTML
END
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE HOLD AS EXL2K
END
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE HOLD AS PDF
END
Re-extracts
Re-extracts
entire
entire
data set
set3oftimes
data
3 times !
Instead:
Yogi Berra
born Lawrence Peter Berra
SET SAVEMATRIX = ON
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE HOLD AS HTML
END
HOLD AS EXL2K
HOLD AS PDF
Re-uses
saved matrix
AVINGS: 50% for 2 HOLD, 66% for 3 HOLDS, etc.
Copyright 2007, Information Builders. Slide 7
Extract once to HOLD, then do multiple TABLEs
“Apparently, a new survey says that three out of four
people make One
up 75%
of the population.”
Liners
For FOCUS Efficiency
TABLE FILE HUGE
SUM …
IF REGION EQ ‘NORTH’
OR ‘SOUTH’
OR ‘EAST’
OR ‘WEST’
ON TABLE HOLD
END
TABLE FILE HUGE
SUM …
IF REGION EQ ‘NORTH’
END
TABLE FILE HUGE
SUM …
IF REGION EQ ‘SOUTH’
END
TABLE FILE HUGE
SUM …
IF REGION EQ ‘EAST’
END
TABLE FILE HUGE
SUM …
IF REGION EQ ‘WEST’
END
David Letterman
Why extract
the entire
database
four times?
SAVINGS: Spend a little, get a lot, when high degree of aggregation.
Copyright 2007, Information Builders. Slide 8
For constants, use an &Variable instead of DEFINE
“I was going to have cosmetic surgery until I noticed
that the doctor's office
wasLiners
full of portraits
by Picasso.”
One
For FOCUS
Efficiency
Recalculated for
every record
DEFINE FILE CAR
INCR/I3 = 50 ;
END
TABLE FILE CAR
SUM DCOST
COMPUTE
NEWCOST=DCOST + INCR ;
BY COUNTRY BY CAR
END
Calculated once
for entire report
Rita Rudner
Instead:
-SET &INCR = 50 ;
TABLE FILE CAR
SUM DCOST
COMPUTE
NEWCOST=DCOST + &INCR ;
BY COUNTRY BY CAR
END
SAVINGS: Could save millions of calculations, one per record.
Copyright 2007, Information Builders. Slide 9
Substitute DEFINE with COMPUTE
“The IQ and the life expectancy of the
average American
recently
passed
other,
One
Liners
Foreach
FOCUS
going in opposite directions.”
Calculated for
every record
extracted
DEFINE FILE CAR
INCR/I7 = DCOST * 5 ;
END
TABLE FILE CAR
SUM DCOST
INCR
BY COUNTRY BY CAR
END
S
Efficiency
Calculated for
each report row
after summation
George Carlin
Instead:
TABLE FILE CAR
SUM DCOST
COMPUTE INCR/I7 = DCOST * 5 ;
BY COUNTRY BY CAR
END
Careful! You cannot always substitute DEFINE with COMPUTE.
AVINGS: Increases with record volume extracted and aggregated.
Don’t read the entire flat file
"I always wanted to be somebody, but I should have
been
specific."
Onemore
Liners
For FOCUS Efficiency
“
The flat file is sorted on the
screened field; stop searching
when you see a larger value.
One Million Records
TABLE FILE NAMES
PRINT NAME
IF NAME LT ‘E’
END
Allen
Beatty
Bullock
Denver
Kidman
.
.
Zappa
Ten Records
SET FIXRETRIEVE=ON
Lily Tomlin
*Only for
flat files
“
S
AVINGS: Average 50% search time; could save 1% or 99%.
Copyright 2007, Information Builders. Slide 11
Reformat fields inside the TABLE instead of DEFINE
“I base most of my fashion taste on what doesn't itch.”
One Liners For FOCUS Efficiency
DEFINE FILE CAR
Gilda Radner
-* DCOST is originally D12.2
INTCOST/I6 = DCOST ;
Instead:
END
TABLE FILE CAR
TABLE FILE CAR SUM DCOST
SUM COST
DCOST/I6 AS ‘INTCOST’
INTCOST
BY CAR
Hint: Extra field appears in a HOLD file.
BY CAR
END
To remove, SET HOLDLIST=PRINTONLY
END
No DEFINE needed
S
AVINGS: Only final displayed field is reformatted.
Copyright 2007, Information Builders. Slide 12
Flip to Alternate File View to elevate screening criteria
“I asked a fellow at hang-glider school 'How many
successful jumps do
you need
before
graduate?'
One
Liners
Foryou
FOCUS
Efficiency
He said, 'All of them.’ ”
N
T
E
MODEL
R
S
BODY
DCOST
Red Skelton
MODEL
TABLE.DCOST
FILE CAR
CAR
PRINT MODEL DCOST
IF DCOST GE 20000
END
COUNTRY
COUNTRY
CAR
DCOST
CAR
I
BODY
MODEL
O
Why follow
pointers all the
way to the bottom,
just to find that a
DCOST does not
fit the criteria?
BODY
COUNTRY
DCOST
P
SAVINGS: Tremendous reductions in I/O and response time.
Copyright 2007, Information Builders. Slide 13
Use Indexed File View to elevate screening criteria
“I don’t like watching golf on TV. I can’t stand
whispering.”
One
Liners For FOCUS
N
T
E
MODEL
R
S
BODY
DCOST
MODEL
TABLE.DCOST
FILE CAR
CAR
PRINT MODEL DCOST
IF DCOST GE 20000
END
COUNTRY
COUNTRY
CAR
DCOST David Brenner
CAR
I
BODY
MODEL
O
Same dot-syntax
as alternate view;
uses index
automatically
when present.
BODY
COUNTRY
DCOST
P
Efficiency
SAVINGS: Tremendous reductions in I/O and response time.
Note: Index view requires test on indexed field
Copyright 2007, Information Builders. Slide 14
Presort the data before loading
“I’m the kind of guy who will have nothing all my life and
then they’ll discover
oil Liners
while digging
my grave.”Efficiency
One
For FOCUS
E
H
F
G
D
Unsorted
Sorted
D
E
F
G
H
George Gobel
A
B
Page 1
C D P a g e 2E F
G
Page 3
H I
Same applies
to MAINTAIN
Call system sort
MODIFY FILE …
FIXFORM keyfield
MATCH keyfield
ON NOMATCH UPDATE
DATA ON …
J
Page 4
Sort the data file first
SAVINGS: Could be 100’s of times faster on large volumes.
Copyright 2007, Information Builders. Slide 15
JOIN in the faster direction
“I find television very educating.
Every timeOne
somebody
turns
onFOCUS
the set,
Liners
For
I go into the other room and read a book.”
Carly Corinthos
Alexis Davis
Dr. Patrick Drake
Damian Spinelli
Dante Falconeri
Ethan Lovett
Johnny Zacchara
Olivia Falconeri
Shawn Butler
Steven Webber
Jasper "Jax" Jacks
Luke Spencer
Maxie Jones
Sonny Corinthos
Elizabeth Spenser
Samantha McCall
Jason Morgan
Edward Quartermaine
Michael Corinthos, III
Tracy Quartermaine
Malcolm ‘Mac’ Scorpio
Lulu Spencer
Max Giambetti
Elizabeth Webber
Operator
Technical
Operator
Technical
Vice Pres
Operator
Manager
Secretary
Technical
Manager
President
President
Operator
President
Secretary
Operator
Technical
Vice Pres
Operator
Operator
Manager
Operators
Technical
Technical
Manager
Operator
President
Secretary
Technical
Vice Pres
A1
C2
C2
B3
C2
A1
Efficiency
JOB
TABLE FILE ????
PRINT NAME
WHERE BLDG IS ‘C2’
END
Groucho Marx
born Julius Henry Marx
JOIN POS IN
GH
TO POS IN
JOB
JOIN POS IN
JOB
TO POS IN
GH
FILE=GH
SEGMENT=GH1, …
FIELD=NAME, …
FIELD=POS, …INDEX=I,$
…
FILE=JOB
SEGMENT=JOB1, …
FIELD=POS, …, INDEX=I,$
FIELD=BLDG, …
…
SAVINGS: Could reduce processing time by 90% or more.
Copyright 2007, Information Builders. Slide 16
Build your own External Index
when you don’t have write access to the file
“A boy can learn a lot from a dog: obedience, loyalty,
and the importance
turning around
three times
OneofLiners
For FOCUS
Efficiency
before lying down.”
One Million Records
S
AHP
F
FGJH
J
IDSA
E
JSDQR
W
LFS
Z
Non-writeable
file,
- index on field 2
no
ZWIO
H
E
X
T
E
R
N
A
L
I
N
D
E
X
A
A
A
C
D
D
E
F
H
H
H
J
.
.
.
.
U
W
X
Y
Z
Z
>> rebuild
ENTER OPTION
Robert Benchley
external index
NEW OR ADD TO EXISTING?. . .
Build your
own index
TABLE FILE filename.indexfield
Note:
External Index is static - not updated per transaction.
Must Rebuild Index if file changes, say nightly.
AVINGS: Could reduce data accessing time by 90% or more.
Copyright 2007, Information Builders. Slide 17
BY TOTAL – Sort by computed columns in one pass
“Curious people are interesting people.
I wonder
why thatFor
is.“ FOCUS
One Liners
Efficiency
Sort by Average Sales*
COUNTRY CAR
AVE SALES
SALES
ENGLAND JENSEN
17650
73000
TRIUMPH
24200
122000
JAPAN
HONDA
17480
235000
18250
197300
TABLE FILE TOYOTA
CAR
Bill Maher
No HOLD !
SUM SALES AVE.SALES
TABLE FILE CAR
BY COUNTRY BY CAR BY AVE.SALES
SUM SALES
ON TABLE HOLD
BY COUNTRY BY CAR
END
BY TOTAL AVE.SALES
TABLE FILE HOLD
SUM E03 BY COUNTRY BY CAR
END
BY E04 AS ‘Ave Sales’’
END
SAVINGS: Eliminates second pass of the data – could be 50%.
*Invented
numbers
Copyright 2007, Information Builders. Slide 18
Display the number of the last page (Finally!)
“A girl phoned me the other day and said ‘Come on
over, there’s nobody
home’. For
I went
over.
One Liners
FOCUS
Efficiency
Nobody was home.”
TABLE FILE CAR
HEADING
"PAGE <TABPAGENO OF <TABLASTPAGE </1"
SUM DCOST BY COUNTRY PAGE-BREAK
ON TABLE HOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT,FONT=ARIAL,$
ENDSTYLE
END
Rodney Dangerfield
born Jacob Cohen
Page 4 of 4
Page 3 of 4
Page 2 of 4
Page 1 of 4
REPORT
Note:
&FOCNEXTPAGE is set to TABLASTPAGE+1
Supported for FORMAT HTML/PDF/PS only
SAVINGS: Internally still two passes – mostly for coding simplicity
Copyright 2007, Information Builders. Slide 19
Test higher-hit fields first
“The most exciting phrase to hear in science, the one
that heralds newOne
discoveries,
not FOCUS
'Eureka!' but
Liners isFor
Efficiency
'That's funny...‘ ”
DEFINE FILE ...
EXCHANGE/A3 = EDIT(PHONE,'$$$999$$$$');
FLAG/A1 = IF (SALARY + BENEFITS GT 50000)
Isaac Asimov
AND (EXCHANGE EQ '736‘) THEN 'Y' ELSE 'N';
END
Calculated first
Do real fields first, or
for
every
record
TABLE FILE ... -- and often false
TABLE FILE ... those most likely to
eliminate records
PRINT ...
PRINT ...
WHERE FLAG EQ 'Y‘
IF LASTNAME EQ ‘$M$*'
IF EXCHANGE EQ '736‘
IF EXCHANGE EQ '736'
IF LASTNAME EQ ‘$M$*'
WHERE FLAG EQ 'Y‘
END
END
Technique applies to fields on the same level.
Higher level screens are always done first,
regardless of the order coded.
Complicated calc
done only when all
other criteria pass
SAVINGS: Potentially significant reduction in calculation time.
Copyright 2007, Information Builders. Slide 20
Do string manipulation inside the TABLE when possible
“????.”
One Liners For FOCUS Efficiency
DEFINE FILE ...
Marcel Marceau
born Marcel Mangel
LASTNAME2/A1 = EDIT(LASTNAME,’$9’);
END
TABLE FILE ...
TABLE FILE ...
PRINT ...
PRINT ...
IF LASTNAME2 EQ ‘M'
IF LASTNAME EQ ‘$M$*'
IF EXCHANGE EQ '736'
IF EXCHANGE EQ '736'
IF FLAG EQ 'Y‘
IF FLAG EQ 'Y‘
END
END
$ means any one character
$* means all remaining chars
SAVINGS: In-TABLE string manipulation is faster than DEFINE.
Copyright 2007, Information Builders. Slide 21
Index your HOLD file
“I’m this century’s Dennis The Menace.”
One Liners For FOCUS Efficiency
Extracts might be more efficient if
you could index important search
fields for subsequent reports.
Bart Simpson
born Bartholomew Jo-Jo Simpson
Sequential file
TABLE FILE …
sorted by
FOCUS database
EMPL_NO
PRINT CITY TITLE
indexed on
CITY
BY EMPL_NO
ON TABLE HOLD FORMAT FOCUS INDEX CITY
END
TABLE FILE HOLD
COUNT EMPL_NO BY TITLE IF CITY EQ ‘ORLANDO’
END
SAVINGS: Slower to build extract, but much faster post-retrieval.
Copyright 2007, Information Builders. Slide 22
Build an alternate master with large alphas
when you need only a few fields out of hundreds
“When you go into court you are putting your fate into
the hands of twelve people
who weren’t
enough
One Liners
For smart
FOCUS
Efficiency
to get out of jury duty.”
FILE=LOTSOF
SEGMENT=ONE
FIELD=ABC,,A10
FIELD=DEF,,I9
FIELD=GHI,,F4.1
FIELD=JKL,,D12.2
FIELD=MNO,,A5
SEGMENT=TWO
FIELD=PQR,,I9
FIELD=STU,,F4.1
FIELD=VWX,,D12.2
FIELD=YZA,,A5
FIELD=PQR,,I9
FIELD=STU,,F4.1
FIELD=VWX,,D12.2
FIELD=YZA,,A5
FIELD=PQR,,I9
FIELD=STU,,F4.1
FIELD=VWX,,D12.2
FIELD=YZA,,A5
FILE=LOTSOF
SEGMENT=ONE
FIELD=ABC,,A10
FIELD=DEF,,I9
Norm Crosby
FIELD=LAST3,,A17
!
Make sure you
count the bytes
properly
SEGMENT=TWO
FIELD=ALLONE,,A65
.
.
.
TABLE FILE
SUM ABC BY DEF
.
.
END
.
AVINGS: Reduce parsing time, especially for iterative usage.
S
Copyright 2007, Information Builders. Slide 23
JOIN WHERE - when two files have nothing in common!
“With kids, the days are long, but the years are short.”
One Liners For FOCUS Efficiency
Which employees can afford to buy a BMW?
JOIN FILE CAR
AT RETAIL_COST TO ALL
FILE EMPLOYEE AT CURR_SAL
AS CAREMP
John Leguizamo
WHERE CURRSAL GT (RETAIL_COST*3);
Interpretation: You have to earn at least $90,000 to afford a car of $30,000.
Example only; not the opinion of the presenter or Information Builders
END
TABLE FILE CAR
JOIN files
PRINT FIRSTNAME LASTNAME BY CAR
IF CAR EQ ‘BMW'
on any fields
CAR
FIRSTNAME LASTNAME
END
without indexes
----- --------- --------
BMW
JOHN
JOAN
BARBARA
BANNING
IRVING
CROSS
based on any
calculation
AVINGS: Actually slow, but tough to code many scenarios without it
S
Copyright 2007, Information Builders. Slide 24
Use JOIN instead of WHERE IN FILE
“If dogs could talk, it would take a lot of the fun
out
of owning
One
Linersone.”
For FOCUS Efficiency
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY NE 'ENGLAND'
ON TABLE HOLD AS VALUES FORMAT ALPHA
END
Andy Rooney
JOIN COUNTRY IN VALUES
TABLE FILE CAR
SUM SEATS BY COUNTRY
WHERE COUNTRY IN FILE VALUES
END
TO COUNTRY IN CAR AS J1
TABLE FILE VALUES
SUM SEATS BY COUNTRY
END
S
AVINGS: JOIN is generally faster than a file search for each record
Copyright 2007, Information Builders. Slide 25
Force use of the higher-hit index
“It’s money. I remember it from when I was single.”
One Liners For FOCUS Efficiency
FILE=CAR,…
CAR Master
SEGMENT=…,SEGTYPE=S1,$
FIELD=VALUE1,,A5,$
Billy Crystal
FIELD=VALUE2,,A9,FIELDTYPE=I,$
FIELD=VALUE3,,A2,FIELDTYPE=I,$
Automatically uses the
FIELD=VALUE4,,A1,FIELDTYPE=I,$
first index, regardless of
how the WHEREs are
FIELD=VALUE5,,A6,$
arranged in the TABLE
. . .
TABLE FILE CAR.VALUE3
PRINT ...
WHERE VALUE3 LT '736‘
Force WebFOCUS to use
WHERE VALUE4 EQ ‘ABC‘
the most valuable Index.
Only you know which
WHERE VALUE2 EQ 'Y‘
one that is!
END
SAVINGS: Significant reduction in data access time.
Copyright 2007, Information Builders. Slide 26
REBUILD FOCUS databases without the Index first
“Getting on a plane, I told the ticket agent to send one of
my bags to New YorkOne
and the
other to
LA.FOCUS
She said Efficiency
she
Liners
For
can’t do that. I told her she did it last week”.
FILE = …
SEGMENT = …
FIELD=ABC,,I5, FIELDTYPE=I ,$
FIELD=DEF,,A12,$
FIELD=GHI,,D12.2, FIELDTYPE=I ,$
FIELD=JKL,,F5,$
S
1.
2.
3.
4.
Henny Youngman
* (up to 7 indexes)
Remove indexes and save as alternate master
REBUILD REBUILD with no-index master
Put back original master with indexes
REBUILD INDEX
AVINGS: Usually measured in hours of elapsed time savings.
Copyright 2007, Information Builders. Slide 27
Minimize test-run time during development
“We spend the
firstsurvey
twelvesays
months
our children’s
“Apparently,
a new
thatof
three
out of four
lives teaching
toup
walk
and
talk,
andFOCUS
the next twelve
peoplethem
make
75%
of the
population.”
One
Liners
For
Efficiency
telling them to sit down and shut up.”
 Stop retrieval after the nth satisfying record
 Generally for Developers to quick-test code
 Easy to turn on and off; ignored in Production
David
Letterman
Phyllis
Diller
-DEFAULT &1 = ‘ ‘
-SET &&IFRECORDLIMIT = IF &1 NE ‘TEST’ THEN ‘ ‘
ELSE ‘IF RECORDLIMIT EQ 1’ ;
TABLE FILE …
EX focexecname TEST
PRINT …
BY …
Parameter
&1 of call
&&IFRECORDLIMIT
Hint: Use global &&
END
born Phyllis Ada Driver
Set once for entire application.
SAVINGS: Cut 99.9% of runtime (during testing).
&&IFRECORDLIMIT is NOT a reserved variable; could be any name.
Copyright 2007, Information Builders. Slide 28
Replace compound-IF in DEFINE with “WHERE”
“When I was born my father spent three weeks trying to
find a loophole
in my
birth certificate.”
One
Liners
For FOCUS Efficiency
DEFINE FILE ...
TESTFIELD/A1 =
IF (F1 EQ ‘ABC’) OR (F2 GE 27)
THEN ‘Y’ ELSE ‘N’ ;
END
TABLE FILE ...
IF TESTFIELD EQ ‘Y'
Instead:
END
TABLE FILE ...
Must use WHERE,
not IF, in this
compound situation
Jackie Vernon
WHERE (F1 EQ ‘ABC’) OR (F2 GE 27)
END
SAVINGS: WHERE is much faster than compound-IF in DEFINE
Copyright 2007, Information Builders. Slide 29
Use –REPEAT instead of –IF loop
Randolph Duke: “Mother always said you were greedy.”
Mortimer Duke: “SheOne
meant
it as a complement.”
Liners
For FOCUS Efficiency
Trading Places
-SET &CNT = 0 ;
-LOOPTOP
-SET &CNT = &CNT + 1 ;
TABLE, MODIFY, etc.
PRINT FIELD&CNT …
-IF &CNT LE 10 GOTO LOOPTOP;
-AFTERLOOP
Hint: Use &’s to
Hint:
Use &’s
vary the
vary
thetorange
range
dynamically.
dynamically
Can decrement.
Can be negative.
Ralph
Don
Bellamy Ameche
Instead:
-REPEAT LOOP FOR &CNT FROM 1 TO 10
TABLE, MODIFY, etc.
PRINT FIELD&CNT …
-LOOP
Other options:
S
-REPEAT label n TIMES
-REPEAT label WHILE condition
AVINGS: Minor, yet far more readable code.
Copyright 2007, Information Builders. Slide 30
EDIT is faster than comparable subroutines
“The guy who invented the first wheel was an idiot.
The guy who invented
other three
a genius.”Efficiency
Onethe
Liners
For –FOCUS
Extract the
exchange
DEFINE/COMPUTE
PHONE/A12 = ‘123-567-9012’;
Sid Caesar
born Isaac Sidney Caesar
EXCH/A3 = EDIT (PHONE, ‘$$$$999’) ;
EXCH/A3 = SUBSTR (12, PHONE, 5, 7, 3, EXCH) ;
EXCH/A3 = GETTOK (PHONE, 12, 2, ’-’, 3, EXCH) ;
EDIT does not apply to all
situations of partial extractions
SAVINGS: 25-50% directly attributable to those calculations.
Copyright 2007, Information Builders. Slide 31
One-Liners for WebFOCUS Efficiency
"I'd rather be a could-be if I cannot be an are;
because a could-be is a maybe who is reaching for a star.
I'd rather be a has-been
than
a might-have-been,
by far;
One
Liners
For FOCUS
Efficiency
for a might-have-been has never been, but a has was
once an are."
Milton Berle
born Milton Berlinger
I leave you
with this gem
Copyright 2007, Information Builders. Slide 32
End of presentation. Press Esc now.
Copyright 2007, Information Builders. Slide 33
Reduce MODIFY update notices
“I found the secret to the work week. I’ve convinced
myself that everything
after
MondayFor
is almost
Friday.”
One
Liners
FOCUS
Efficiency
MODIFY FILE CAR
Default: write to
FIXFORM
database every
MATCH field
1000 records
(1 for CRTFORM)
ON MATCH REJECT
ON NOMATCH INCLUDE
Or just
DATA ON file
CHECK OFF
CHECK 99999
Hint:Midstream recovery?
END
Use “START &TRANS”
Joel Starkman
Director, Focus Div, Information Builders
Hey! Who’s
this guy?
SAVINGS: Large I/O savings on bulk loads.
Copyright 2007, Information Builders. Slide 34
Eliminate 1000’s of REBUILD messages
“I set records that will never be equaled. In fact, I hope
90% of them
don’tLiners
ever getFor
printed.”
One
FOCUS Efficiency
SET REBUILDMSG = 100000
REBUILD
REORG
DUMP or LOAD
…
(Default is 1000)
Bob Uecker
CAR
FOCUS
A1 ON 09/23/2005 AT 16.19.05
REFERENCE...AT TRANS
100000
REFERENCE...AT TRANS
200000
REFERENCE...AT TRANS
300000
TRANSACTIONS:
TOTAL =302000 ACCEPTED=302000
SEGMENTS:
INPUT =302000 UPDATED =
0
REJECTED=
DELETED =
0
0
SAVINGS: On large files, millions of JES bytes; save forests if printed
Copyright 2007, Information Builders. Slide 35
Capture FOCUS commands and statistics with FOCLOG
“As a child my family’s menu consisted of two choices:
take
it orLiners
leave it.”
One
For FOCUS Efficiency
ind applications and focexecs that could significantly
benefit from adjustment, consolidation, redesign.
versee how much FOCUS is being used at your site.
Buddy
Hackett
born Leonard Hacker
hart interactive activity versus batch activity across all LPARs.
ocate excessive or misguided use by measuring CPU, paper output,
extract files, session length, frequency, repetition, ....
bserve how data is used by identifying the most popular extract
destinations via HOLD (like HTML, Excel 2000, PDF).
raph patterns and trends of usage across any time period.
SAVINGS: Could be immense based on analysis of usage data.
*FOCLOG is a chargeable product. See your local IBI Representative.
Copyright 2007, Information Builders. Slide 36
Split a field into pieces for instantaneous searches
“Always get married in the morning. That way if it
doesn’t work out, you
haven’t
wasted
whole day.”
One
Liners
FortheFOCUS
Efficiency
SSN
123-45-6789
SSN
QUESTION
SSN1TO3
How many pages
would I have to
search to find the
last of 999,999,999
SSN combinations?
SSN4TO5
DATA
USE FOR
Social Security Numbers
Phone Numbers
Credit Card Numbers
Hottrack Numbers (we do!)
Mickey
Rooney
born Joseph Yule, Jr.
I could index SSN,
but an index won’t
help on partial
searches
SSN6TO9
Store full SSN here too
DATA
SAVINGS: Rock-bottom I/O when searching for that ‘field’.
Copyright 2007, Information Builders. Slide 37
Pre-LOAD your application into memory
“When I adlib something, I laugh for the same reason
the audience does;One
I’ve never
heard
thatFOCUS
joke before
Liners
For
Efficiency
and I’m just as surprised as they are.”
LOAD FOCEXEC fex_name1 fex_name2 …
LOAD FOCCOMP compiled_modify_name
EX …
RUN …
Steve Allen
LOAD Masters and
Access Files too
Uses the image now in memory
? LOAD [filetype]
UNLOAD [* | filetype] [* | filename1 [filename2 …] ]
SAVINGS: Instant startup of large components. (No execution value.)
Copyright 2007, Information Builders. Slide 38