Chapter 2: Working with the CNTL_ASYNC Job

The controlling ASYNC job (CNTL_ASYNC) is used to start and end each of the background ASYNC jobs. When the CNTL_ASYNC job is started, all of the background ASYNC jobs are started; when the CNTL_ASYNC job is ended, all of the background ASYNC jobs end. You cannot start or end an individual background ASYNC job.

The CNTL_ASYNC job should be ended each day, when your operations for the day are complete. When the CNTL_ASYNC job is ended:

• Records that were processed successfully for each background ASYNC job are deleted from the data queue files.

• An error list is produced for each background ASYNC job.

Ending the background ASYNC jobs allows you to delete unnecessary records from the system, and enables you to correct any processing errors in a timely manner.

In this chapter:

Work with Background Jobs Screen

Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job)

Starting the Background ASYNC Jobs

Starting the ASYNC Subsystem

Starting the Background ASYNC jobs

Override ASYNC Start Date Pop-up Window

Ending the Background ASYNC Jobs

Display Active Procedure Window

Reorganizing the ASYNC Job Data Queues

Changing the Status of the ASYNC Jobs

Work with Background Jobs Screen

Purpose: This screen displays the current status of each background ASYNC job. This screen is used to start or end the ASYNC jobs, to display the records in the data queue associated with each job, to reorganize the data queues, or to change the status of a particular background job if necessary.

All of the options on this screen can be used with the Controlling ASYNC (CNTL_ASYNC) job.

How to display this screen: Enter MBJC in the Fast path field at the top of any menu or select Background Job Control from a menu.

MSR0234 DISPLAY Work with Background Jobs 9/19/97 15:53:52

The KL Mail Order Company

Opt Job Name Description Status Control

Type options, press Enter.

5=Display 7=Start 8=End 9=Reorganize queue 10=Display data queue

11=Change status

BILL_ASYNC Billing Data Queue *ACTIVE N

Start: 9/19/97 15:32:13 KAREN_L

End..: 9/18/97 15:29:48 KAREN_L

CNTL_ASYNC Controlling Data Queue *ENDPEND Y

Start: 9/19/97 15:30:23 KAREN_L

End..: 9/18/97 15:29:42 KAREN_L

EBO_ASYNC Evaluate B/O Data Queue *INACTIVE N

Start: 9/18/97 15:33:55 WENDY_W

End..: 9/12/97 17:30:05 ELISE_K +

F3=Exit F12=Cancel

Field

Description

Job name

The name of the ASYNC job. The ASYNC jobs are:

BILL_ASYNC: Billing background job

CNTL_ASYNC: Controlling background job

EBO_ASYNC: Evaluate backorders background job

ORDR_ASYNC: Order processing background job

OTHR_ASYNC: Other background job purchase orders)

PCMANASYNC PC: Manifesting background job

PCINTASYNC: Interactive PC Manifesting background job

Each ASYNC job is discussed separately in this part.

Alphanumeric, 10 positions; optional.

Description

The description of the data queue associated with the ASYNC function.

Alphanumeric, 40 positions; optional.

Status

The status of the ASYNC job. Valid status codes are:

*ACTIVE: the ASYNC function is running

*INACTIVE: the ASYNC function has ended

*JOBQ: the ASYNC function has been submitted to the job queue for startup

*Endpend: the ASYNC function is in the process of ending

*Reorg: the data queue associated with the ASYNC function is being reorganized

Alphanumeric, 10 positions; display-only.

Control

A code indicating whether the ASYNC function is a controlling function. The controlling function is used to start, end, and reorganize the data queues for the ASYNC functions it controls. Currently, the CNTL_ASYNC function is the only controlling function.

Valid codes are:

Y = the ASYNC function is a controlling function

N = the ASYNC function is not a controlling function.

Alphanumeric, 1 position; display-only.

Note: In order to perform certain options at the Work with Background Jobs screen, such as change the status of a process, you need to have the Security administrator flag at the Create User Screen or Change User screen set to Y.

Screen Option

Procedure

Display the attributes of an ASYNC job

Enter 5 next to an ASYNC job to advance to the Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job).

Start the background ASYNC jobs

