Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright 2007, Information Builders. Slide 1 All New One Liners for FOCUS and WebFOCUS Efficiencies Joel Starkman Director of Operations June 2008 When.

Similar presentations


Presentation on theme: "Copyright 2007, Information Builders. Slide 1 All New One Liners for FOCUS and WebFOCUS Efficiencies Joel Starkman Director of Operations June 2008 When."— Presentation transcript:

1 Copyright 2007, Information Builders. Slide 1 All New One Liners for FOCUS and WebFOCUS Efficiencies Joel Starkman Director of Operations June 2008 When Printing Handouts USE “Pure Black and White” not “Grayscale” Otherwise, all of the reverse-color text will not show up. This box exists only to allow you to access this outlying region of the screen where the above movement arrow line is visible when you click on Custom Animation of the picture at left of screen. This block of pictures streams across the screen repeatedly. Note the move-right Animation effect (dotted line with arrow on each end). Pre-Music - start it and stop it Click on the Music (speaker) icon the start the music. The description text Appears on that click also, as does the Stop icon. Click on the Stop icon to stop the music. The stop works by Action Setting Hyperlinking to the First Slide, which is itself (very cool). The description text Disappears on that click also, as does the Stop icon. Click anywhere else to proceed to the next slide. ‘Highway Blues’ from the “Speaking Out” album Mark Seales, composer; Ernie Watts, saxophone The image from the slide master is overlaid here so the Nashville image can take up the whole slide and not cover the IBI name or color-sweep at the bottom. The stamp and ‘MANY’ move onto the slide to simulate the stamp stamping the word ‘MANY’ onto the slide over the word “All”

2 Jump to end Copyright 2007, Information Builders. Slide 2 One-Liners For [Web]FOCUS Efficiency *Your mileage may vary 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, or Increase the appropriate default limit value 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, or Increase the appropriate default limit value The CPU TIME is actually two halves, oppositely cropped and re-attached, so that the bottom half can “fall off” in time with the scissor reaching the left side. Under them is a duplicate of the whole word with no background color; it gets exposed when the bottom half falls off to leave behind a “shadow” of the bottom half. Since the checkmark is used as a ‘theme’ on every subsequent slide, it is emphasized here by shrinking it into the bullets (in time with the Wiping of the bullet list).

3 Jump to end Copyright 2007, Information Builders. Slide 3 Prove it - How do I see these savings? STATISTICS OF LAST COMMAND RECORDS = 0 SEGS DELTD = 0 LINES = 0 NOMATCH = 0 BASEIO = 0 DUPLICATES = 0 SORTIO = 0 FORMAT ERRORS = 0 SORT PAGES = 0 INVALID CONDTS = 0 READS = 0 OTHER REJECTS = 0 TRANSACTIONS = 0 CACHE READS = 0 ACCEPTED = 0 MERGES = 0 SEGS INPUT = 0 SORT STRINGS = 0 SEGS CHNGD = 0 INDEXIO = 0 INTERNAL MATRIX CREATED: YES AUTOINDEX USED: NO SORT USED: FOCUS AUTOPATH USED: NO AGGREGATION BY EXT.SORT: NO HOLD FROM EXTERNAL SORT: NO STATISTICS OF LAST COMMAND RECORDS = 0 SEGS DELTD = 0 LINES = 0 NOMATCH = 0 BASEIO = 0 DUPLICATES = 0 SORTIO = 0 FORMAT ERRORS = 0 SORT PAGES = 0 INVALID CONDTS = 0 READS = 0 OTHER REJECTS = 0 TRANSACTIONS = 0 CACHE READS = 0 ACCEPTED = 0 MERGES = 0 SEGS INPUT = 0 SORT STRINGS = 0 SEGS CHNGD = 0 INDEXIO = 0 INTERNAL MATRIX CREATED: YES AUTOINDEX USED: NO SORT USED: FOCUS AUTOPATH USED: NO AGGREGATION BY EXT.SORT: NO HOLD FROM EXTERNAL SORT: NO -SET &STARTCPU = &FOCCPU ; TABLE, etc…. -RUN -SET &ENDCPU = &FOCCPU ; -SET &USED=(&ENDCPU - &STARTCPU) /1000; -TYPE Table used &USED CPU seconds -SET &STARTCPU = &FOCCPU ; TABLE, etc…. -RUN -SET &ENDCPU = &FOCCPU ; -SET &USED=(&ENDCPU - &STARTCPU) /1000; -TYPE Table used &USED CPU seconds TABLE/ MATCH MODIFY/ MAINTAIN MODIFY/ MAINTAIN Capture CPU in-stream TABLE, etc…. ? STAT Examine your post-execution operating system statistics

