1.29k likes | 1.31k Views
Learn how to generate automated cross-platform reports in Voyager, with source code and schema. Unix scripts for SQL, PL/SQL, Perl to run reports on Voyager, transfer to PC, and format in Word, reducing manual effort.
E N D
Cross-platform Batch Reports Waldo Library Western Michigan University
Objectives • show an implementation of automated, cross-platform, hands-off report generation in the Voyager environment • provide you with the information to do this at your site
Bonus!!!!! Source code for BLOB access and a table+column schema listing included in the handout.
Brief Bio • Working at WMU for 16 years now
Brief Bio • Working at WMU for 16 years now • Initially spent many years on the VAX
Brief Bio • Working at WMU for 16 years now • Initially spent many years on the VAX • Struggled for several years with the IBM mainframe and NOTIS
Brief Bio • Working at WMU for 16 years now • Initially spent many years on the VAX • Struggled for several years with the IBM mainframe and NOTIS • Supporting Voyager for close to 3 years
Brief Bio • Working at WMU for 16 years now • Initially spent many years on the VAX • Struggled for several years with the IBM mainframe and NOTIS • Supporting Voyager for close to 3 years • Picked up some Oracle, (PL/)SQL, Perl, and Unix along the way
Why We Did This • initially no access to Access with ODBC stuff; had no clue
Why We Did This • initially no access to Access with ODBC stuff; had no clue • explored our Voyager Unix box, located SQL*PLUS
Why We Did This • So we created reports - • run them on the Voyager box, • transfer to PC • format and print in Word, • etc...
Why We Did This • So we created reports - • library liked them - • I got tired of:
Why We Did This • So we created reports - • library liked them - • I got tired of: • running reports • ftping them • formatting them • printing them • physically delivering them
Unix Cross-Platform Batch Reports Overview of Process (Handout page 4)
Unix Cross-Platform Batch Reports Overview of Process cron
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC WinBatch
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC WinBatch script or .exe
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC WinBatch script or .exe use ftp to get the report pull it into Word format the report
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC WinBatch script or .exe use ftp to get the report pull it into Word format the report time/date parameters stored in each script
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC WinBatch script or .exe use ftp to get the report pull it into Word format the report copy report to destination on LAN time/date parameters stored in each script
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC print report to location WinBatch script or .exe use ftp to get the report pull it into Word format the report copy report to destination on LAN time/date parameters stored in each script
Unix Cross-Platform Batch Reports Overview of Process cron Time/date parameters in one crontab file script SQL, PL/SQL, Perl report One cron process running Batch PC print report to location WinBatch Library Administration Library Systems Media Resources Mono Acquisitions Serials script or .exe use ftp to get the report pull it into Word format the report copy report to destination on LAN time/date parameters stored in each script
When to Choose SQL, PL/SQL, or Perl • SQL • invoked from within SQL*PLUS
When to Choose SQL, PL/SQL, or Perl • SQL • invoked from within SQL*PLUS • sufficient for most reports
When to Choose SQL, PL/SQL, or Perl • SQL • invoked from within SQL*PLUS • sufficient for most reports • easy control of page & line size, page formatting
When to Choose SQL, PL/SQL, or Perl • SQL • invoked from within SQL*PLUS • sufficient for most reports • easy control of page & line size, page formatting • takes control, does most of the work for you
When to Choose SQL, PL/SQL, or Perl • SQL • invoked from within SQL*PLUS • sufficient for most reports • easy control of page & line size, page formatting • takes control, does most of the work for you • output to screen or file
When to Choose SQL, PL/SQL, or Perl • SQL • sample of code… (Handout page 5) • output snippet below
When to Choose SQL, PL/SQL, or Perl identify what the report generates
When to Choose SQL, PL/SQL, or Perl include Word format settings
When to Choose SQL, PL/SQL, or Perl define output columns
When to Choose SQL, PL/SQL, or Perl these two columns are for sorting only
When to Choose SQL, PL/SQL, or Perl The call to FISCYRSETUP creates a temporary table, for the duration of this report, that contains the name and start date for the current and previous year. This is used in a number of reports to automatically reference fiscal year data.
When to Choose SQL, PL/SQL, or Perl Set up title and some report parameters. Want output in a file.
When to Choose SQL, PL/SQL, or Perl Run the query to create the report. Clean up when done.
When to Choose SQL, PL/SQL, or Perl • PL/SQL
When to Choose SQL, PL/SQL, or Perl • PL/SQL • invoked from within SQL*PLUS, or embedded in / combined with SQL
When to Choose SQL, PL/SQL, or Perl • PL/SQL • invoked from within SQL*PLUS, or embedded in / combined with SQL • provides SQL capabilities with programming language control added
When to Choose SQL, PL/SQL, or Perl • PL/SQL • invoked from within SQL*PLUS, or embedded in / combined with SQL • provides SQL capabilities with programming language control added • functionality sort of in-between SQL and Perl
When to Choose SQL, PL/SQL, or Perl • PL/SQL • output to screen or to screen
When to Choose SQL, PL/SQL, or Perl • PL/SQL • output to screen or to screen • Oracle allows output to file, but the Voyager installation does not enable this
When to Choose SQL, PL/SQL, or Perl • PL/SQL • output to screen or to screen • Oracle allows output to file, but the Voyager installation does not enable this • size limited to 1 million bytes output