Enter 7 next to the CNTL_ ASYNC job to start all of the ASYNC jobs. See Starting the Background ASYNC Jobs.

End the background ASYNC jobs

Enter 8 next to the CNTL_ ASYNC job to end all of the ASYNC jobs. See Ending the Background ASYNC Jobs.

Reorganize the data queue for a background ASYNC job

Enter 9 next to the CNTL_ ASYNC job to reorganize the data queues associated with each ASYNC job. See Reorganizing the ASYNC Job Data Queues.

Display the data queue for an ASYNC job

Enter 10 next to an ASYNC job.

Option 10 cannot be used with the CNTL_ASYNC, PCMANASYNC, and PCINTASYNC functions.

Change the status of the CNTL_ ASYNC job

Enter 11 next to an ASYNC job that requires a status change. See Changing the Status of the ASYNC Jobs.

Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job)

Purpose: Use this screen to display descriptive information about an ASYNC job such as the CNTL_ASYNC job.

How to display this screen: Enter 5 next to a job at the Work with Background Jobs Screen.

MSR0240 DISPLAY Display Asynchronous Job 10/09/97 13:18:42

EZK Mail Order

Data queue name . . . : EVLBODATAQ

Job name . . . . . . : EBO_ASYNC

Description . . . . . : Evaluate B/O Data Queue

Data queue length . . : 24

Library . . . . . . . : CWM25QDTA

Wait time . . . . . . : -1 0=No wait, -1=Wait forever

Start . . . . . . . . : 10/09/97 11:33:04 ELISE_K

End . . . . . . . . . : 10/09/97 11:40:07 NANCY_S

Controlling job ? . . : N (N=No, Y=Yes)

System Option ? . . . : Y (N=No, Y=Yes)

Status . . . . . . . : I *INACTIVE

F3=Exit F12=Cancel

Field

Description

Data queue name

The name of the data queue where transactions records are sent for processing by this ASYNC job. The data queues are:

CNTL_ASYNC: CNTRLDATAQ

BILL_ASYNC: BILLDATAQ

EBO_ASYNC: EVLBODATAQ

ORDR_ASYNC: ORDERDATAQ

OTHR_ASYNC: OTHERDATAQ

PCMANASYNC: PCMANDATAQ

PCINTASYNC: PCINTDATAQ

Alphanumeric, 10 positions; display-only.

Job name

The name of the ASYNC job. The ASYNC jobs are:

BILL_ASYNC: Billing background job

CNTL_ASYNC: Controlling background job

EBO_ASYNC: Evaluate backorders background job

ORDR_ASYNC: Order processing background job

OTHR_ASYNC: Other background job purchase orders)

PCMANASYNC PC: Manifesting background job

PCINTASYNC: Interactive PC Manifesting background job

Each ASYNC job is discussed separately in this part.

Alphanumeric, 10 positions; optional.

Description

The description of the ASYNC job.

Alphanumeric, 40 positions; display-only

Data queue length

The length of the data queue where transactions records for this ASYNC job are processed. The data queue lengths are:

CNTRLDATAQ: 24 positions

BILLDATAQ: 24 positions

EVLBODATAQ: 24 positions

ORDERDATAQ: 24 positions

OTHERDATAQ: 24 positions

PCMANDATAQ: 256 positions

PCINTDATAQ: 24 positions

Numeric, 3 positions; display-only

Library

The library list where the ASYNC job is defined.

Alphanumeric, 10 positions; display-only

Wait time

The length of time the function will wait for records to be sent for processing before it times out. Valid values are:

0 - No wait. The function ends when there are no records to process.

1 - Wait forever. The function will not time out when there are no records to process.

Numeric, 1 position; display-only.

Start

The date and time the ASYNC job was last started and the User ID of the person who started it.

(Date): Numeric, 6 positions; display-only.

(Time): Numeric, 6 positions; display-only.

(User ID): Alphanumeric, 10 positions; display-only.

End

The date and time the ASYNC job was last ended and the User iD of the person who ended it.

(Date): Numeric, 6 positions; display-only.

(Time): Numeric, 6 positions; display-only.

(User ID): Alphanumeric, 10 positions; display-only.

Controlling job?

A flag indicating whether this function controls other ASYNC functions. The controlling ASYNC function starts and ends other ASYNC functions. Valid values are:

Y = This is a controlling ASYNC function..

N = This is not a controlling ASYNC function.

The CNTL_ASYNC job is the only controlling ASYNC job.

Alphanumeric, 1 position; display-only.

System Option?

A flag indicating whether this function is a system function that cannot be deleted by the user. Valid values are:

Y = This function cannot be deleted by the user.

N = This function can be deleted by the user.

Alphanumeric, 1 position; display-only.

Status

The current status of the function. Valid status codes are:

A = *ACTIVE

I = *INACTIVE

E = *ENDPEND

J = *JOBQ

R = *REORG

Alphanumeric, 1 position; display-only.

Starting the Background ASYNC Jobs

Purpose: The CNTL_ASYNC job is used to start and end all of the other background ASYNC jobs. The background jobs must be active for the records in the data queues to be processed. If the background ASYNC jobs are not active, records will be held in the data queue until you start the background ASYNC jobs.

How to start the ASYNC jobs: Enter 7 next to the CNTL_ASYNC job. See Starting the ASYNC Subsystem

MSR0234 DISPLAY Work with Background Jobs 9/19/97 16:15:01

The KL Mail Order Company

Opt Job Name Description Status Control

Type options, press Enter.

5=Display 7=Start 8=End 9=Reorganize queue 10=Display data queue

11=Change status

BILL_ASYNC Billing Data Queue *ACTIVE N

Start: 9/19/97 15:32:13 KAREN_L

End..: 9/18/97 15:29:48 KAREN_L

7 CNTL_ASYNC Controlling Data Queue *ENDPEND Y

Start: 9/19/97 15:30:23 KAREN_L

End..: 9/18/97 15:29:42 KAREN_L

EBO_ASYNC Evaluate B/O Data Queue *INACTIVE N

Start: 9/18/97 15:33:55 WENDY_W

End..: 9/12/97 17:30:05 ELISE_K +

F3=Exit F12=Cancel

Step-by-step instructions:

Starting the ASYNC Subsystem

1. Check to see if the ASYNC subsystem is started. The ASYNC subsystem must be active for the ASYNC jobs to run. Enter WRKSBS at a command line to display a list of active subsystems. If the ASYNC subsystem is on the list, the subsystem is active.

2. If the ASYNC subsystem is not on the list, enter STRSBS ASYNC at the command line and to start the ASYNC subsystem.

Starting the Background ASYNC jobs

At the Work with Background Jobs Screen, review the status of the background jobs. The jobs must be started if the status is *INACTIVE.

1. Enter 7 next to the CNTL_ASYNC job and to start the ASYNC jobs.

2. The Override ASYNC Start Date Pop-up Window displays if the Use Async Start Date for Billing Transactions (E95) system control value is set to Y.

3. The status of the ASYNC jobs should be *ACTIVE. If the status of the ASYNC jobs is *JOBQ, this means that the ASYNC subsystem is not active. See Starting the ASYNC Subsystem.

4. Once the ASYNC subsystem is started, the status of the ASYNC jobs will change from *JOBQ to *ACTIVE.

 

Note: When you enter 7 next to the CNTL_ASYNC job to start the background jobs, the system checks the Active Procedure file to see if an active procedure exists for the PCINTASYNC job or PCMANASYNC job. If an active procedure exists for one or both of these jobs, the system does not automatically start the job.

Additional information: To start the background ASYNC jobs, the status of each job must be *INACTIVE. If the status of the ASYNC jobs is *ACTIVE and the jobs are not running, you must change the status of each ASYNC job to *INACTIVE before you enter 7 next to the CNTL_ASYNC job to start the background jobs. See Changing the Status of the ASYNC Jobs.

The Interactive PC Manifest ASYNC (PCINTASYNC) will become active only if one or more companies defined in CWDirect have the PC Manifest Tool (B81) in the System Control file set to TRACERI and Interactive Processing (E56) in the System Control file set to A (for automatic). If you are communicating with the PC Manifest system in a batch mode, the PCINTASYNC job will never become active.

If an active procedure exists for the PCINTASYNC job or the PCMANASYNC job in the Active Procedure file, the system does not automatically start the job.