4 Jump to end Copyright 2007, Information Builders. Slide 4 Data already sorted in the order of the report request? Use TABLEF !! “Why is it that when you transport something by car, it's called a shipment, but when you transport something by ship, it's called cargo?” Steven Wright Use TABLEF when appropriate TABLE FILE CAR SUM DCOST BY COUNTRY BY CAR ON CAR SUBFOOT END TABLE FILE CAR SUM DCOST BY COUNTRY BY CAR ON CAR SUBFOOT END Extract data Sort and Merge data Generate report You can still use COMPUTE, SUM and WHERE TOTAL F AVINGS: Eliminates large cost of sorting, even if none to do. S ALL SUBSEQUENT SLIDES The white area (actually a freeform-line region) at the top of each slide covers a comedian’s picture and one-liner - - needed so they do not appear on handouts. The white box itself never appears during the presentation because the first animation on each slide is to remove it. ALL SUBSEQUENT SLIDES Most slides attempt to draw attention to the key item, letter, word, line, etc. by differentiating its color and/or size, and/or by animating it. When it is underlined too, it is totally for the benefit of the handout which cannot see these effects (except size). ALL SUBSEQUENT SLIDES Objects on most slides use consistent coloration effects. Code samples and boxes of diagrams usually use the gray Texture. Informational boxes use either a light blue (or blue-red) Texture, or a deep blue color either solid if small or shaded if larger. One Liners For FOCUS Efficiency WHITE BOX EXPLANATION

5 Jump to end Copyright 2007, Information Builders. Slide 5 "If you live to the age of a hundred you have it made because very few people die past the age of a hundred.” George Burns Use JOIN instead of WHERE IN FILE TABLE FILE CAR PRINT COUNTRY WHERE COUNTRY NE 'ENGLAND' ON TABLE HOLD AS VALUES FORMAT ALPHA END TABLE FILE CAR PRINT COUNTRY WHERE COUNTRY NE 'ENGLAND' ON TABLE HOLD AS VALUES FORMAT ALPHA END AVINGS: JOIN is generally faster than a file search for each record S born Nathan Birnbaum One Liners For FOCUS Efficiency TABLE FILE CAR SUM SEATS BY COUNTRY WHERE COUNTRY IN FILE VALUES END ? STAT TABLE FILE CAR SUM SEATS BY COUNTRY WHERE COUNTRY IN FILE VALUES END ? STAT JOIN COUNTRY IN VALUES TO COUNTRY IN CAR AS J1 TABLE FILE VALUES SUM SEATS BY COUNTRY END ? STAT JOIN COUNTRY IN VALUES TO COUNTRY IN CAR AS J1 TABLE FILE VALUES SUM SEATS BY COUNTRY END ? STAT Donated by Art Greenhaus

6 Jump to end Copyright 2007, Information Builders. Slide 6 “Apparently, a new survey says that three out of four people make up 75% of the population.” David Letterman Do the HOLDs after the END 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 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 SET SAVEMATRIX = ON TABLE FILE CAR PRINT COUNTRY CAR ON TABLE HOLD AS HTML END HOLD AS EXL2K HOLD AS PDF SET SAVEMATRIX = ON TABLE FILE CAR PRINT COUNTRY CAR ON TABLE HOLD AS HTML END HOLD AS EXL2K HOLD AS PDF HOLD’ing the same results in 3 different formats? AVINGS: 50% for 2 HOLD, 66% for 3 HOLDS, etc. S Re-uses internal matrix from first to generate others Re-extracts entire data set 3 times One Liners For FOCUS Efficiency Instead:

