Chapter 26: Using the Financial Data Interface | Contents | SCVs | Search | Glossary | Reports | XML | Index | Part C: Using the System Utilities |
Chapter 27: Scheduling CWDirect Processes on the iSeries
Purpose: You can automate certain processes in CWDirect that are performed from a menu option or periodic function by adding the processes to a job schedule on the iSeries. For example, you can create a job schedule to automatically start the Asyncs each morning and end them each night.
In this chapter:
• Creating a Job Schedule on the iSeries
Creating a Job Schedule on the iSeries
Follow the steps below to create a job schedule on the iSeries.
1. Verify that you have a job description whose initial library list contains the CWMPDTA and CWMPPGM libraries.
• To create a job description, enter CRTJOBD at a command line to advance to the Create Job Description (CRTJOBD) screen. Press F10 to display additional parameters and Page Down to display additional Create Job Description screens.
• To change a job description, enter CHGJOBD at a command line to advance to the Change Job Description (CHGJOBD) screen. Press F10 to display additional parameters and Page Down to display additional Change Job Description screens.
Depending on the length of your library list, the Initial library list field displays on the second or third Job Description screen. See your iSeries documentation for more information on creating or changing a job description.
Change Job Description (CHGJOBD)
Type choices, press Enter.
Job description . . . . . . . . > KAB Name Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB Job queue . . . . . . . . . . . QBATCH Name, *SAME Library . . . . . . . . . . . QGPL Name, *LIBL, *CURLIB Job priority (on JOBQ) . . . . . 5 1-9, *SAME Output priority (on OUTQ) . . . 5 1-9, *SAME Print device . . . . . . . . . . *USRPRF Name, *SAME, *USRPRF... Output queue . . . . . . . . . . *USRPRF Name, *SAME, *USRPRF, *DEV... Library . . . . . . . . . . . Name, *LIBL, *CURLIB Text 'description' . . . . . . . *BLANK
Additional Parameters
User . . . . . . . . . . . . . . *RQD Name, *SAME, *RQD Print text . . . . . . . . . . . *SYSVAL More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys |
Change Job Description (CHGJOBD)
Type choices, press Enter.
Accounting code . . . . . . . . *USRPRF Routing data . . . . . . . . . . 'QCMDI'
Request data or command . . . . *NONE
CL syntax check . . . . . . . . *NOCHK 0-99, *SAME, *NOCHK Initial library list . . . . . . > CWMPDTA Name, *SAME, *SYSVAL, *NONE + for more values > CWMPPGM End severity . . . . . . . . . . 30 0-99, *SAME Message logging: Level . . . . . . . . . . . . 4 0-4, *SAME Severity . . . . . . . . . . . 00 0-99, *SAME Text . . . . . . . . . . . . . *SECLVL *SAME, *MSG, *SECLVL, *NOLIST Log CL program commands . . . . *YES *SAME, *NO, *YES More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys |
2. Enter WRKJOBSCDE at a command line to advance to the Work with Job Schedule Entries screen.
The Work with Job Schedule Entries screen allows you to review, create, and maintain job schedules on the iSeries. Each job schedule entry contains the information needed to automatically submit a batch job one time or on regularly scheduled intervals. See your iSeries documentation for more information on working with job schedule entries.
Work with Job Schedule Entries CWIAS400 03/02/04 11:49:16
Type options, press Enter. 2=Change 3=Hold 4=Remove 5=Display details 6=Release 8=Work with last submission 10=Submit immediately
Next -----Schedule------ Recovery Submit Opt Job Status Date Time Frequency Action Date ACMSNEP SCD *ALL 08:00:00 *WEEKLY *NOSBM 03/03/04 ACMSNEPEND SCD *ALL 22:00:00 *WEEKLY *NOSBM 03/02/04 KELLY SCD 04/09/03 16:51:14 *WEEKLY *SBMRLS 03/03/04 LINDA SAV 10/24/03 15:00:14 *ONCE *SBMRLS MRGCWMSG SCD *ALL 18:00:00 *WEEKLY *SBMRLS 03/02/04 MRGCWMSG21 SCD *ALL 18:15:00 *WEEKLY *SBMRLS 03/02/04 MRGCWMSG25 SCD *ALL 18:30:00 *WEEKLY *SBMRLS 03/02/04 More... Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Add F9=Retrieve F11=Display job queue data F12=Cancel F17=Top F18=Bottom |
3. At the Work with Job Schedule Entries screen, press F6 to advance to the Add Job Schedule Entry (ADDJOBSCDE) screen, where you can create a schedule for a CWDirect process to run automatically.
Add Job Schedule Entry (ADDJOBSCDE)
Type choices, press Enter.
Job name . . . . . . . . . . . . DAILYBSTS Name, *JOBD Command to run . . . . . . . . . CALL ACR0178 PARM('' '' 'KAB' X'555F')
Frequency . . . . . . . . . . . *WEEKLY *ONCE, *WEEKLY, *MONTHLY Schedule date, or . . . . . . . *NONE Date, *CURRENT, *MONTHSTR... Schedule day . . . . . . . . . . *ALL *NONE, *ALL, *MON, *TUE... + for more values Schedule time . . . . . . . . . 18:00:00 Time, *CURRENT
Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys |
Field |
Description |
Job name |
The user-defined name you wish to give to the scheduled job. |
Command to run |
The call statement the system runs to submit the CWDirect process. See CWDirect Processes for a list of common CWDirect processes you may wish to automate. |
Frequency |
Indicates how often the system submits the job. *SAME = The value does not change. *ONCE = The system submits the job once. *WEEKLY = The system submits the job on the same day(s) of each week at the scheduled time. *MONTHLY = The system submits the job on the same day(s) of each month at the scheduled time. |
Schedule date |
The date when the job runs. *SAME = The value does not change. *CURRENT = The system submits the job on the current date. *MONTHSTR = The system submits the job on the first day of the month. *MONTHEND = The system submits the job on the last day of the month. *NONE = The job does not run on a specified date. |
Schedule day |
The day of the week when the job runs. *SAME = The value does not change. *NONE = The job does not run on a specified day. *ALL = The job runs every day. *MON = The job runs on Monday. *TUE = The job runs on Tuesday. *WED = The job runs on Wednesday. *THU = The job runs on Thursday. *FRI = The job runs on Friday. *SAT = The job runs on Saturday. *SUN = The job runs on Sunday. |
Schedule time |
The time, in military HH:MM:SS format, when the system submits the job. Enter a valid time in HH:MM:SS format or: *SAME = The value does not change. *CURRENT = The system submits the job at the current time. |
4. Press F10 to display additional parameters and Page Down to the second Add Job Description screen.
Make sure you enter the job description that contains the CWMPDTA and CWMPPGM libraries in the Job description field.
Add Job Schedule Entry (ADDJOBSCDE)
Type choices, press Enter.
Additional Parameters
Omit date . . . . . . . . . . . *NONE Date, *NONE + for more values Recovery action . . . . . . . . *SBMRLS *SBMRLS, *SBMHLD, *NOSBM Job description . . . . . . . . KAB Name, *USRPRF Library . . . . . . . . . . . QUSRSYS Name, *LIBL, *CURLIB Job queue . . . . . . . . . . . *JOBD Name, *JOBD Library . . . . . . . . . . . Name, *LIBL, *CURLIB User . . . . . . . . . . . . . . *CURRENT Name, *JOBD, *CURRENT Message queue . . . . . . . . . *USRPRF Name, *USRPRF, *NONE Library . . . . . . . . . . . Name, *LIBL, *CURLIB Text 'description' . . . . . . . *BLANK
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys |
Field |
Description |
Omit date |
The dates on which the job is not submitted, for example holidays; you can specify up to 20 dates. *SAME = The value does not change. *NONE = There are no dates when the job is excluded. Date = A date when the job is not submitted. |
Recovery action |
The recovery action the system takes if the job cannot be submitted at the designated time because the system is powered down or in a restricted state. The action specified occurs during the next IPL or when the system comes out of the restricted state. If multiple occurrences of the job are missed, the job is submitted only once. *SAME = The value does not change. *SBMRLS = The system submits the job in a released state. *SBMHLD = The system submits the job in a held state. *NOSBM = The job is not submitted for missed occurrences. |
Job description |
The job description used to submit the job. The job description defines the library list available; make sure that the program reference in the command is located in a library defined in the library list. *SAME = The value does not change. *USRPRF = The system uses the job description specified for the user profile under which the job is run. |
Library |
The library where the job description is located. *LIBL = All libraries in the job’s library list are searched until the job description is found. *CURLIB = The current library for the job is used to locate the job description. If a library is not specified as the current library for the job, the QGPL library is used. |
Job queue |
The job queue where the job is placed. *SAME = The value does not change. *JOBD = The system places the submitted job on the job queue specified in the job description. |
Library |
The library where the job queue is located. Enter a valid library, or: *LIBL = All libraries in the job’s library list are searched until the job description is found. *CURLIB = The current library for the job is used to locate the job queue. If a library is not specified as the current library for the job, the QGPL library is used. |
User |
The User ID under which the system submits the job. Specify a valid user ID or, *SAME = The value does not change. *CURRENT = The job is submitted under the current user. *JOBD = The system submits the job under the user ID defined for the job description. |
Message queue |
The name of the message queue where the system sends messages. The system writes a message when the job is submitted and when the job has completed. Enter a valid message queue, or *SAME = The value does not change. *USRPRF = The system uses the message queue defined for the user that submits the job. *NONE = The system does not write messages for the job; error messages are sent to the QSYSOPR message queue. |
Library |
The library where the message queue is located. Enter a valid library, or: *LIBL = All libraries in the job’s library list are searched until the message queue is found. *CURLIB = The current library for the job is used to locate the message queue. If a library is not specified as the current library for the job, the QGPL library is used. |
Text description |
A description of the scheduled job; you can enter up to 50 characters, enclosed in apostrophes. |
Example: To run the Daily Business Status report each day at 6 PM:
Field |
Entry |
Job name |
DAILYBSTS |
Command to run |
CALL PGM(ACR0178) PARM(’’ ’’ ’KAB’ X’555F’) |
Frequency |
*WEEKLY |
Schedule date |
*NONE |
Schedule day |
*ALL |
Schedule time |
’18:00:00’ |
The table below lists processes that you may wish to automate.
Process |
Call Statement |
Function |
Start Asyncs |
CALL PGM(MSR0298) PARM(’’ ’CNTRLDATAQ’) |
Maintain Background Job Control (MBJC); see Starting the ASYNC Jobs. |
End Asyncs |
CALL MSR0654 PARM(’’) |
Maintain Background Job Control (MBJC); see Ending the ASYNC Jobs. |
Start E-Commerce Jobs |
CALL ECR0244 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
|
Stop E-Commerce Jobs |
CALL ECR0246 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
|
Start Integration Jobs |
CALL MSX1288 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
|
Stop Integration Jobs |
CALL MSX1289 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
|
Start PC Manifest Socket Job |
CALL MNX0023P PARM(’’ ’’) |
|
End PC Manifest Socket Job |
CALL MNX0025 PARM(’’ ’’) |
|
Extract item availability to the e-commerce staging library |
CALL ECR0144 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
ECAVAIL periodic function (program name ECR0144); see E-Commerce Item Availability Processing |
Extract currently available gift certificate numbers and amounts to e-commerce |
CALL ECR0142 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
ECGFTC periodic function (program name ECR0142); see E-Commerce Periodic Functions |
Reserve order lines that have a backorder reason, but no backorder warehouse |
CALL PFR0024 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
BO_REAS periodic function (program name PFR0024); see Periodic Functions |
Evaluate Backorders |
CALL FLR0804 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
EVAL_BO periodic function (program name FLR0804); see Working with the EBO_ASYNC Job |
Generate the carryover report |
CALL PFR0033 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
CARRYOV periodic function (program name PFR0033); see Printing the Carryover Report (PCOR) |
Generate the Daily Business Status report |
CALL ACR0178 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
DBST periodic function (program name ACR0178); see Printing the Daily Business Status Report (DBST) |
Generate the Sales Journal by Pay Type report |
CALL ACR0315 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
DSLJPAY periodic function (program name ACR0315); see Printing the Sales Journal by Pay Type (PSJP) |
Generate the Daily Sales Journal report |
CALL ACR0216 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
DSLJRN periodic function (program name ACR0216); see Printing the Sales Journal (PDSJ) |
Updating Line of Business Order Queue Statistics |
CALL PFR0034 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
LOBSTAT periodic function (program name PFR0034); see Updating the Line of Business Order Queue Statistics |
Generate the Suspended Orders List report |
CALL OER0756 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
SUSPEND periodic function (program name OER0756); see Periodic Functions |
Clear the daily journals |
CALL MSR0574 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
DLYCLR periodic function (program name MSR0574); see Periodic Functions |
Average days to pay; the # of days between the invoice date and the date payment for the invoice is posted to the customer’s A/R account |
CALL ACR0108 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
AVGDPAY periodic function (program name ACR0108); see Periodic Functions |
Generate the Processed Refund Register |
CALL CSR0533 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
REFPROC periodic function (program name CSR0533); see Printing the Processed Refund Register (PPRR) |
Write off refunds and generate the Refund/Write Offs - Refund Checks report |
CALL PFR0009 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
REFWRO periodic function (program name PFR0009); see Working with Refunds, Writeoffs and Balances Due (WREF) |
Generate the Check Reconciliation List |
CALL PFR0008 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
RFRECON periodic function (program name PFR0008); see Reconciling Checks (MREC) |
Generate the On hand by Warehouse report |
CALL PFR0005 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
ONHAND periodic function (program name PFR0005); see Printing the On Hand by Warehouse Report (POHW) |
Generate the Open Prepaid Order List |
CALL PFR0006 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
OPENPP periodic function (program name PFR0006); see Printing the Open Prepaid Order List (POPP) |
Generate the Refund Due List by Type |
CALL CSR0986 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
REFDUET periodic function (program name CSR0986); see Printing and Interpreting Refund Due Lists (MRDU) |
Generate the Unredeemed Gift Certificates report |
CALL PFR0007 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
UNGIFT periodic function (program name PFR0007); see Working with Gift Certificates |
Monthly Clear Process |
CALL MSR0576 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
CLR_MTH periodic function (program name MSR0576): see Periodic Functions |
Evaluate and reserve orders |
CALL FLR0246 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
FUTURE periodic function (program name FLR0246); see Periodic Functions |
Generate the Monthly Cash Receipts Journal |
CALL PFR0002 PARM(’’ ’’ ’COMPANY’ X’999F’) Where: COMPANY = A description of the CWDirect company. 999 = CWDirect company code. |
MECRJRN periodic function (program name PFR0002); see Printing the Cash Receipts Journal (PCRJ) |
Generate pick slips |
CALL PGM(FLR0364) PARM(’’ X’999F’ X’55555F’ ’N’) Where: 999 = CWDirect company code. 55555 = The Sequence # field in the Pick Slip Gen Options file associated with the pick slip template you wish to run. |
|
Process batch orders |
CALL PGM(OER0435) PARM(’’ ’COMPANY NAME’ X’999F’ X’55555F’ ’A’) Where: COMPANY NAME = A description of the CWDirect company. 999 = CWDirect company code. 55555 = The order batch number you wish to process. |
Batch Order Entry (OEOM); see Accepting an Order in the Batch |
Send Deposits |
CALL PGM(AAR0003) PARM(’’ X’999F’ ’A’ ’B’ X’CYYMMDDF’ X’1111111F’ X’2222222222222F’ X’3333333F’ X’4444444444444F’) Where: 999 = CWDirect company code. A = Enter Y to create deposits. B = Enter Y to send deposits. CYYMMDD = The date of the transactions you wish to deposit. |
|
|
1111111 = The maximum number of deposits to process for purchases. The system selects transactions by order number, then invoice number, until it reaches the number of transactions. 2222222222222 = The maximum total dollar amount of all deposits to process for purchases. The system continues selecting transactions in order number sequence and stops before it would exceed this amount. 3333333 = The maximum number of deposits to process for returns. The system selects transactions by order number, then invoice number, until it reaches the number of transactions. 4444444444444 = The maximum total dollar amount of all credit transactions to process. The system continues selecting transactions in order number sequence and stops before it exceeds this amount. |
|
Process Refunds |
CALL PGM(CSR0384) PARM(’’ X’999F’ ’COMPANY’ ’A’ ’B’ ’C’ ’D’ ’E’ ’F’ X’111111111F’ X’222222222F’ X’333333333F’ X’444444444F’ X’555555555F’ ’123’ X’CYYMMDDF’) Where: 999 = CWDirect company code. COMPANY = A description of the CWDirect company. A = Enter Y to create credit open items for A/R customers; otherwise, enter N. B = Enter Y to generate refunds in the form of credit card credits; otherwise enter N. C = Enter Y to generate refund checks; otherwise enter N. D = Enter Y to generate merchandise, sale, and bonus credits; otherwise enter N. E = Enter Y to process refunds to be written off; otherwise enter N. |
|
|
F = Enter Y to generate stored value card credits; otherwise enter N. 111111111 = The maximum dollar amount that you want to pay in A/R credits. 222222222 = The maximum dollar amount that you want to process in credit card credits. 333333333 = The maximum dollar amount that you want to disburse in refund checks. 444444444 = The maximum dollar amount that you want to disburse in merchandise credits. 555555555 = The maximum dollar amount that you want to process in stored value card refunds. 123 = The bank associated with the source code on the order for which you wish to process refunds. CYYMMDD = The date of the refunds you with to process. |
|
Chapter 26: Using the Financial Data Interface | Contents | SCVs | Search | Glossary | Reports | XML | Index | Part C: Using the System Utilities |
SO02_15 CWDirect 18.0 August 2015 OTN