Override ASYNC Start Date Pop-up Window

If the Use Async Start Date for Billing Transactions (E95) system control value is set to Y, the following pop-up window displays when you start the ASYNC jobs:

Override Async Start Date

Job date . . . . 100997

F3=Exit

This window enables you to change the date the system uses to record when a shipment was made. This may be useful if, for example, you want to change the cutoff for a group of shipments.

Completing this window: Enter the date you want to use for posting billing transactions. The current system date defaults.

If you do not want to override the date, press F3 or F12 to exit the window and start the ASYNC jobs using the current system date.

When you change the date: Changing the ASYNC start date using this window will produce:

• the Start date that displays for each active ASYNC job on the Work with Background Jobs Screen will display your entry in this window.

• the system will use your entry in this window when updating:

• invoice date

• inventory transaction date

• general ledger interface transaction date

Ending the Background ASYNC Jobs

Purpose: Use the CNTL_ASYNC job to end all of the other background ASYNC jobs. You should bring down the background jobs at the end of your processing day. When you bring down the background ASYNC jobs:

• A terminator record is sent to each data queue to identify the last record to be processed. Records sent to the data queue before the terminator record will be processed; records sent to the data queue after the terminator record was sent will be processed when the background ASYNC jobs are restarted.

• The data queues are reorganized. All completed records are deleted from the data queue files. Records that have not been fully processed will be reloaded to the data queue when the background ASYNC jobs are restarted.

• An error list prints for each background ASYNC job, listing the records that could not be fully processed and the reason for the error.

How to end the ASYNC jobs: Enter 8 next to the CNTL_ASYNC job at the Work with Background Jobs Screen. The The End Asynchronous Jobs pop-up window displays.

End Asynchronous Jobs

Scheduled submit . . N (Y/N)

End Time . . . (HH:MM:SS)

End date . . . . 22101

F12=Cancel

Enter Y in the Scheduled submit field, and enter an End time and End date (the current date defaults, but you can override it) to schedule a date and time when the ASYNC jobs will end. Otherwise, press Enterto end the jobs immediately. The status of the ASYNC jobs changes to ENDING and then to INACTIVE.

Display Active Procedure Window

When you end the ASYNC jobs, this window displays if there are any active procedures for the Order Entry/Maintenance, Purchase Order Entry/Maintenance, Receiving, Confirmation, or PC Manifesting functions. The system creates these records to prevent possible conflicts when users are engaged in these activities.

If a user is active in a function:

• the user can exit the function before the ASYNC jobs end. Depending on the activity, the user might need to exit CWDirect and then reenter, if needed, to clear the active procedure record.

• you can enter 4 next to each active procedure record to delete the active procedure. Deleting the active procedure does not force the user out of the activity; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, this allows more than one user to access the same record, such as an order or a customer and possibly overwrite each other’s updates.

If neither of these steps clears the active procedure record, you will need to purge the Active Procedures file. See Chapter 9: Purging Active Procedures.

Display Active Procedure

EZK Mail Order

Type options, press Enter.

4=Delete

Opt Job # Program Description User Workstation

445638 ORDER ENTRY/MAINTENANCE NANCY_S QPADEV0005

Start Date : 10/09/97 Time : 11:46:51

445710 ORDER ENTRY/MAINTENANCE ERIK_G QPADEV0021

Start Date : 10/09/97 Time : 13:20:45

F3=Exit F5=Refresh

Field

Description

Job #

The system job number assigned to the active procedure.

Numeric, 6 positions; display-only

Program description

The description of the program associated with the Active Procedures record.

Alphanumeric, 3 positions; display-only.

User

The User ID of the person engaged in the activity that created the Active Procedures record.

Alphanumeric, 10 positions; display-only.

Workstation

The Workstation ID where the user is working.

Alphanumeric, 10 positions, display-only.

Start date

The date when the Active Procedures record was created. This is the date the user entered the application.

Numeric, 6 positions; display-only.

Time

The time when the Active Procedure record was created. This is the time the user entered the application.

Numeric, 6 positions; display-only.

Step-by-step instructions:

1. Have each person whose name appears in the window exit the application so that the ASYNC jobs can be ended. It may be necessary to exit CWDirect temporarily to delete the active procedure record, or