7 Jump to end Copyright 2007, Information Builders. Slide 7 Use POOLED TABLES for multiple TABLEs “Always get married in the morning. That way if it doesn’t work out, you haven’t wasted the whole day.” Mickey Rooney AVINGS: 1/n th of I/O’s where n is number of TABLES. S 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 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 Why extract the entire database four times? SET POOL= ON SET POOL= OFF No HOLD file needed Extracts from database once Feeds all TABLEs at one time Output identical to no pooling Set ESTLINES/ESTRECORDS for even more efficiency Note: Pooled Tables is a chargeable feature. Must SET POOLFEATURE=ON in FOCPARM This slide must follow the previous slide, since that one has a reference to this slide as “see next slide”. I also slowed the Slide Transition to Medium to ensure the effect of leaving the one box initially. born Joseph Yule, Jr. One Liners For FOCUS Efficiency

8 Jump to end Copyright 2007, Information Builders. Slide 8 "I always wanted to be somebody, but I should have been more specific." Lily Tomlin Don’t read the entire flat file Allen Beatty Bullock Denver Kidman. Zappa SET FIXRETRIEVE=ON TABLE FILE NAMES PRINT NAME IF NAME LT ‘E’ END SET FIXRETRIEVE=ON TABLE FILE NAMES PRINT NAME IF NAME LT ‘E’ END One Million Records Ten Records *Only for flat files via SEGTYPE AVINGS: Average 50% search time; could save 1% or 99%. S “The flat file is sorted on the screened field; stop searching when you see a larger value.” One Liners For FOCUS Efficiency

9 Jump to end Copyright 2007, Information Builders. Slide 9 “Somebody actually complimented me on my driving today. They left a little note on the windshield. It said 'Parking Fine’.” Tommy Cooper Reformat fields inside the TABLE instead of DEFINE DEFINE FILE CAR -* DCOST is originally D12.2 INTCOST/I6 = DCOST ; END TABLE FILE CAR SUM COST INTCOST BY CAR END DEFINE FILE CAR -* DCOST is originally D12.2 INTCOST/I6 = DCOST ; END TABLE FILE CAR SUM COST INTCOST BY CAR END TABLE FILE CAR SUM DCOST DCOST/I6 AS ‘INTCOST’ BY CAR END TABLE FILE CAR SUM DCOST DCOST/I6 AS ‘INTCOST’ BY CAR END No DEFINE needed (but creates extra field in matrix) Hint: Extra field appears in a HOLD file. To remove, SET HOLDLIST=PRINTONLY AVINGS: Only final displayed field is reformatted. S One Liners For FOCUS Efficiency Instead:

10 Jump to end Copyright 2007, Information Builders. Slide 10 COUNTRY CAR MODEL BODY DCOST “You look at the floor and see the floor. I look at the floor and see molecules.” Dan Aykroyd Flip to Alternate File View to elevate screening criteria COUNTRY CAR MODEL BODY DCOST COUNTRY CAR MODEL BODY DCOST Why follow pointers all the way to the bottom, just to find that a DCOST does not fit the criteria? TABLE FILE CAR PRINT MODEL DCOST IF DCOST GE 20000 END TABLE FILE CAR PRINT MODEL DCOST IF DCOST GE 20000 END.DCOST POINTERSPOINTERS Lots of coordinated transitions on this slide. The hierarchy rotates 180 o and moves right while the dotted line WIPEs on to follow it, and the TABLE slides left at the same time. Then the inverted permanent object appears directly on top. If I didn’t do that, this inverted image would not appear on the printed handout. The “.DCOST” is positioned to appear where it should be once the TABLE slides left. But on the slide and hardcopy, it does appear in the ‘wrong’ place; can’t figure an easy way around that. AVINGS: Tremendous reductions in I/O and response time. S One Liners For FOCUS Efficiency BODY MODEL CAR COUNTRY DCOST

