Dynamic Batch Processing March 19 10:00 AM David Steger
Batch Types Run my routine in background right now Run my routine in the evening or another day Run my group of programs when requested Run my programs on a regular schedule Others?
Batch Processing with Today
and
Dynamic Batch Processing
Dynamic Batch Processor Batch Entries Batch Parameter Definitions Dynamic Batch Entries + =
Dynamic Batch Processor Batch Entries Batch Parameter Definitions Dynamic Batch Entries + = Standard QAD MFG/Pro
Dynamic Batch Processor Batch Entries Batch Parameter Definitions Dynamic Batch Entries + = Date Formulas, Operations, Etc.
Dynamic Operations Blank Literal - the data entered in the value field U Unix Environment Variable: The Unix environment variable name is entered in the value field. D The date that is returned by the Date Formula that is entered in the value fieldDate Formula S Substring of a value. Three parameters are entered in the value field: PValue of another parameter MM Month of a date returned by the Date Formula that is entered in the value fieldDate Formula DD Day of a date returned by the Date Formula that is entered in the value fieldDate Formula Y2 Year of a date returned by the Date Formula that is entered in the value field - the 2 digit year is returnedDate Formula Y4 Year of a date returned by the Date Formula that is entered in the value field - 4 digit year is returnedDate Formula V Value of another parameter. This is used when "con-cating" the values of fields together.
Dynamic Date Formulas EOMEnd of Month BOMBeginning of Month EOYEnd of year BOYBeginning of Year TODAYToday's date HIQAD High Date HIGHQAD High Date LOQAD Low Date LOWQAD Low Date LYDLast year's date (this date, but last year) EOQEnd of Quarter BOQBeginning of Quarter ECPEnd of GL Calendar Period BCPBeginning of GL Calendar Period PERPeriod Sun,Mon,Tue,Wed, Thu,Fri,Sat Select this day of this week +nAdd n number of days -nSubtract n number of days
Example 1: User Run Batch
Determine the Parameters
Capture frame object “a”
Determine the Parameters
Load the Parameters
Modify Static Parameters
Define Dynamic Parameters
Using Date Formulas EOMEnd of Month BOMBeginning of Month EOYEnd of year BOYBeginning of Year TODAYToday's date HIQAD High Date HIGHQAD High Date LOQAD Low Date LOWQAD Low Date LYDLast year's date (this date, but last year) EOQEnd of Quarter BOQBeginning of Quarter ECPEnd of GL Calendar Period BCPBeginning of GL Calendar Period PERPeriod Sun,Mon,Tue,Wed, Thu,Fri,Sat Select this day of this week +nAdd n number of days -nSubtract n number of days
Using Date Formulas EOMEnd of Month BOMBeginning of Month EOYEnd of year BOYBeginning of Year TODAYToday's date HIQAD High Date HIGHQAD High Date LOQAD Low Date LOWQAD Low Date LYDLast year's date (this date, but last year) EOQEnd of Quarter BOQBeginning of Quarter ECPEnd of GL Calendar Period BCPBeginning of GL Calendar Period PERPeriod Sun,Mon,Tue,Wed, Thu,Fri,Sat Select this day of this week +nAdd n number of days -nSubtract n number of days
Test the Formula Today, BCP, -1, ECP
Define Output
Run the Batch
Example 2: Scheduled Batchs
Dynamic Batch Scheduling Queue Processor Batch Schedule Run Queue (batches) + =
Dynamic Batch Scheduling Queue Processor Batch Schedule Run Queue (batches) + = Run by cron: DB, Queue, at HH:MM
Dynamic Batch Scheduling Queue Processor Batch Schedule Run Queue (batches) + = Run this Queue on Date, Hour, etc.
Key Scripts bpsched – The batch processor script bpsched is run on regular intervals each hour, up to once each minute. This script is executed by cron under the crontab file for the userid batproc. bpsched checks the minute number (00-59) to determine which combination of queue and database to execute that specific minute. schedpro2 – bpsched executes the script schedpro2. schedpro2 can launch multiple instances of the batch processor based on the data in it's configuration file. The configuration file lists database and pf file combinations. Configuration files are stored in the system batchproc directory. m9sched – schedpro2 executes m9sched for each database defined in the configuration file. The m9sched script executes the progress session which runs t2bpstart.p from the QAD menu.
What is a Queue? Configured in bpshed case $M in 00) $BP -q Q00 -c live 15) $BP -q Q15 -c live 30) $BP -q Q30 -c live 45) $BP -q Q45 -c live esac
Dynamic Batch Output Queue Processor Batch Output Processor Run Log and creates
Dynamic Batch Output Queue Processor Batch Output Processor Run Log and creates Text Output, PDF Output, to user, etc.
Define the Scheduled Batch
How the batch id can alter results
Other Operation Types Blank Literal - the data entered in the value field U Unix Environment Variable: The Unix environment variable name is entered in the value field. D The date that is returned by the Date Formula that is entered in the value fieldDate Formula S Substring of a value. Three parameters are entered in the value field: PValue of another parameter MM Month of a date returned by the Date Formula that is entered in the value fieldDate Formula DD Day of a date returned by the Date Formula that is entered in the value fieldDate Formula Y2 Year of a date returned by the Date Formula that is entered in the value field - the 2 digit year is returnedDate Formula Y4 Year of a date returned by the Date Formula that is entered in the value field - 4 digit year is returnedDate Formula V Value of another parameter. This is used when "con-cating" the values of fields together.
Logs
Future SOX Enhancements Error detection via keywords – notification for job errors – notification for report errors Batch Run Access Restrictions – Group ID batproc can run all batch events – “Submitted by” used to restrict users to their batch events Enable/Disable extended to individual batch events – New “batch” or “background” events default to enable – All other new events default to disable
Dynamic Batch Processing