e~print - innovative ways we use it

57
ABUG 2006 - Harding April 24 th Searcy, AR 1 e~Print - Innovative Ways We Use It Presented by: Bruce Knox University of Arkansas Division of Agriculture Cooperative Extension Service April 24, 2006 10:00 am – 10:40 am Freedom Room

Upload: tegan

Post on 18-Mar-2016

49 views

Category:

Documents


3 download

DESCRIPTION

e~Print - Innovative Ways We Use It. Presented by: Bruce Knox University of Arkansas Division of Agriculture Cooperative Extension Service. April 24, 2006 10:00 am – 10:40 am Freedom Room. Introduction. Purpose: Automate Report Generation for e~Print - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 1

e~Print - Innovative Ways We Use It

Presented by: Bruce KnoxUniversity of ArkansasDivision of Agriculture

Cooperative Extension Service

April 24, 200610:00 am – 10:40 am

Freedom Room

Page 2: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 2

Introduction

• Purpose: Automate Report Generation for e~Print

• Benefits: Improved Reporting with Reduced Costs

Page 3: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 3

Topics of Discussion/Agenda

• Secure Distributed Reporting

• Our First Efforts

• Server Side Automation

• A Month End Example

• Monitoring the Automation

Page 4: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 4

Secure Distributed Reporting

• We needed a way to deliver timely reports to a geographically distributed management team.

Page 5: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 5

We Have Faculty in Every County

Page 6: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 6

e~Print Delivers Our Reports

• A Secure Web Server• Page Security by Fund/Orgn

(Banner Security)

Page 7: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 7

Our First Efforts

• At First, We Used Only MS Access Reports

• Users Developed and Ran the Reports

• WS-FTP Transferred the Report Files

Page 8: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 8

This Was Great For IT

• After Some Minor Setup,• We Handed It All to a Super User

Page 9: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24 th Searcy, AR 9

Why We Replaced The Original Reports

• Our Super User Created a Lot of Reports• More Reports Than She had Time to Run

Page 10: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 10

Time For Server Side Automation

• We Use Pass-Through Queries with MS Access

• That Made Reverse Engineeringthe Reports Easy

Page 11: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 11

Summary, Detail, Period End Reporting

• YTD Summary Reports Run Every Hour• YTD Detail Reports Run Twice A Day• Summary, Detail, and Month End Each Evening

Page 12: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 12

A Month End Example

This is Typically all I see of this Application: An email Notice

Page 13: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 13

A Month End Example

This is Typically all I see of this Application: An email Notice

Page 14: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 14

The Managers See Only Their Reports

Page 15: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 15

Our Month End Reports Are Run Automatically

Page 16: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 16

This is Done Using the Banner Calendar

A cron run shell script runs a SQL*Plus script to check if the Month End Closed Today.

SPOOL fspd_closed.runSELECT'HOST fspd_run_closed_reports.shl', 'Closed: '||FTVFSPD_ACTIVITY_DATE||'

for', 'FSPD', FTVFSPD_FSPD_CODE FSPD, 'FSYR', FTVFSYR_FSYR_CODE FSYRFROM FTVFSYR,FTVFSPD WHERE FTVFSPD_COAS_CODE = FTVFSYR_COAS_CODEAND FTVFSPD_FSYR_CODE = FTVFSYR_FSYR_CODEAND FTVFSPD_PRD_STATUS_IND = 'C'AND FTVFSPD_PRD_END_DATE < SYSDATE -- Keeps Closing Date in the

PastAND TRUNC(FTVFSPD_ACTIVITY_DATE) = TRUNC(SYSDATE);SPOOL OFFSTART fspd_closed.run

Page 17: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 17

Check if the Month End Closed Today

AND FTVFSPD_PRD_STATUS_IND = 'C'AND FTVFSPD_PRD_END_DATE < SYSDATE -- Keeps Closing Date (and Time) in the PastAND TRUNC(FTVFSPD_ACTIVITY_DATE) =

TRUNC(SYSDATE);

Page 18: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 18