11 Jump to end Copyright 2007, Information Builders. Slide 11 COUNTRY CAR MODEL BODY DCOST “If dogs could talk, it would take a lot of the fun out of owning one.” Use Indexed File View to elevate screening criteria COUNTRY CAR MODEL BODY DCOST COUNTRY CAR MODEL BODY DCOST Same dot-syntax as alternate view; uses index automatically when present. TABLE FILE CAR PRINT MODEL DCOST IF DCOST GE 20000 END TABLE FILE CAR PRINT MODEL DCOST IF DCOST GE 20000 END.DCOST POINTERSPOINTERS Lots of coordinated transitions on this slide. The hierarchy rotates 180 o and moves right while the dotted line WIPEs on to follow it, and the TABLE slides left at the same time. Then the inverted permanent object appears directly on top. If I didn’t do that, this inverted image would not appear on the printed handout. The “.DCOST” is positioned to appear where it should be once the TABLE slides left. But on the slide and hardcopy, it does appear in the ‘wrong’ place; can’t figure an easy way around that. BODY MODEL CAR COUNTRY DCOST AVINGS: Tremendous reductions in I/O and response time. S Andy Rooney One Liners For FOCUS Efficiency Note: Index view requires test on indexed field

12 Jump to end Copyright 2007, Information Builders. Slide 12 System Sort SYNCSORT DFSORT VMSORT “We spend the first twelve months of our children’s lives teaching them to walk and talk, and the next twelve telling them to sit down and shut up.” Phyllis Diller Let your Sort Utility do all the work – not just the sorting! HOLD File FOCUS Sort SET EXTSORT=ON SET EXTAGGR=ON SET EXTHOLD=ON S AVINGS: Tremendous reductions in sort time and data movement. born Phyllis Ada Driver One Liners For FOCUS Efficiency

13 Jump to end Copyright 2007, Information Builders. Slide 13 “I’m the kind of guy who will have nothing all my life and then they’ll discover oil while digging my grave.” George Gobel Presort the data before loading A BCDEDEF GHIJIJ EHFGDEHFGD Unsorted MODIFY FILE … FIXFORM keyfield MATCH keyfield ON NOMATCH UPDATE DATA ON … Sort the data file first P a g e 1P a g e 2P a g e 3P a g e 4 “If it’s not ahead of me, I have to start from the top.” - FOCUS S AVINGS: Could be 100’s of times faster on large volumes. Call system sort DEFGHDEFGH Sorted One Liners For FOCUS Efficiency

14 Jump to end Copyright 2007, Information Builders. Slide 14 “Getting on a plane, I told the ticket agent to send one of my bags to New York and the other to LA. She said she can’t do that. I told her she did it last week”. Henny Youngman REBUILD without the Index first FILE = … SEGMENT = … FIELD=ABC,,I5, FIELDTYPE=I,$ FIELD=DEF,,A12,$ FIELD=GHI,,D12.2, FIELDTYPE=I,$ FIELD=JKL,,F5,$ FILE = … SEGMENT = … FIELD=ABC,,I5, FIELDTYPE=I,$ FIELD=DEF,,A12,$ FIELD=GHI,,D12.2, FIELDTYPE=I,$ FIELD=JKL,,F5,$ 1.Remove indexes and save as alternate master 2.REBUILD REBUILD with no-index master 3.Put back original master with indexes 4.REBUILD INDEX AVINGS: Usually measured in hours of elapsed time savings. S One Liners For FOCUS Efficiency * (up to 7 indexes)

