Define periodical updates of expected payments for sales orders

Related topics

The following describes how to create scheduled job streams for automatic updates of expected payments. Here, you will define an update of expected payments for the cash flow forecast type SALES to be run weekly, every Sunday night at 1:00 o’clock.

The following cash flow forecast types are preloaded:

  • SALES – Sales orders
  • ARDIS – A/R documents, invoiced not yet updated in FIN
  • A/R – A/R documents
  • A/P – A/P documents
  • PURCHASE – Purchase orders

Note: If you want to set up a job for all types, you need to follow the instructions below once for each cash flow forecast type.

  1. Select the Work with batch programs menu item.
  2. You access Batch programs table maintenance. Click Add.
  3. You access the detail panel:
  4. Panel image

    Complete the following fields:

    Program
    Enter the batch job stream name to identify the job stream.
    Note: It is recommended that the job stream names start with an asterisk to distinguish them from the batch program names. It is also suggested that the defined company dependent job stream names end with the company code suffix that denotes for which IBS Enterprise company the job is going to be submitted.
    In this case, enter *CFM_SALKG.
    Description
    Enter a description of the batch job stream.
    Subset
    Enter the subset level for the job stream. The subset level should be the domain decided by the system administrator. In this case, enter *CUSTLOCAL.
    Identity
    Enter an identity for the job stream. In this case, enter CFM. This field is mandatory but it is not currently used anywhere.
    Application
    Enter the application to which the job stream belongs, i.e., CFM which must be activated.
    Batch type
    Enter batch type 2 (batch job stream).
    Execute from window
    Set to NO.

    Click OK to update. The defined job stream action sequence for each cash flow forecast type calculation must now be entered into the Job control table.

  5. Select the Work with job control table menu item.
  6. You access Job control table maintenance:
  7. Panel image

    Complete the following fields:

    Program
    Enter the batch job stream name. Here, enter *CFM_SALKG.
    User
    Enter *ALL.
    Note: If you enter *ALL, all error messages will be sent to the user who submits this job to the scheduler. If you enter a specific user, all error messages will be sent to that user.

    Click OK.

  8. You access the Job control table maintenance detail panel. Click Add.
  9. You access the second level detail panel:
  10. Panel image

    On this panel you have to enter the action sequence items for the update job stream. The following is the list of actions that must be entered for this program.

    Sq Keyword Line Parameter
    2 JOB 10 CFM_SALKG
    2 JOBQ 20 ASWSINGLE
    4 EXCBPGM 30 CHGASWCOM COMPANY(KG)
    5 EXCAPGM 40 CHGASWLDA See table below for parameters
    5 EXCAPGM 50 EXCASWPGM PGM(FCMR020) PARM(N)

    Each of the lines must be entered one by one. Complete the fields one by one according to the list above. See the following comments which are connected to the fields and refer to the table below for information about the CHGASWLDA values:

    Sq
    The sequence value is automatically assigned by the program based on the entered keyword, but can be resequenced on the Job control table maintenance detail panel by clicking Resequence line number. It may also be left blank if no resequencing is needed.
    Keyword
    The keyword JOB (Sq 2, Line 10) – is the parameter that defines the job name that will be submitted by the job stream manager. It is recommended that the job name is the same as the job stream with the initial asterisk dropped.
    The keyword JOBQ (Sq 2, Line 30) – is the parameter that defines the job queue name to which the job will be submitted by the job control manager. The job queue name must exist in the system.
    The keyword EXCBPGM (Sq 4, Line 30) – is the parameter that defines a command that sets the environment for the selected company. The proper company code must be entered between the parentheses for each customer installation. In this example, company code KG is entered.
    The keyword EXCAPGM (Sq 5, Line 40) – is the parameter that defines the CHGASWLDA command that defines the LDA values for the program.
    Caution: The parameters for the CHGASWLDA command must be entered exactly as described in the table below.
    The keyword EXCAPGM (Sq 5, Line 50) – is the parameter that defines the command that calls the actual update program.
    Caution: This parameter line must be entered exactly as shown in table above.

    Parameters – CHGASWLDA

    Line Parameter New value Type Rel. DD/ per/YY, str/end of MM Start position No. of positions
    40 Cash flow forecast type Enter, between the apostrophes, the cash flow forecast type name in capitals as defined in the cash flow forecast type table. The entry between the apostrophes must always be 10 characters long, padded with blanks; if necessary. *CHAR Blank 005 10

    Return to the previous panel when all parameters are entered.

  11. When all the program parameters are defined, the Job control table maintenance detail panel displays all the entered item sequences. You have to add the job to the OS/400 scheduler. Click Add job schedule entry.
  12. You access the Add Job Schedule Entry panel:
  13. Panel image

    The following fields are relevant:

    Job name
    This field is defaulted with the job you are working with.
    Command to run
    This field is defaulted with the proper command string parameters and must not be changed.
    Frequency
    This value must be entered to determine how often the scheduled job should be submitted for execution. Enter *WEEKLY.
    Schedule date
    Here, enter *NONE.
    Schedule day
    Enter *SUN.
    Schedule time
    This field allows you to determine at what time during the day this job should be executed. For this job, enter 01:00:00.

    Click OK.

    If an error occurs when running the update program, the following error messages will be sent to the messages queue of the user that submitted the job:

    Note: If you enter *ALL, all error messages will be sent to the user who submits this job to the scheduler. If you enter a specific user, all error messages will be sent to that user.

    If the update program cannot be properly completed due to certain validation errors, the following error message will be sent to the message queue of the job stream user or to the message queue of the user that has submitted the job to the scheduler, if the job stream user is *ALL:

    • CM02001: Scheduled job for update of cash flow forecast type “SALES” (in this task) ended in error. SALES is the cash flow forecast type, entered into the job control table for the scheduled job.

Related topics