We LOG The CRON Job

Tue Jan 17 21:32:00 CST 2006fspd_closed.shl beginningfspd_closed.shl Control Month End Reporting

ScriptsTue Jan 17 21:32:00 CST 2006fspd_closed.shl ending18

(evening before the closing)

Page 19: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 19

Then The Closing

Wed Jan 18 21:32:00 CST 2006fspd_closed.shl beginningfspd_closed.shl Control Month End Reporting

ScriptsHOST fspd_run_closed_reports.shl Closed: 18-JAN-2006 for FSPD 06 FSYR 06Wed Jan 18 21:32:00 CST 2006(evening of closing)

Page 20: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 20

Finally, The Reports

• fspd_run_closed_reports.shl beginning• Run The YTD Summary and The MTD

Detail Reports for Month End• Wed Jan 18 21:32:00 CST 2006• fspd_run_closed_reports.shl ending• Wed Jan 18 21:32:00 CST 2006

Page 21: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 21

The Drill Down Gives Each Month

Page 22: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 22

Each Month End Report Stores Multiple Copies

Page 23: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 23

Each Month End Report Stores Multiple Copies

Page 24: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 24

YTD Summary

Page 25: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 25

YTD Summary

Page 26: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 26

YTD Summary

Page 27: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 27

Run: Date-Time and Report Name

Page 28: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 28

MTD Detail

Page 29: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 29

MTD Detail

Page 30: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 30

MTD Detail

Page 31: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 31

e~Print – Defining Reports

Page 32: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 32

Defining Reports

Page 33: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 33

Defining Reports

Page 34: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 34

Naming the Report for e~Print

Page 35: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 35

Naming The Report for Users

Page 36: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 36

Where is the Title on the Report?

Page 37: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 37

Place the Date and Time on the Menus

Page 38: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 38

What to do with the 1st Blank Page?

Page 39: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 39

Page Security - ORGN

Page 40: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 40

Page Security - FUND

Page 41: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 41

Optional email Notification

Page 42: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 42

The Shell Scripts – Let’s See How Simple

• All Report Shell Scripts are Run as One Job• Each Report has a Shell Script

Page 43: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 43

Report Shell Script Example– Part I Setup

#!/bin/ksh# dbr01_cp.shl # Closed Period Reports Run 01: Orgn Summary Daily

# Run orgsumm_dbr.sql to create extract, dbr01.pco to create report,# ftp the dbr01.lst report as 100gbsumm, then # ftp 100gbsumm.done to e~Print dbrd Repository

printdateprint dbr01_cp.shl beginning

PATH= ...export PATHexport ORACLE_SID=PRODORAENV_ASK=NO. /usr/lbin/oraenv

Page 44: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 44

Report Shell Script - Part II Extract and Report

# dbr01_cp.shl continued

echo "START orgsumm_dbr.sql"

#INSERT Extracted Records into Table DBR_01run_pw_mgr.shl userid orgsumm_dbr.sql

echo beginning dbr01.pcodbr01

echo dbr01.lst Report Complete

Page 45: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 45

Report Shell Script – Part III Transfer to e~Print

# put dbr01.lst e~Print Repository dbrd dbr01_cp.shl continued

print ftp put dbr01.lst 100gbsummecho > 100gbsumm.doneftp -n -i 170.94.62.000<<eofuser dbrd pwasciiput dbr01.lst 100gbsummput 100gbsumm.done 100gbsumm.donequiteofrm -f dbr01.lstrm -f 100gbsumm.doneprintdateprint dbr01_cp.shl ending # end of dbr01_cp.shl

Page 46: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 46

Logging the Run

• dbr01_cp.shl > dbr01_cp_cron.log 2>&1• dbr01_cp_cron.log will contain any Run

messages

Page 47: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 47

Log Snippets - Part I Extract

Wed Jan 18 21:32:01 CST 2006dbr01_cp.shl beginningSTART orgsumm_dbr.sql

FSPD 06 FSYR 06 Run Date 18-JAN-2006orgsumm_dbr extract beginning