15 Jump to end Copyright 2007, Information Builders. Slide 15 “I find television very educating. Every time somebody turns on the set, I go into the other room and read a book.” Groucho Marx JOIN in the faster direction FILE=JOB SEGMENT=JOB1, … FIELD=POS, …, INDEX=I,$ FIELD=BLDG, … … FILE=JOB SEGMENT=JOB1, … FIELD=POS, …, INDEX=I,$ FIELD=BLDG, … … Lorenzo AlcazarPresident Nicolas CassadineVice President Carly CorinthosOperator Michael Corinthos, IIIOperator Sonny CorinthosPresident Alexis DavisTechnical Noah DrakeManager Patrick DrakeOperator Jasper "Jax" JacksPresident Georgie/Maxie JonesOperators Ric LansingTechnical Samantha McCallOperator Jason MorganTechnical Dillon QuartermaineVice President Edward QuartermaineManager Tracy QuartermaineOperator Skye QuartermaineSecretary Emily QuartermaineManager Dr. Monica QuartermaineTechnical Malcolm ‘Mac’ ScorpioManager Robert ScorpioTechnical Dr. Robin ScorpioTechnical Bobbie SpencerSecretary Elizabeth SpenserSecretary Lucky/Lulu SpencerOperators Luke SpencerPresident Elizabeth WebberTechnical JOIN POS IN GH TO POS IN JOB FILE=GH SEGMENT=GH1, … FIELD=NAME, … FIELD=POS, …INDEX=I,$ … FILE=GH SEGMENT=GH1, … FIELD=NAME, … FIELD=POS, …INDEX=I,$ … TABLE FILE ???? PRINT NAME WHERE BLDG IS ‘C2’ END TABLE FILE ???? PRINT NAME WHERE BLDG IS ‘C2’ END ManagerA1 OperatorC2 PresidentC2 SecretaryB3 TechnicalC2 Vice PresA1 JOIN POS IN JOB TO POS IN GH JOB S AVINGS: Could reduce processing time by 90% or more. born Julius Henry Marx One Liners For FOCUS Efficiency On this slide only, the check Spirals In instead of Faded Zoom and is not last to appear.

16 Jump to end Copyright 2007, Information Builders. Slide 16 >> rebuild ENTER OPTION external index NEW OR ADD TO EXISTING?... - AHPF - FGJHJ IDSAE JSDQRW LFSZ - ZWIOH AAACDDEFHHHJ....UWXYZZAAACDDEFHHHJ....UWXYZZ One Million Records S AVINGS: Could reduce data accessing time by 90% or more. EXTERNALINDEXEXTERNALINDEX “I base most of my fashion taste on what doesn't itch.” Gilda Radner Build your own External Index when you don’t have write access to the file Arrows are drawn With Previous at 0.1 sec delay sequentially. USE mastername extindexname INDEX mastername END TABLE FILE filename.indexfield Non-writeable file, no index Build your own index # #Note: External Index is static - not updated per transaction. Must Rebuild Index if file changes, say nightly. One Liners For FOCUS Efficiency

17 Jump to end Copyright 2007, Information Builders. Slide 17 BY TOTAL – Sort by computed columns in one pass AVINGS: Eliminates second pass of the data – could be 50%. S “I was born with an adult head and a tiny body. Like a 'Peanuts' character.” John Stewart Sort by Average Sales * COUNTRY CAR AVE SALES SALES ENGLAND JENSEN 17650 73000 TRIUMPH 24200 122000 JAPAN HONDA 17480 235000 TOYOTA 18250 197300 Sort by Average Sales * COUNTRY CAR AVE SALES SALES ENGLAND JENSEN 17650 73000 TRIUMPH 24200 122000 JAPAN HONDA 17480 235000 TOYOTA 18250 197300 TABLE FILE CAR SUM SALES AVE.SALES BY COUNTRY BY CAR ON TABLE HOLD END TABLE FILE HOLD SUM E03 BY COUNTRY BY CAR BY E04 AS ‘Ave Sales’’ END TABLE FILE CAR SUM SALES AVE.SALES BY COUNTRY BY CAR ON TABLE HOLD END TABLE FILE HOLD SUM E03 BY COUNTRY BY CAR BY E04 AS ‘Ave Sales’’ END TABLE FILE CAR SUM SALES BY COUNTRY BY CAR BY TOTAL AVE.SALES END TABLE FILE CAR SUM SALES BY COUNTRY BY CAR BY TOTAL AVE.SALES END * Invented numbers No HOLD ! BY AVE.SALES One Liners For FOCUS Efficiency