2. Enter 4 next to each active procedure record to delete the active procedure. Deleting the active procedure does not force the user out of the activity; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, this allows more than one user to access the same record, such as an order or a customer and possibly overwrite each other’s updates.

3. Use Purging Active Procedures to delete any stranded Active Procedure records, if necessary.

4. Press F5 to refresh the Active Procedure Window to monitor whether the users have exited.

5. Press F3 to exit the window and return to the Work with Background Jobs Screen.

Deleting active procedure records: It is also possible to delete each Active Procedure record at this window by entering 4 next to each record in the window. Deleting the active procedure does not force the user out of the activity, such as order entry; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, it is not recommended to delete Active Procedure records in this way, because it removes the safeguard against two users potentially accessing the same record, such as an order or customer, at the same time.

When the jobs end: The status of each background job will change from *ACTIVE to *INACTIVE. (You may see *ENDPEND or *REORG before you see *INACTIVE, depending upon how long it takes to end each job.)

Note:

You must end the background ASYNC jobs before the ASYNC subsystem is brought down. If you bring down the ASYNC subsystem while the background ASYNC jobs are running, the jobs will be ended but will remain in an *ACTIVE status. See Changing the Status of the ASYNC Jobs.

When you end the ASYNC jobs using the CNTL_ASYNC, the PCINTASYNC job may not end immediately. The PCINTASYNC job will become inactive after the Wait Time if Automatic (E57) defined in the System Control file has been reached.

Reorganizing the ASYNC Job Data Queues

Purpose: The data queues associated with the ASYNC jobs are reorganized when the ASYNC jobs are ended. Use the Reorganize queue option as a recovery tool only when the ASYNC jobs end abnormally before the data queues have been reorganized. This option allows you to reorganize the data queues before the next ASYNC job end is processed.

To determine if the data queues were reorganized: Display the data queue for an ASYNC job. If the entry date for a record is earlier than the date you last ended the ASYNC jobs, or if records are in a *BLANK status, the data queues were not reorganized. If you do not use the Reorganize queue option, the data queues will be reorganized the next time you end the ASYNC jobs.

When you use the Reorganize queue option, the system deletes completed records from the data queue files associated with the ASYNC jobs. Records that have not been fully processed will be reloaded to the data queues when the background ASYNC jobs are restarted.

The Reorganize queue option is available only with the CNTL_ASYNC job. All of the ASYNC jobs must be in a *INACTIVE status, and there can be no Active Procedures records for Order Entry, Order Maintenance, Purchase Order Entry/Maintenance, Receiving, Confirmation, and PC Manifest functions.

How to reorganize the data queues: Enter 9 next to the CNTL_ASYNC job at the Work with Background Jobs Screen.

Note: Before you attempt to reorganize the data queues, you should make sure that the status of each ASYNC job is *INACTIVE.

Active procedures window: A pop-up window displays if there are any users in the Order Entry/Maintenance, Purchase Order Entry/Maintenance, Receiving, Confirmation, or PC Manifesting functions. The data queues cannot be reorganized if there are any users in these functions. See Ending the Background ASYNC Jobs.

Changing the Status of the ASYNC Jobs

Purpose: Use the Change Status option to change the status of the ASYNC jobs if they have ended, but their status indicates that they are still active. This situation occurs if the ASYNC subsystem is brought down while the background ASYNC jobs are still active; the background ASYNC jobs have really ended, but the status indicates that they are still *ACTIVE.

If the states is *ACTIVE, you cannot start the ASYNC jobs normally because the system considers them to be active. The only way that you can restart the background ASYNC jobs is to change the status of each job to *INACTIVE manually.

How to change ASYNC job status: Enter 11 next to a job at the Work with Background Jobs Screen.

A pop-up window displays from which you can select the status you want to assign to the background job. Enter 1 next to a status.

• Select *INACTIVE if the background job is ended and the status is currently *ACTIVE.

• Select *ACTIVE if the background job is running and the status is currently *INACTIVE.

 

Note: You must change the status of each background job separately. Changing the status of the CNTL_ASYNC job will not change the status of the individual background ASYNC jobs.

SO01_02 CWDirect 18.0 August 2015 OTN