Communication

WFL includes several statements that help inform you about what a job is doing. These statements include the following:

  • DISPLAY statement

  • ACCEPT function

  • INSTRUCTION statement

  • FETCH specification

In addition, these statements enable input to modify the activity of a job.

Communication Statements

The DISPLAY statement can be used to display a message at a specific point during job execution. The DISPLAY message appears at the ODT, in the job log, and at the CANDE or MARC station that initiated the job (if it was initiated through CANDE or MARC).

The ACCEPT function will ask you to supply input to the job while it is running. The ACCEPT function will display the specified message and will wait for you to return a value by way of the AX (Accept) system command.

The INSTRUCTION statement stores information about the job in a form that you can display at any time during job execution by using the IB (Instruction Block) system command.

The FETCH specification stores a message that you can display by using a PF (Print Fetch) system command, and suspends initiation of the job until the message has been displayed. The FETCH specification is intended to be used for informing you about what resources are required by the job.

Examples

The following example includes DISPLAY statements:

?BEGIN JOB WFLTEST(STRING DAY); 
  DISPLAY "CALL WILLIS AT EX. 3574 IF RUN-TIME ERRORS OCCUR"; 
  RUN (ODDCOM)OBJECT/COPY/FACTORS(DAY); 
  DISPLAY "GET INPUT FROM ARCH. TAPE 143 IF FILE REQUIRED"; 
  RUN (ODDCOM)OBJECT/FT/VERIFY(DAY); 
?END JOB. 

This example runs two programs that are each preceded by a display message informing the user what to do if certain conditions occur.

The following example shows a use of the ACCEPT function:

?BEGIN JOB; 
  STRING FN, PK; 
  FN := ACCEPT("ENTER NAME OF FILE DESIRED"); 
  PK := ACCEPT("ENTER NAME OF PACK DESIRED"); 
  RUN (OPR)DAILY/UPDATE; 
    FILE IN (TITLE = #FN ON #PK); 
?END JOB.

In this example, the values submitted by you are used in a file equation for a RUN statement. The job could have been written to receive the same values from you by way of a start parameter list. However, in that case you would have to know in advance what parameters to supply. The ACCEPT function, on the other hand, displays a message informing you what type of information to enter next.