18 Jump to end Copyright 2007, Information Builders. Slide 18 DEFINE FILE... EXCHANGE/A3 = EDIT(PHONE,'$$$999$$$$'); FLAG/A1 = IF (SALARY + BENEFITS GT 50000) AND (EXCHANGE EQ '736‘) THEN 'Y' ELSE 'N'; END Test higher-hit fields first “I asked a fellow at hang-glider school 'How many successful jumps do you need before you graduate?' He said, 'All of them.’ ” Red Skelton AVINGS: Potentially significant reduction in calculation time. S One Liners For FOCUS Efficiency TABLE FILE... PRINT... IF LASTNAME EQ ‘$M$*' IF EXCHANGE EQ '736' WHERE FLAG EQ 'Y‘ END TABLE FILE... PRINT... IF LASTNAME EQ ‘$M$*' IF EXCHANGE EQ '736' WHERE FLAG EQ 'Y‘ END TABLE FILE... PRINT... WHERE FLAG EQ 'Y‘ IF EXCHANGE EQ '736‘ IF LASTNAME EQ ‘$M$*' END TABLE FILE... PRINT... WHERE FLAG EQ 'Y‘ IF EXCHANGE EQ '736‘ IF LASTNAME EQ ‘$M$*' END Calculated first for every record - - and often false Complicated calc done only when all other criteria pass Do real fields first, or those most likely to eliminate records Technique applies to fields on the same level. Higher level screens are always done first, regardless of the order coded.

19 Jump to end Copyright 2007, Information Builders. Slide 19 FILE=CAR,… SEGMENT=…,SEGTYPE=S1,$ FIELD=VALUE1,,A5,$ FIELD=VALUE2,,A9,FIELDTYPE=I,$ FIELD=VALUE3,,A2,FIELDTYPE=I,$ FIELD=VALUE4,,A1,FIELDTYPE=I,$ FIELD=VALUE5,,A6,$... Force use of the higher-hit index “It’s money. I remember it from when I was single.” Billy Crystal AVINGS: Significant reduction in data access time. S One Liners For FOCUS Efficiency TABLE FILE CAR PRINT... WHERE VALUE3 LT '736‘ WHERE VALUE4 EQ ‘ABC‘ WHERE VALUE2 EQ 'Y‘ END TABLE FILE CAR PRINT... WHERE VALUE3 LT '736‘ WHERE VALUE4 EQ ‘ABC‘ WHERE VALUE2 EQ 'Y‘ END FOCUS automatically uses the first index, regardless of how the screens are arranged in the TABLE Force FOCUS to use the most valuable Index. Only you know which one that is!.VALUE3 Donated by Noreen Redden CAR Master

20 Jump to end Copyright 2007, Information Builders. Slide 20 FILE=CAR,… SEGMENT=…,SEGTYPE=S1,$ FIELD=FIELD1,,A5,$ FIELD=FIELD2,,A9,FIELDTYPE=I,$... DBA=JOEL,$ USER=’ ‘,ACCESS=R,$ USER=TEST,ACCESS=R,RESTRICT=VALUE, VALUE=RECORDLIMIT EQ 5,$ Build test limit right into the Master “Curious people are interesting people. I wonder why that is.“ Bill Maher AVINGS: No code to add, switch or comment out to do a test run. S One Liners For FOCUS Efficiency SET USER=TEST TABLE FILE CAR PRINT... WHERE FIELD1 LT '736‘ END SET USER=TEST TABLE FILE CAR PRINT... WHERE FIELD1 LT '736‘ END Put the RECORDLIMIT in the DBA Activate the limited record extraction for test Donated by Noreen Redden CAR Master

21 Jump to end Copyright 2007, Information Builders. Slide 21 FILE=CAR,SUFFIX=MSSQL SEGMENT=... FIELD=...,$ FIELD=Order_Date, ORDERDATA, MDYY, DATE,$ FIELD=Order_Month,ORDERDATA, YYM, DATE,$ Duplicate the same field in the MFD for multiple purposes (Interface-only technique) “The prime minister held a meeting with the cabinet today. He also spoke to the bookcase and argued with the chest of drawers.” Ronnie Barker AVINGS: Saves a DEFINE for sure, and maybe other coding. S One Liners For FOCUS Efficiency Duplicate ALIAS, different formats Donated by Noreen Redden CAR Master TABLE... WHERE Order_Date FROM ‘01012000’ BY Order_Month... Want to screen on date, but sort/sum by month

22 Jump to end Copyright 2007, Information Builders. Slide 22 DEFINE FILE... LASTNAME2/A1 = EDIT(LASTNAME,’$9’); END TABLE FILE... PRINT... IF LASTNAME2 EQ ‘M' IF EXCHANGE EQ '736' IF FLAG EQ 'Y‘ END DEFINE FILE... LASTNAME2/A1 = EDIT(LASTNAME,’$9’); END TABLE FILE... PRINT... IF LASTNAME2 EQ ‘M' IF EXCHANGE EQ '736' IF FLAG EQ 'Y‘ END Do string manipulation inside the TABLE when possible “I only know two pieces. One is 'Clair de Lune' and the other one isn't.” AVINGS: In-TABLE string masking is faster than DEFINE. S TABLE FILE... PRINT... IF LASTNAME EQ ‘$M$*' IF EXCHANGE EQ '736' IF FLAG EQ 'Y‘ END TABLE FILE... PRINT... IF LASTNAME EQ ‘$M$*' IF EXCHANGE EQ '736' IF FLAG EQ 'Y‘ END $ means any one character $* means all remaining chars This slide is a continuation of the previous slide, supposed to look like we’re still on the same slide where it just clears everything but the right box initially. I also slowed the Wipe Transition to this slide to Medium for better effect. Victor Borge One Liners For FOCUS Efficiency

23 Jump to end Copyright 2007, Information Builders. Slide 23 Store up to 99 parsed masters in memory, so no reparsing “It’s no longer a question of staying healthy. It’s a question of finding a sickness you like.” Jackie Mason Avoid reparsing Masters over and over again SET SAVEDMASTERS = 99 TABLE FILE CAR PRINT … END TABLE FILE CAR … TABLE FILE EMPLOYEE … TABLE FILE CAR … TABLE FILE SALES … TABLE FILE EMPLOYEE … SET SAVEDMASTERS = 99 TABLE FILE CAR PRINT … END TABLE FILE CAR … TABLE FILE EMPLOYEE … TABLE FILE CAR … TABLE FILE SALES … TABLE FILE EMPLOYEE … Never reparses on consecutive use Without the SET, would: -- dump CAR master, -- parse EMPLOYEE, -- reparse CAR again -- parse SALES …. S AVINGS: Large savings when constantly flipping Masters. born Jacob Maza One Liners For FOCUS Efficiency

24 Jump to end Copyright 2007, Information Builders. Slide 24 I could index SSN, but an index won’t help on partial searches Split a field into pieces for instantaneous searches USE FOR Social Security Numbers Phone Numbers Credit Card Numbers Hottrack Numbers (we do!) “A boy can learn a lot from a dog: obedience, loyalty, and the importance of turning around three times before lying down.” Robert Benchley AVINGS: Rock-bottom I/O when searching for that ‘field’. S SSN SSN4TO5 SSN1TO3 SSN6TO9 SSN 123-45-6789 DATA QUESTION How many pages would I have to search to find the last of 999,999,999 SSN combinations? 5Mil pages 3 pages 40 pages 1 page Store full SSN here too One Liners For FOCUS Efficiency

25 Jump to end Copyright 2007, Information Builders. Slide 25 Index your HOLD file “I’m this century’s Dennis The Menace.” AVINGS: Slower to build extract, but much faster post-retrieval. S Bart Simpson born Bartholomew Jo-Jo Simpson TABLE FILE … PRINT CITY TITLE BY EMPL_NO ON TABLE HOLD END TABLE FILE HOLD COUNT EMPL_NO BY TITLE IF CITY EQ ‘ORLANDO’ END FORMAT FOCUS INDEX CITY HOLD extracts might be used more efficiently if you could index important search fields for subsequent reports. Sequential file sorted by EMPL_NO FOCUS database indexed on CITY One Liners For FOCUS Efficiency

26 Jump to end Copyright 2007, Information Builders. Slide 26 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 smart enough to get out of jury duty.” Norm Crosby AVINGS: Reduce reparsing time when non-seq but iterative usage. S FILE=LOTSOF SEGMENT=ONE FIELD=ABC,,A10 FIELD=DEF,,I9 FIELD=GHI,,F4.1 FIELD=JKL,,D12.2 FIELD=MNO,,A5 FILE=LOTSOF SEGMENT=ONE FIELD=ABC,,A10 FIELD=DEF,,I9 FIELD=GHI,,F4.1 FIELD=JKL,,D12.2 FIELD=MNO,,A5 FILE=LOTSOF SEGMENT=ONE FIELD=ABC,,A10 FIELD=DEF,,I9 FIELD=LAST3,,A17 FILE=LOTSOF SEGMENT=ONE FIELD=ABC,,A10 FIELD=DEF,,I9 FIELD=LAST3,,A17 TABLE FILE SUM ABC BY DEF END TABLE FILE SUM ABC BY DEF END 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 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 SEGMENT=TWO FIELD=ALLONE,,A65 SEGMENT=TWO FIELD=ALLONE,,A65...... Make sure you count the bytes properly...... One Liners For FOCUS Efficiency

27 Jump to end Copyright 2007, Information Builders. Slide 27 LOAD FOCEXEC fex_name1 fex_name2 … LOAD FOCCOMP compiled_modify_name EX … RUN … LOAD FOCEXEC fex_name1 fex_name2 … LOAD FOCCOMP compiled_modify_name EX … RUN … Pre-LOAD your application into memory “If your parents never had children, chances are you won't either.“ Dick Cavett AVINGS: Instant startup of large components. (No execution value.) S ? LOAD [filetype] UNLOAD [* | filetype] [* | filename1 [filename2 …] ] ? LOAD [filetype] UNLOAD [* | filetype] [* | filename1 [filename2 …] ] LOAD Masters and Access Files too One Liners For FOCUS Efficiency Uses the image now in memory

28 Jump to end Copyright 2007, Information Builders. Slide 28 Code for execution performance Generally, fewer lines of code means faster performance Code for programmer performance Don't belabor over tweaking code for one-time applications, nor spend hours speeding up something that is already quick Code for maintenance D on't sacrifice readability and maintainability. Remember that you or someone will have to maintain your code Code for execution performance Generally, fewer lines of code means faster performance Code for programmer performance Don't belabor over tweaking code for one-time applications, nor spend hours speeding up something that is already quick Code for maintenance D on't sacrifice readability and maintainability. Remember that you or someone will have to maintain your code “The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...‘ ” Rob’s Rules of Coding for Performance AVINGS: Live by the rules to save time for everyone S Donated by Rob Freeman The Three Laws of Robotics A robot may not injure a human being or, through inaction, allow a human being to come to harm. A robot must obey orders given to it by human beings, except where such orders would conflict with the First Law. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. Isaac Asimov One Liners For FOCUS Efficiency

29 Jump to end Copyright 2007, Information Builders. Slide 29 I leave you with this gem "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; for a might-have-been has never been, but a has was once an are." Milton Berle One-Liners for [Web]FOCUS Efficiency I left the Thank You box to an On Click animation, intending that you will read this one to the audience in a storybook tone, press Enter, and roll into a “Thank You”. If you practice it, the verbal effect is cool. If you don’t want to, then change the last animation to “After Previous’, or just be ready to press Enter. born Milton Berlinger One Liners For FOCUS Efficiency

30 Jump to end Copyright 2007, Information Builders. Slide 30 Presentation Information Author: Joel Starkman Company: Information Builders Presentation Title: New One-Liners for [Web]FOCUS Efficiency Presentation Abstract: Does your FOCUS job take hours to run, or absorb inordinate amounts of system resources, or barely fit into your nightly production window? This session presents over three dozen techniques, each virtually a minor one-line change to your focexec, that target hidden inefficiencies in your code. With a little help from history's greatest one-liner comedians, if even one tip helps you gain tremendous savings, it's worth attending this session. Author: Joel Starkman Company: Information Builders Presentation Title: New One-Liners for [Web]FOCUS Efficiency Presentation Abstract: Does your FOCUS job take hours to run, or absorb inordinate amounts of system resources, or barely fit into your nightly production window? This session presents over three dozen techniques, each virtually a minor one-line change to your focexec, that target hidden inefficiencies in your code. With a little help from history's greatest one-liner comedians, if even one tip helps you gain tremendous savings, it's worth attending this session.


Download ppt "Copyright 2007, Information Builders. Slide 1 All New One Liners for FOCUS and WebFOCUS Efficiencies Joel Starkman Director of Operations June 2008 When."

Similar presentations


Ads by Google