2987 rows created.Commit complete.

orgsumm_dbr extract complete

Page 48: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 48

Log Snippets - Part II Report and FTP

beginning dbr01.pcodbr01 CONNECTED TO ORACLE. dbr01 completed dbr01.lst Report Completeftp put dbr01.lst 100gbsumm

Wed Jan 18 21:32:17 CST 2006dbr01_cp.shl ending

Page 49: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 49

Report Shell Scripts are Run as One Job

#!/bin/ksh

#fspd_run_closed_reports.shl Run The YTD Summary and The MTD Detail Reports for Month End

# This .shl file is intended to be run ONLY by fspd_closed.shl/fspd_closed.sql

printdateprint fspd_run_closed_reports.shl beginning

echo Run The YTD Summary and The MTD Versions of Detail Reports for Month End

PATH= ...export PATHexport ORACLE_SID=PRODORAENV_ASK=NO. /usr//ora

# Set Values in Run_Dates Table was done in fspd_closed.sql run by fspd_closed.shl

Page 50: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 50

Adding a New Report is Simpleat -q b > fspd_closed_reports_at.log 2>&1 <<EOF dbr01_cp.shl > dbr01_cp_cron.log 2>&1 dbr02_cp.shl > dbr02_cp_cron.log 2>&1 dbr03_cp.shl > dbr03_cp_cron.log 2>&1 dbr04_cp.shl > dbr04_cp_cron.log 2>&1 dbr09_cp.shl > dbr09_cp_cron.log 2>&1 dbr05_cp.shl > dbr05_cp_cron.log 2>&1 dbr14_cp.shl > dbr14_cp_cron.log 2>&1 dbr13_cp.shl > dbr13_cp_cron.log 2>&1 dbr06m_cp.shl > dbr06m_cp_cron.log 2>&1 dbr07m_cp.shl > dbr07m_cp_cron.log 2>&1 dbr08m_cp.shl > dbr08m_cp_cron.log 2>&1 dbr10m_cp.shl > dbr10m_cp_cron.log 2>&1 dbr11m_cp.shl > dbr11m_cp_cron.log 2>&1 dbr12m_cp.shl > dbr12m_cp_cron.log 2>&1 dbr15m_cp.shl > dbr15m_cp_cron.log 2>&1 dbr16m_cp.shl > dbr16m_cp_cron.log 2>&1 dbr17m_cp.shl > dbr17m_cp_cron.log 2>&1EOF

Page 51: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 51

The Audit Script – Snippet I

# Any Errors?awk '{print FILENAME, $0}' dbr??_cron.log | awk 'length >15' > dbr_audit_combined_logs.txt

egrep -i 'A file or directory in the path name does not exist.|ksh*not found.|netout: write returned 0?| 0 rows created.' dbr_audit_combined_logs.txt > dbr_audit_error_checking.txt

Page 52: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 52

Audit Script – Snippet II

# Chose the email Subject Textif [ -s "/home/common/dbr_audit_error_checking.txt" ]then mail -s "dbr_audit.shl - Errors Detected"

[email protected] < dbr_audit_summary_plus.txtelse mail -s "dbr_audit.shl - No Errors Detected"

[email protected] < dbr_audit_summary_plus.txtfi

Page 53: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 53

Monitoring via email

Page 54: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 54

oops!

From: <[email protected]>To: <[email protected]>Date: 2/15/2006 10:18:36 PMSubject: dbr_audit.shl - Errors

DetectedAudit Report of dbrnn Logs. . .

Page 55: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 55

Summary

• e~Print Can Deliver More Than You Can Report

• Simple Automation Can Bring Great Rewards

• Label Your Report Pages• Use a Simple Modular Design• Automate Your Monitoring

Page 56: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 56

Questions?

Page 57: e~Print - Innovative Ways We Use It

ABUG 2006 - Harding April 24th Searcy, AR 57

Thank You!

Bruce Knox

[email protected]

http://www.uaex.edu/bknox

http://abug.uaex.edu/