Passing Parameters to a Task

The following examples show both the correct and incorrect WFL job program for parameter passing to a task.

Correct

In the following program example, the parameter XYZ is successfully passed to the object program REPORT/PGM:

The job JOB/WFLRUN:

?BEGIN JOB PROGRAM(STRING PROGTORUN,
                   STRING PARAMNAME);
  TASK PROGTASK;
  RUN OBJECT/#PROGTORUN(PARAMNAME) [PROGTASK];
?END JOB

Started as:

START JOB/WFLRUN("REPORT/PGM", "XYZ")

Incorrect

The following program example is incorrect because the parameter XYZ is not passed separately from the task name:

The job JOB/WFLRUN:

?BEGIN JOB PROGRAM(STRING PROGTORUN);
  TASK PROGTASK;
  RUN OBJECT/#PROGTORUN [PROGTASK];
?END JOB.

Started as:

START JOB/WFLRUN("REPORT/PGM(XYZ)");