Академический Документы
Профессиональный Документы
Культура Документы
You should be very careful to ensure that the use of this information and/or software material complies with the laws,
rules, and regulations of the jurisdictions with respect to which it is used.
The information contained herein is subject to change without notice. Revisions may be issued to advise of such
changes and/or additions.
Notice to U.S. Government End Users: This software and any accompanying documentation are commercial items
which have been developed entirely at private expense. They are delivered and licensed as commercial computer
software and commercial computer software documentation within the meaning of the applicable acquisition
regulations. Use, reproduction, or disclosure by the Government is subject to the terms of Unisys’ standard commercial
license for the products, and where applicable, the restricted/limited rights provisions of the contract data rights
clauses.
Unisys and other Unisys product and service names mentioned herein, as well as their respective logos, are
trademarks or registered trademarks of Unisys Corporation.
All other trademarks referenced herein are the property of their respective owners.
Contents
Section 1. Introduction
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Documentation Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
How to Use This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
iv 8807 7391-006
Contents
8807 7391-006 v
Contents
vi 8807 7391-006
Contents
8807 7391-006 ix
Contents
x 8807 7391-006
Contents
Hostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16–2
Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16–2
System Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16–2
MCP Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16–3
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
8807 7391-006 xi
Contents
Purpose
WFL Made Simple introduces you to the most commonly used features of Work Flow
Language (WFL).
WFL is a programming language for writing batch jobs. WFL includes features for running
programs, modifying their behavior, and monitoring their progress.
WFL also includes features for file maintenance. The most important of these is the COPY
statement, which you can use in a WFL job or enter as a command in CANDE, MARC,
Operations Center, or at an ODT.
Scope
WFL Made Simple uses examples to teach you the basics of using WFL. This manual is
not intended as a complete reference to WFL. Rather, it is a companion to the Work Flow
Language (WFL) Programming Reference Manual.
Another related manual is the Task Management Programming Guide. Refer to that
manual for discussions of
• Tasking concepts
• Running jobs or tasks on remote hosts in a network
• Restarting jobs and tasks
Audience
The audience for WFL Made Simple includes
• Programmers, who can use this manual to learn how to compile programs or how to
initiate them from a job shell
• Operators, who can use some WFL statements as commands, or who can write jobs
to automate some system operations
Documentation Updates
This document contains all the information that was available at the time of
publication. Changes identified after release of this document are included in problem list
entry (PLE) 19163521. To obtain a copy of the PLE, contact your Unisys service
representative or access the current PLE from the Unisys Product Support website:
http://www.support.unisys.com/all/ple/19163521
Note: If you are not logged into the Product Support site, you will be asked to do so.
Prerequisites
To use WFL Made Simple, you should already be familiar with some basic system
concepts (for example, you should know what an ODT is and what system commands
are). You should know what MARC and CANDE are. You should also be familiar with some
method of editing files on the MCP server, such as CANDE page mode or the Editor.
You will find WFL easier to learn if you have some programming experience. However,
you can use this manual even if you have never written a program before. If you are new
to programming, you will find the information in Section 18, Debugging WFL Jobs and
Tasks, to be particularly useful.
To learn about the major capabilities of WFL, refer to Section 2, What You Can Do with
WFL.
To learn how to achieve a particular goal or effect, scan through the Table of Contents. The
headings are organized by topic.
To find information about a particular statement when you know the name of the
statement, refer to the Index.
In this book, the term “MCP server” refers to the MCP server component of a ClearPath
MCP system.
Interactive programs
Accept real-time transactions from a user and display the results immediately. Examples
are word processors and programs that query databases.
Batch programs
Run in the background and have little or no interaction with the user. Batch programs
sometimes take a long time to run, or consume a major share of the system processor
time. Consequently, you must manage batch programs carefully to prevent them from
conflicting with each other or slowing down interactive programs.
Work Flow Language (WFL) is designed primarily for managing batch programs. This
section introduces the following topics related to the capabilities of WFL:
• Managing Tasks
• Managing Work Flow
• Managing Files
• Compiling Programs
• Restarting Tasks
• Supporting Capabilities
• Limitations of WFL
Managing Tasks
Programs written in WFL are referred to as WFL jobs. These WFL jobs exist primarily to
execute programs written in other languages. The programs initiated from a WFL job are
referred to as tasks.
Managing Files
WFL file management features include the following:
• CHANGE and REMOVE
Statements that retitle or remove disk files. See Section 6, Managing Files.
• COPY
A statement that copies disk files or backs up disk files to tape. See
Section 7, Copying Files.
• PRINT
A statement that submits files for printing. You can set a number of options to control
the destination and appearance of the printed output. See Section 9, Printing Files.
Compiling Programs
The WFL COMPILE statement enables you to specify each of the following:
• Compiler name
Specifies the compiler to use.
• Program disposition
Saves or executes the compiled program.
• Data specifications
Supply input data for the compiler. For example, can supply options that control the
creation of program listings, cross-reference files, and error files.
• Patches
Specify patch files to be merged with the program source.
• File or task equations
Specify file or task equations for the compilation, for the compiled program, or for
both.
Restarting Tasks
WFL jobs are automatically restarted if they are interrupted by a halt/load. The job typically
skips any tasks that completed before the halt/load, and restarts any tasks that were in
progress at the time of the halt/load. For detailed information, see Section 17, Designing
Jobs for Restarts.
Supporting Capabilities
WFL provides a number of features that play an assisting role for the major features
discussed previously. These features include:
• Flow of control
Statements that perform other statements conditionally, repetitively, or in an unusual
order. You also can use subroutines to store groups of statements for occasional use.
Refer to Section 12, Flow of Control.
Limitations of WFL
WFL is a specialized language that is not intended for writing general-purpose
applications. In particular, WFL cannot
• Read from or write to files .
• Query or update databases.
• Invoke procedures in libraries.
However, within its specialized purpose, WFL is an exceptionally powerful and flexible
language.
CANDE
The following paragraphs explain how to create and submit WFL statements or jobs in
CANDE. For further information, refer to the CANDE Operations Reference Manual.
Submits a COPY statement. COPY is one of a small number of WFL statements that
CANDE recognizes directly, as if they were CANDE commands. The WFL statements that
you can enter directly are ADD, ALTER, COPY, PRINT, START, WRAP, and UNWRAP.
Submits several WFL statements (MODIFY, SECURITY, and COPY). The WFL keyword
introduces a sequence of WFL statements in CANDE. You must use the WFL keyword if
you are submitting more than one statement, or if you are submitting a statement other
than ADD, COPY, PRINT, or START.
Note: Some WFL constructs require you to enter a question mark (?) in column 1. If you
create your WFL job in the Editor, a question mark in column 1 causes the Editor to
interpret your input as a command rather than text. To store question marks in column 1,
you can place an unused character, such as a backslash (\), at the start of lines that need to
begin with a question mark.
Before you save the job, use a REPLACE command to replace all occurrences of your
chosen character with a question mark. For example, to replace all backslashes with
question marks, you can use the following command:
REP ALL .\..?.
In CANDE, you may have a file open for possible editing. This file is referred to as the
workfile. To start the workfile, simply enter START without specifying a file name.
For further information about the START statement, refer to Using START Statement
Options later in this section.
Note: CANDE displays WFL messages if the CANDE session option MSG is set. If you
are not seeing these messages, try entering the command SO MSG. This command
affects only the current CANDE session. To set the MSG option permanently, ask your
system administrator to set the CANDEGETMSG attribute for your usercode.
MARC
The following paragraphs explain how to create and submit WFL statements or jobs in
MARC. For further information, refer to the Menu-Assisted Resource Control (MARC)
Operations Guide.
Submits a COPY statement. COPY is one of a small number of WFL statements that
MARC recognizes directly, as if they were MARC commands. The WFL statements that
you can enter directly are ADD, COPY, and START.
Submits several WFL statements (MODIFY, SECURITY, and COPY). The WFL keyword
introduces a sequence of WFL statements in MARC. You must use the WFL keyword if
you a submitting more than one statement, or if you are submitting a statement other than
ADD, COPY, or START.
For further information about the START statement, refer to Using START Statement
Options later in this section.
The COMND screen, as it appears immediately after you have started a WFL job. To see
the job messages, you must transmit the Task command in the Action field.
If you do not use the Task command, then when the WFL job terminates, the message at
the bottom of the COMND screen typically changes to
No task message received for task.
The TASKSTATUS screen, which displays messages for the job. Following are
explanations of the individual messages:
• 15:08 697\ 758 BOT (ICS)"MARC WFL"
The WFL compiler is compiling the job.
• 15:08 Job 759 has been placed in system queue 2
The job has been compiled, assigned the mix number 759, and assigned to job
queue 2. For information about job queues, refer to Section 11, Managing Work
Flow.
• 15:08 0697\ 758 EOT (ICS) (ICS)MARC WFL
The WFL compiler has terminated.
• 15:08 759\ 759 BOJ DBDATA/JOB
BOJ stands for “Beginning of Job.” The WFL job has been selected from the job
queue and is executing.
• 15:08 759\ 760 BOT (ICS)OBJECT/DBDATA ON DEV
BOT stands for “Beginning of Task.” The WFL job has initiated the task
(ICS)OBJECT/DBDATA ON DEV. The task is running with mix number 760.
• 15:08 0759\ 760 EOT (ICS) (ICS)OBJECT/DBDATA ON DEV
EOT stands for “End of Task,” and indicates a normal termination of task
(ICS)OBJECT/DBDATA ON DEV. Note that the (ICS) usercode appears twice. The
first usercode shown is the usercode attribute of the task. The second usercode
shown is the usercode of the object code file.
• 15:08 0759\ 759 EOJ (ICS) JOB DBDATA/JOB
EOJ stands for “End of Job,” and indicates a normal termination of the WFL job.
ODT
The following topics explain how to create and submit WFL statements or jobs at an ODT.
For further information about operating the system at an ODT, refer to the following
documents:
• System Operations Guide
• System Commands Reference
Submits a COPY statement. COPY is one of a number of WFL statements that an ODT
recognizes directly, as if they were system commands. The WFL statements that you can
enter directly include ADD, COPY, and REMOVE, among others.
If you’re not sure whether a given statement requires the BEGIN JOB prefix, simply
include the prefix anyway. The prefix never causes a problem.
Submits several WFL statements. The phrase BEGIN JOB; indicates that the input is WFL
statements rather than system commands.
Alternatively, you can begin the job with the letters CC or a question mark (?) rather than
BEGIN JOB.
For further information about the START statement, refer to Using START Statement
Options later in this section.
In this example, the job DBDATA/JOB has become suspended, and therefore appears in
the Waiting Entries display.
Job Name
If the WFL job is compiled successfully, you will see no immediate indication of the mix
number for the job. Therefore, you must use the job name to locate the job in the ADM
display. Remember, however, that the job name can be different than the file title of the
job. The job name is specified within the job itself, immediately after the BEGIN JOB
phrase. Refer to Specifying a Job Name in Section 4, Job Structure.
If the WFL job does not include a job name, or you submitted WFL statements rather than
a job, then look for entries named JOB ″BEGIN JOB; <text>″, where <text> consists of
the first few characters of the WFL statements.
You can track the progress of your job by using various portions of an ODT display as
follows:
To . . . Do this:
Determine whether there were syntax errors If there were syntax errors, a message
in your WFL statements. displays that includes details of the first syntax
error; for example:
03373 Control card error
00000300 I := J;
*
UNDECLARED IDENTIFIER
Additionally, the job appears in the Completed
Entries display with the word SNTX in the Hist
column. The system also produces a job
summary printout.
If there were no syntax errors, the job appears
in one of the other parts of an ODT display,
such as Active Entries, Waiting Entries, or
Scheduled Entries.
Determine whether the job is in a job queue From the home position, enter the command
SQ to display the contents of all job queues, or
SQ <number> to display the contents of a
single job queue.
Determine the current mix number of the WFL Examine the Active Entries display for entries
job. with the job name. Make a note of the number
displayed in the Mix column of the same line.
Determine whether the job has displayed Examine the Messages display for entries
messages. with the mix number of your WFL job. The text
of the message appears in the Display column.
Determine whether job initiation has been Examine the Scheduled Entries display for an
delayed by the system entry with the name and mix number of your
WFL job.
To . . . Do this:
Determine whether the job is suspended Examine the Waiting Entries display for an
entry with the name and mix number of your
WFL job.
Determine whether the job is completed Examine the Completed Entries display for
entries with the name and mix number of your
WFL job. If such an entry is present, the job
has completed.
Operations Center
If you are using a workstation on a ClearPath MCP Server, you might have access to the
Operations Center utility. This utility provides a graphical interface to system operations. If
Operations Center is available on your workstation, then the Operations Center utility
appears in the Unisys MCP program folder.
For detailed information about Operations Center, refer to the Operations Center Help.
The START command causes the system to compile the job and display syntax errors, if
any. If there are no errors, the system typically places the job in a job queue. Job queues
are discussed in Section 11, Managing Work Flow. When the job reaches the front of the
job queue, the system selects the job and executes it.
The following pages discuss START statement options that enable you to
• Start a job immediately.
• Start a job with parameters.
• Start a job with optional parameters.
• Start a job for syntax checking only.
• Start a job at a specific time.
• Start a job from another WFL job.
• Start another copy of the same WFL job.
Passes several types of parameters to a job. A parameter is a piece of information that the
job can read into a variable. The value of a parameter can change the way the job runs. For
more information about job parameters, refer to Section 14, Communicating with the
Operator.
You can include one or more spaces between each parameter. However, these spaces are
not required.
Passes only the fourth parameter to a job that accepts four optional parameters. In this
example, the fourth parameter is a string parameter. The three commas indicate that the
first three parameters are omitted.
Passes only the parameter named RMODE to a job that accepts optional parameters. The
RMODE := phrase indicates which one of the optional parameters should receive the
specified value.
For more information about optional job parameters, refer to Section 13, Working with
Data.
Compiles the job ADREP/UCOM and displays messages indicating if there are any syntax
errors. However, the SYNTAX option keeps the job from actually being executed, even if it
compiles without error.
If you use the SYNTAX option, you do not need to include any job parameters, even if the
job would normally require them.
Compiles a job and places the job in a job queue. The system does not select the job from
the job queue for execution until at least 5:00 PM.
For further examples using the STARTTIME option, refer to Selecting a Start Time in
Section 11, Managing Work Flow.
Runs a program and then uses a START statement to initiate another WFL job.
The START statement in a WFL job can also include the various options that have been
described previously, such as the SYNTAX option, STARTTIME option, and job parameters.
The START AND WAIT statement initiates a second job as a dependent task within a WFL
job and waits for the dependent task to complete.
The basic structure of WFL jobs is both simple and flexible. This section introduces the
basic elements of WFL jobs, including
• Overall structure
• Job titles
• Formatting and casing
• Comments
• Statements included from another file
Overall Structure
BEGIN JOB;
<statements>;
END OF JOB
WFL jobs begin with the phrase BEGIN JOB and end with the phrase END JOB. In
between, you can include as many statements as you want.
It is a good idea to include a job name after the BEGIN JOB phrase. The job name that you
choose will appear in system messages and log entries relating to the job. It is helpful to
make the job name the same as the name of the file that stores the job. That way,
someone who sees messages or log entries relating to the job will find it easier to locate
the file containing the job.
Running a Task
BEGIN JOB RUNHEADERS;
RUN OBJECT/UTIL/NOTEHEADERS;
END JOB
This job runs a program called OBJECT/UTIL/NOTEHEADERS. For more information about
running tasks, refer to Section 5, Running Tasks.
Compiling a Program
BEGIN JOB COMPILEPROG;
COMPILE (JONES)OBJECT/GEN/REPORT WITH ALGOL LIBRARY;
COMPILER FILE CARD(TITLE=(JONES)GEN/REPORT ON MYPACK);
END JOB
This job compiles an ALGOL program from the source file (JONES)GEN/REPORT ON
MYPACK. The compilation creates an object code file called
(JONES)OBJECT/GEN/REPORT.
This job includes a single statement that extends over two lines. The line beginning
COMPILER FILE CARD is considered to be part of the COMPILE statement.
For more information about compiling programs, refer to Section 10, Compiling Programs.
Copying Files
BEGIN JOB COPYFEB;
COPY DATA/FEB AS ARCHIVE/DATA/FEB
FROM RFPACK(PACK) TO RECON(PACK);
END JOB
This job copies the file DATA/FEB from the disk family RFPACK to the disk family RECON.
The copy is created with the name ARCHIVE/DATA/FEB. For more information about
copying files, refer to Section 7, Copying Files.
This example combines three statements from the previous jobs into a single job.
General Rules
Format your job according to the following rules:
• WFL input is not case-sensitive; keywords and variables can be in uppercase,
lowercase, or mixed case. However, if the security option CASESENSITIVEPW option
is set, unquoted passwords are case-sensitive.
• Each statement must end with a semicolon (;). A question mark (?) in column one is
treated as a semicolon. However, semicolons can also occur in the middle of some
statements.
These are statements that include task or file equations. The main part of the statement
ends with a semicolon, and each task or file equation also ends with a semicolon. An
example of such a statement is given under Compiling a Program earlier in this section.
• Most statements can start in any column.
• The number of blank spaces between words can vary.
• A single statement can continue across multiple lines. Multiple statements can
appear on a single line, as long as they are separated by semicolons.
• Indenting can make the structure of the job more obvious to anyone who is reading
the job.
Formatting Example
BEGIN JOB DAILYTOTALS;
COPY DAILY/TOTALS FROM DBCOM(PACK) TO ARCH(PACK);
IF TIMEDATE(DAY) = "SUNDAY" THEN
BEGIN
RUN OBJECT/WEEKTOTALS;
RUN OBJECT/RELAY;
END;
END JOB
In this job, the COPY statement and the IF statement are indented the same amount,
because both statements are on the same level and are executed one after the other.
However, the BEGIN . . . END pair is indented to emphasize that it is part of the IF
statement. The RUN statements are indented to emphasize that they are grouped within
the BEGIN . . . END pair.
This use of indentation makes the overall structure of the job statement easier to read. For
more information about the IF statement and similar statements, refer to Section 12, Flow
of Control.
Adding Comments
% Job: DAILYTOTALS
% Author: Jennifer Chang, extension 6574
% This Version: June 3, 2001
% The DAILYTOTALS job runs payroll tasks for the
% Accounting department.
BEGIN JOB DAILYTOTALS;
IF TIMEDATE(DAY) = "SUNDAY" THEN
RUN OBJECT/WEEKTOTALS;
ELSE
BEGIN
RUN OBJECT/DAILYTOTALS;
RUN OBJECT/RELAY; % Forwards data to site SFCP1
END;
END JOB
Comments are not executed, nor are they displayed to the user. They are only visible to
someone who is reading the source file for your job. Comments help other programmers
to understand how to update or improve your job. Comments also remind you why you
designed the job in a certain way.
The percent sign (%) indicates the start of a comment. A comment can appear on a line by
itself, or it can appear after a WFL statement. Comments can include both uppercase and
lowercase letters, numbers, spaces, and punctuation marks.
The $INCLUDE option is especially convenient for cases where you want the same
statements to appear in multiple WFL jobs. You can write the shared statements in one
file and use $INCLUDE option in each WFL job that uses those shared statements. Then,
if you need to make changes to the shared statements, you only have to make the
changes in one place.
Note: Unlike most WFL statements, the $INCLUDE option cannot be indented. The
dollar sign ($) must occur in column one or two.
Includes the file (OPS)WFL/ROUTINES ON DEV near the beginning of a job. In this case,
the included file contains a collection of useful subroutines, including one called UPCASE.
Note that the inserted text occurs in the middle of a parameter to the RUN statement. In
this example, the file (OPS)BACKUP/TAPENUMBERS must contain text that can form a
valid part of a parameter to the program being run.
Other Structures
WFL jobs can include a number of other optional structures. These are described later in
the book in the following places:
This section explains the following topics related to initiating and controlling tasks:
• What is a task?
• Using the RUN statement
• Preventing accidental task restarts
• Controlling file usage
• Using task equations
• Using task variables
• Handling task terminations
• Running tasks in parallel
• Passing parameters to a task
What Is a Task?
When you run a program from WFL, the system creates something called a task. A task is
a single copy of a program that is executing in system memory. If you run the same
program several times, you create a new task each time.
For a more detailed explanation of tasking concepts, refer to the Task Management
Programming Guide.
• The RUN statement must specify the name of the object code file for a program. The
object code file is the compiled version of the program. By contrast, the source code
file stores the program as it was originally written by the programmer. Object code
files often have titles beginning with OBJECT or SYSTEM. (For information about
compiling programs, refer to Section 10, Compiling Programs.)
Runs the program OBJECT/PAYROLL no more than once. If the system restarts the job
after a halt/load, the ON RESTART statement invokes an ABORT statement to terminate
the job.
Rules
The ON RESTART statement is related to the automatic restart feature of WFL jobs. The
system automatically restarts any WFL job that is interrupted by a halt/load. This automatic
restart feature is helpful, provided that your job and its tasks are designed with possible
restarts in mind. For information about how to design a job for restarts, refer to
Section 17, Designing Jobs for Restarts.
At this point, all you need to know is that automatic restarts can occur if you do not take
steps to prevent them. For example, suppose that your WFL job runs a task that prints
paychecks. If a halt/load occurs while the task is running, then after the halt/load, the job is
restarted and runs the task again. The result could be that some paychecks are printed
twice.
If your WFL job runs tasks that should not be restarted, you can use an ON RESTART
statement such as the one in the preceding example. The ON RESTART statement
specifies actions to be taken if the job is restarted after a halt/load.
Runs a program, and uses file equations for two files used by the program.
FILE
Internal names of files used by the program. These names vary from one program to
another.
Note: To find out the internal names of files for a program, you must examine
documentation for the program, talk to the person who created the program, or examine
the source file for the program.
The internal name is usually the same as the identifier specified in the file declaration. For
example, suppose a file is declared in the source file as FILE ABFAB (KIND=DISK,
TITLE=”DATA/INPUT/CFORM ON UFAM”). In this example, the internal name is ABFAB.
If the INTNAME attribute is specified, it overrides this default and specifies a different
internal name. The INTNAME is the first 17 characters of the filename specified in the
program. The first 17 characters should be unique.
KIND
A file attribute that specifies the type of medium on which the file resides. Possible values
include DISK, TAPE, CD, PRINTER, and REMOTE, among others. By assigning a KIND
value, you can do things such as making a program write to disk instead of tape.
TITLE
A file attribute that specifies the title of the file. Note that the TITLE assignment for FILE
RELCON includes an ON <family> part. This ON <family> part has the side effect of
changing the KIND attribute to DISK.
Rules
File equations immediately follow the RUN statement for the program. Preceding file
equations do not affect the program. File equations for subsequent programs also do not
affect the program.
You can specify as many file attributes as you like for each file. For a complete description
of all the file attributes that are available, refer to the File Attributes Programming
Reference Manual.
Runs a program and provides input data for that program. When the program opens any
card reader file and reads from it, the READ statements will actually read data from the
data specification.
DATA
The program (REC)OBJECT/DKPROC is designed to read input from a disk file with the
internal name CONTROL. The file equation changes the KIND value of the CONTROL file
to READER, which indicates a card reader file. Because the KIND value is now READER,
the program automatically reads from the data specification following the RUN statement.
Note: Some programs might fail or run abnormally if you equate a file to READER. For
example, because READER files are read-only, an error occurs if the program attempts to
write to the file.
Supplies data specifications for two different input files. In this example, each data
specification is named to specify the corresponding input file.
The names are optional. Whenever the program tries to open a card reader file, the
system opens the first unread data specification with the correct name or no name. By
using names, you make your WFL job clearer and more reliable. It is especially important
to name the data specifications if you do not know which file the program opens first.
For Compilations
Data specifications are often used to supply options for compilations. For examples of this
usage, refer to Section 10, Compiling Programs.
A remote file is a file that a program uses to read or display information at a terminal.
Usually, the program opens the remote file at the terminal where the program was
initiated. Some programs that open remote files were originally designed to be run from
MARC or CANDE. These programs depend on certain defaults that are supplied by MARC
and CANDE. If such programs are initiated from a WFL job, they might fail with the error
UNKNOWN FILE/STATION
Example
BEGIN JOB;
% <Declarations, if any>
MYJOB(STATIONNAME = #MYJOB(SOURCENAME));
RUN OBJECT/P;
END JOB
Runs OBJECT/P in such a way that OBJECT/P will be able to open remote files.
Rules
The STATIONNAME assignment must come after any declarations in the WFL job, but
typically should come before any statements in the job. (A declaration defines a variable,
file, or subroutine.) For more information about declarations, refer to Section 13, Working
with Data.
When you initiate a task, you can append task equations to the RUN statement. These
task equations assign values to task attributes. The following topics describe some
common types of task equations.
You must include a usercode and a password in the assignment. In this example, GARETH
is the usercode and ONEFARM is the password.
If you do not assign a usercode to a task, the task inherits the usercode of the WFL job.
The usercode of a task can affect the task in a number of ways, including task privileges,
file usercodes, and file families.
If the task creates a new disk file without specifying the file usercode, the system creates
the file with the same usercode as the task.
The priority of a task affects how quickly the task executes. The possible PRIORITY values
range from 0 to 99, with 50 as the default. A high priority tends to make the task run
faster, but can have the side effect of slowing down other tasks on the system.
The family statement helps determine the disk families that a task uses for disk files. The
family statement has one of the two forms shown above.
The effect of a family statement is to cause the primary family to be used whenever the
target family would have otherwise have been used. If the file cannot be found on the
primary family, then in some cases the system uses the alternate family instead.
The following are the effects of this family statement on various actions performed by
OBJECT/DBDATA:
The following are the effects of this family statement on various actions performed by
OBJECT/DBDATA. Differences from the preceding table are bolded.
The following are the effects of this family statement on various actions performed by
OBJECT/DBDATA. Differences from the preceding table are bolded.
Reads the value of several task attributes after a task completes. You simply assign the
task attribute to a variable of the correct type. To determine the data type of a particular
task attribute, refer to the Task Attributes Programming Reference Manual.
The FAMILY task attribute returns a string with a fairly complex form. For information
about extracting information from this string, refer to “Parsing a FAMILY Task Attribute” in
Section 13, Working with Data.
This job declares task variable T and assigns it to each of two different tasks. This
technique might seem convenient at first. For example, the FILE CARD equation in the
task declaration affects both tasks. Thus, by reusing the task variable, you save having to
retype the FILE CARD equation.
However, the FILE LINE equation in the first RUN statement gets saved as part of T.
Because the second RUN statement reuses T, the FILE LINE equation also gets applied to
the second task. This is one example of the type of unexpected side effects that result
from reusing task variables.
This job uses the INITIALIZE statement to prevent side effects. This statement restores all
the attributes of a task variable to their defaults.
Using MYJOB
BEGIN JOB;
IF MYJOB(USERCODE) NEQ "OPSECT" THEN
STOP "MUST BE RUN UNDER OPSECT USERCODE";
RUN OBJECT/P;
END JOB
Reads the usercode of the job and stops the job if it was not initiated under the correct
usercode.
Rules
MYJOB is a task variable with a predefined meaning. MYJOB always refers to the task
attributes of the WFL job.
ISNT COMPLETEDOK
The following is an example of the task state expression, which has one of the following
forms:
<task variable> IS <task state>
One or more of the following task states are true after a task terminates:
• ABORTED
The task faulted or was discontinued.
• COMPLETEDOK
The task completed without faulting or being discontinued.
• COMPILEDOK
(Applies only to compilations.) The compiler finished normally and did not find any
syntax errors. If a compilation is COMPLETEDOK but is not COMPILEDOK, then the
compiler finished normally but found syntax errors.
• ACCEPT
Suspends the job. The job appears in the W (Waiting Entries) display with the
message PA failed. Notify PA administrator. The job remains there until an operator
enters a command of the form <mix number> AX.
Runs three tasks. Aborts the job immediately if any task in the series fails.
Terminates the job. The system displays the string value and then displays a PDS
message. Both the string value and the PDS message are also written to the system log.
An alternative to the ABORT statement is the STOP statement. Refer to Section 12, Flow
of Control.
DO . . . UNTIL
The DO statement is a type of loop. That is, the DO statement repeats an action until a
given condition is true. For more information about the DO statement, refer to
Section 12, Flow of Control.
Caution
Retrying a task might not always be desirable, for the following reasons:
• If the task failed because of an internal fault, the task might continue
to fail each time it is run.
• If the task was discontinued by an operator, the operator might have some
reason for not wanting the task to be restarted.
• If the task is not designed with retries in mind, it might corrupt data when
it is run again. For example, a program that makes deposits to accounts
might deposit the same money to the same account a second time.
TASK T;
BOOLEAN DONE;
STRING RESPONSE;
DONE := FALSE;
DO % Until DONE
BEGIN
INITIALIZE (T);
RUN OBJECT/PR [T];
IF T IS COMPLETEDOK THEN
DONE := TRUE;
ELSE
BEGIN
RESPONSE := ACCEPT
("PR task failed. Enter R for retry, Q to quit");
IF RESPONSE NEQ "R" AND RESPONSE NEQ "r" THEN
DONE := TRUE;
END;
END
UNTIL DONE;
END JOB
Runs the task OBJECT/PR. If the task fails, asks the operator whether to retry the task.
DO . . . UNTIL DONE
Repeats the enclosed set of statements until the variable DONE is TRUE.
IF T IS COMPLETEDOK THEN . . .
RESPONSE := ACCEPT . . .
Suspends the job. The job appears in the Waiting Entries display with the message
ACCEPT: PR task failed. Enter R for retry, Q to quit. To retry the task, the operator responds
with the command:
<mix number> AX R
To quit retrying the task, the operator responds with the command:
<mix number> AX Q
Allows for the possibility that the operator might enter the R in uppercase or lowercase. If
the operator enters anything except R or r, the job quits retrying the task.
END;
END
UNTIL VALIDINPUT;
END;
END
UNTIL GOODRUN OR QUIT;
END RUNPROG;
% Start Main Portion of Job
RUNPROG("OBJECT/PR", GOODRUNACTUAL);
IF NOT GOODRUNACTUAL THEN
BEGIN
RUNPROG("OBJECT/PR/RECOVER", GOODRUNACTUAL);
IF NOT GOODRUNACTUAL THEN
ABORT ("Job aborted because PR/RECOVER failed");
END;
RUNPROG("OBJECT/PR/SUMMARY", GOODRUNACTUAL);
END JOB
This example is fairly advanced. You might understand it more easily after reading
Section 12, Flow of Control.
SUBROUTINE RUNPROG;
Runs a task and retries the task if necessary. Although the subroutine is declared near the
start of the job, the subroutine is not actually executed until it is invoked by the RUNPROG
statements later on.
A comment indicating the location where execution actually begins: after all the
declarations. The preceding subroutine is considered a type of declaration.
Repeats the RUN statement until the task is COMPLETEDOK or the operator enters a
<mix number> AX Q system command. GOODRUN OR QUIT is a Boolean expression. For
more information about Boolean expressions, refer to Section 13, Working with Data.
DO . . . UNTIL VALIDINPUT;
Repeats the prompts for operator input until the operator enters a correct response.
CASE ACCEPT . . .
Examines the operator input and determines whether the operator input is good.
RUNPROG(″OBJECT/PR″, GOODRUNACTUAL);
Invokes the subroutine RUNPROG. The subroutine runs the program OBJECT/PR and
updates the value of GOODRUNACTUAL to indicate whether the program completed
normally.
Takes special actions if the previous task never completed successfully. NOT
GOODRUNACTUAL is a Boolean expression that evaluates to TRUE if
GOODRUNACTUAL is FALSE.
The following figure shows the flow of control for a job that runs two tasks at the same
time. The job uses a PROCESS RUN statement to initiate each task. The job and the tasks
run in parallel; that is, all can do work at the same time.
Tasks that run in parallel with the job are also known as asynchronous tasks.
Initiates the program OBJECT/INITIAL and a copy task. The job then executes the
REMOVE statement while the two tasks are still running.
The system automatically prevents any WFL job from terminating while tasks of the job
are still running. Thus, the preceding job does not terminate until OBJECT/INITIAL and
OBJECT/REPROC have both completed.
PROCRUN;
COPY FINANCE/OUTPUT/= FROM ACCTS(PACK) TO HIST(PACK);
END JOB
The system automatically prevents any WFL subroutine from exiting while tasks of that
subroutine are still running. Thus, in the preceding job, subroutine PROCRUN does not
terminate until OBJECT/INITIAL and OBJECT/REPROC have both completed. Because
the COPY follows the subroutine invocation, the COPY statement is not executed until
OBJECT/INITIAL and OBJECT/REPROC have completed.
The WAIT statements in this job ensure that the COPY statement is not executed until
OBJECT/INITIAL and OBJECT/REPROC are both finished.
END JOB
This job runs two tasks in parallel and monitors the tasks to see if they become
suspended. A suspended task is one that cannot progress, usually because some needed
resource such as a file is missing. A operator can often use system commands to resume
a suspended task. However, this particular job does not give the operator any chance to
resume the task. Instead, the job terminates both tasks and restarts itself an hour later.
Repeats the statements between BEGIN and END until both tasks have completed. This
statement uses a Boolean expression, as discussed under “Checking the State of a Task”
in Section 13, Working with Data.
WAIT;
Causes the job to wait until there is a change in the status of any of its tasks.
Note: This WAIT statement is important. Without this statement, the DO loop would
repeat rapidly and could use up all the system processor time.
Detects if either of the tasks have become suspended. This statement uses a Boolean
expression.
Terminates the tasks; that is, stops execution of the tasks and removes them from
memory.
Initiates a task in parallel and waits for each of three task attributes to achieve certain
values.
Notice that the syntax used to wait for each of the task attributes is slightly different. The
differences arise because SW1 is a Boolean attribute, TASKVALUE is a real attribute, and
STATUS is a mnemonic attribute.
The job automatically resumes execution if the task terminates, even if the task attributes
still do not have the requested values.
Passes four parameters to the program OBJECT/REORD. Parameters are values that
change the way a program runs. You can pass parameters only to programs that are
designed to receive them. The parameters that you pass must match the number, type,
and order of the parameters in the program.
In addition to passing parameters, WFL jobs can receive parameters from START
statements. Refer to “Job Parameters: Making Your Job Flexible” in Section 13, Working
with Data.
For further information about parameter type matching, refer to the Task Management
Programming Guide.
Pass parameters by reference if you expect the task to make changes to the values of its
parameters, and you want these changes to be visible to the WFL job. If you do not pass
the parameters by reference, then the parameters in the WFL job retain their original
values, even if the task assigns different values to the parameters internally.
Example
BEGIN JOB RUNPB;
BOOLEAN ERR := FALSE;
INTEGER COUNTER := 10;
REAL FRAC := 0.5;
STRING TXT := "MONTHLY";
END JOB
Uses the REFERENCE keyword to pass parameters by reference, and then checks the
values of the parameters after the task has completed.
Incorrect Example
RUN OBJECT/REORD(16.3 REFERENCE, 4 REFERENCE, TRUE REFERENCE,
"MONTHLY" REFERENCE);
When you pass a parameter by reference, you must pass a variable to that parameter. The
parameters in the preceding example are incorrect because they attempt to pass literal
values by reference. That is, the parameters in the example are values like 16.3, 4, and
TRUE, rather than names of variables that store those values.
Permanent Directories
The ClearPath MCP systems support permanent directories. Comment to subsequent
writers: the A Series operating system is considered to be a subset of the ClearPath MCP
operating system. The subset does not support permanent directories.
Except in the permanent directory namespace, MCP servers do not use permanent
directories of the type you find on Windows or UNIX systems. In this manual, the term
directory is simply shorthand for a collection of files whose titles begin with one or more
of the same elements. Thus, the CHANGE statement, which is discussed later in this
section, renames files whose titles begin with (OPS)RESULTS. There is no need to
separately rename the directory itself.
Changes the file with the name AUDIT/DB to the name AUDIT/DAILY.
Caution
If a file already exists with the new file name, the system deletes the existing
file before making the change. The system does not request any confirmation
before making the deletion. This caution does not apply when you rename an
entire directory. In that case, the system preserves existing files, as discussed
in the following subsection.
Renaming a Directory
CHANGE (OPS)RESULTS/= TO (OPS)SAVE/=;
Changes all the files in the directory RESULTS/= to the directory SAVE/=.
Rules
If the new directory name already exists, the files are added to that directory. Any files that
already belonged to the new directory remain unchanged.
When you rename a directory of files, the system avoids overwriting any existing file. The
system renames as many of the files as it can without creating conflicts, and leaves the
other file names unchanged.
Example of Effects
The following table shows the effects of this statement on a set of files. The Before
column lists the names of the files before the CHANGE statement is executed. The After
column lists the names of the files after the CHANGE statement is executed.
Before After
RESULTS/DEVCON SAVE/DEVCON
SAVE/INPUT SAVE/INPUT
SAVE/QDATA SAVE/QDATA
Rules
The ON <family> part, if it is included, must follow the old file name rather than the new
file name.
Rules
Family substitutions can affect CHANGE statements, but only the primary family is used.
In the preceding example, ACCT is the primary family in the family substitution. For a more
detailed description of family substitution, refer to Equating the Family Statement in
Section 5, Running Tasks.
Changes the name of a directory and also changes the name of a particular file. These two
requests are not related. For example, REPORTS/INPUT is not assumed to be part of the
directory TRACKER/=.
Rule
A single CHANGE statement can rename multiple directories, multiple files, or both. The
requests must be separated by commas.
These two statements are equivalent. Each renames a file and a directory on family
USERC. The first statement explicitly specifies ON USERC for each request. The second
statement includes a FROM USERC clause that applies to both requests.
Rules
The FROM clause specifies the family name for one or more preceding change requests.
Renames files and directories on two different families. The FROM USERC clause applies
to PRELIM/OUT and DB/=. The FROM ACCTPK clause applies to REMINDER/INPUT.
Rules
When there are multiple FROM clauses, each change request is affected by the first
FROM clause that follows the request.
Copies a disk file from one family to another, and then removes the original file.
Rules
The CHANGE statement cannot change the family name, as this change would require
physically moving the file to a different family. You can use the MOVE statement to
accomplish this purpose.
Specifies two CHANGE statements that are similar, except that one uses string
expressions to specify portions of file names and a family name.
For more information about using expressions in file titles, refer to Building File Titles in
Section 13, Working with Data.
Removing a Directory
REMOVE INVENTORY/= ON ARCH;
Removes the file DAILY/REPORT ON ACCT. The system does not search DEVPK, even if
the file is not present on ACCT. /=.
Rules
Family substitutions can affect REMOVE statements, but only the primary family is used.
In the preceding example, ACCT is the primary family in the family substitution. For a more
detailed description of family substitution, refer to Equating the Family Statement in
Section 5, Running Tasks.
Rules
A single REMOVE statement can remove multiple directories, multiple files, or both. The
requests must be separated by commas.
Removes files and directories on several different families. The FROM ARCH clause
applies to ORDERS. The FROM USERPK clause applies to PRELIM/OUT and DB/=. The
ON ACCTPK clause applies to DEBIT/COUNTER.
Rules
• The ON clause and the FROM clause each specify the family where files are located.
However, the ON clause affects only the immediately preceding file or directory. The
FROM clause can affect multiple files and directories.
• When there are multiple FROM clauses, each file is affected by the first FROM clause
that follows the request.
• If there is an ON clause, it must occur later in the REMOVE statement than any FROM
clauses. Otherwise, you receive the syntax error
'FROM' NOT ALLOWED BECAUSE 'ON' WAS SPECIFIED
Removes the file (SUSAN)OPTIONS ON ARCH. For more information about using
expressions in file titles, refer to Building File Titles in Section 13, Working with Data.
Runs the program OBJECT/REPORTGEN if the file CUST/INFO is present on SERV family.
A related expression is FILE <file title> ISNT RESIDENT . This expression returns
TRUE if the file is not present.
Has the same effect as the previous example. However, the statement uses the form
<file variable> IS RESIDENT
instead of
FILE <file variable> IS RESIDENT
Runs the program OBJECT/REPORTGEN if the file CUST/INFO is present on SERV family
at the host MADRID.
HOSTNAME = MADRID
F(AVAILABLE) = 1
Checks whether the file is present. You must use the AVAILABLE attribute because the IS
RESIDENT form is not supported for remote hosts.
Declares and opens a file, then reads the values of the following file attributes:
• FILE F . . .
Declares a file variable F.
• NEWFILE = FALSE
Specifies that the file already exists; it is not being created by this job.
• DEPENDENTSPECS = TRUE
Copies all the file attributes of file variable F from the physical file that is being opened.
• OPEN (F)
Attempts to open the file. If the file is not available, the job is suspended. The job
appears in the waiting entries display with a NO FILE condition. The job resumes
execution when the file becomes available.
• IF F IS RESIDENT THEN . . .
Checks to see whether the file is available for opening. By preceding the OPEN
statement with this check, we make it unlikely that the job will be suspended during
the file open.
• LOCKEDVAL := F(LOCKEDFILE) . . .
This and the following statements read the values of various file attributes. You simply
assign the file attribute to a variable of the correct type. To determine the data type of a
particular file attribute, refer to the File Attributes Programming Reference Manual.
The job can make decisions based on file attribute values. First, you must check the value
with a Boolean expression, as described under Checking File Attribute Values in
Section 13, Working with Data.
The TITLE file attribute returns a string with a fairly complex form, such as:
(ACCT)CUST/ARCHIVE ON SERV
If you are interested only in certain parts of the title, you can use different file attributes.
Thus, the FILENAME attribute returns only the following portion of the title:
(ACCT)CUST/ARCHIVE
Alternatively, you can parse a TITLE value into pieces, as described under “Parsing a File
Title” in Section 13, Working with Data.
In general, you should store the COPY statement in a formal WFL job if the statement is
complex or if you plan on using it repeatedly. Otherwise, it is easier to simply type the
COPY statement as a command.
Note: If a file with the requested name already exists at the destination, the COPY
statement overwrites that file. If you want to prevent this overwriting, use the ADD
statement as described under “Preserving Existing Files at the Destination” later in this
section.
Copies the files OBJECT/PAYROLL/REPORT and DATA/INPUT from one disk family to
another.
Copying Directories
COPY DATA/= FROM DBFAM(PACK) TO SERV(PACK
Copies all the files in the directory DATA/= from one disk family to another. Does not copy
the file DATA itself (if there is one).
For information about copying all files under a directory between a local and remote host,
refer to Copying a Directory of Files to or from a Remote Host later in this section.
Copies all the files under the usercode of the WFL job from DBFAM family to SERV family.
WFL jobs typically run under the usercode of the MARC or CANDE session where you
started the job.
Note: If you start a job from an ODT, the WFL job typically runs without a usercode. For
such a job, COPY = copies all files on the family, including both usercoded and
nonusercoded files.
Copies all the files under the usercode SMITHJA from DBFAM family to SERV family.
Rule
If the usercode being copied from is different from the usercode of the job, then the job
must have special privileges. Refer to COPY or ADD in Section 15, Security.
Copies all the usercoded files from ACCT family to ARCH family. That is, this statement
copies all files except for nonusercoded (*) files.
Rule
This action requires the privileges discussed under COPY or ADD in Section 15, Security.
Copies two directories of nonusercoded files from ACCT family to ARCH family.
Rule
Copying directories of nonusercoded files requires the privileges discussed under COPY
or ADD in Section 15, Security.
Note: This example copies only selected directories. There is no COPY option for
copying all the nonusercoded files on a family. The *= form copies both usercoded and
nonusercoded files, as discussed later under “Copying All Files on a Family.”
Copies all the files on DBFAM family to SERV family. The files copied include files under all
usercodes as well as all nonusercoded files.
Rule
This action requires the privileges discussed under COPY or ADD in Section 15, Security.
Copies the single file DATA/INPUT and renames the file to DATA/OLD at the destination.
Copies all the files in the directory DATA/= ON DBFAM to the directory SAVE/= ON SERV.
Copies the files in the directory DATA/= to the directory REUSE/ORDER/= under usercode
JASMITH.
Rule
To copy files to a usercode different from that of the job, the job must have the privileges
discussed under COPY or ADD in Section 15, Security.
Copies files from two different disk families to a single destination family. Notice the
overall pattern of elements is FROM, FROM TO.
• MAILING/LIST and MAILING/NEWDATA/= are both copied from DEVPK family to
SYSPK family.
• CUST/DATA is copied from SERV family to SYSPK family.
Copies files from a single disk family to two different destination families. Notice the
overall pattern of elements is FROM TO, TO.
• MAILING/LIST is copied from DEVPK family to SERV family and SYSPK family.
• MAILING/NEWDATA/= is copied from DEVPK family to SERV family and SYSPK
family.
Copies files from two different families to two other families. Notice the overall pattern of
elements is FROM, FROM TO, TO.
• DB/INPUT is copied from SERV family to ARCH family and SYSPK family.
• TRANS/CODES is copied from ACCT family to ARCH family and SYSPK family.
Copies two different files between separate sources and destinations. Notice the overall
pattern of elements is FROM TO, FROM TO.
• DB/INPUT is copied from SERV family to ACCT family.
• TRANS/CODES is copied from ARCH family to SYSPK family.
Rule
Use a number sign (#) prefix before any string expressions that you use in a COPY
statement. You can use string expressions to replace family names and all or any part of a
file name. For more information about using string expressions in file titles, refer to
Building File Titles in Section 13, Working with Data.
Usercode Defaults
If you do not specify the usercode for the source or destination file, the system supplies
defaults as discussed in the following text.
The system searches for the source file first under the usercode of the WFL job, and
secondly as an unusercoded (*) file.
The system creates the destination file under the same usercode as the source file
(DAVIS).
The system creates the destination file under the usercode of the WFL job (not the
usercode of the source file).
KIND Defaults
The KIND attribute specifies whether the file resides on a DISK, PACK, CDROM, or
TAPE. The values DISK and PACK are synonymous.
Note: While DISK and PACK are values for the KIND attribute, they also can be the
names of particular disk families. Most systems have a family named DISK. When DISK or
PACK is used as a KIND value, the value appears in parentheses. Thus, REFAB(PACK)
refers to a disk family named REFAB. However, DISK(PACK) refers to the disk family
named DISK.
If a COPY statement omits a KIND value, the system uses the following rules to determine
the default value:
These two statements are equivalent. The first statement omits the KIND attribute for the
destination volume. Because the volume is named RAD, but no KIND is specified, the
system assumes that RAD is a volume of KIND = TAPE.
These two statements are equivalent. The first statement omits the destination volume.
The system therefore assumes that the volume is named DISK and is a disk family.
These statements show two different ways of specifying the KIND attribute.
FAMILY Defaults
COPY DATA/INPUT TO RAD(TAPE);
Does not specify the source volume. Therefore, the source volume defaults to DISK.
Suppose the current FAMILY value is DISK = UKFAM OTHERWISE REPRO. The effect of
the FAMILY statement is to make the system search for the source file on UKFAM family
instead of on DISK.
Note, however, that the OTHERWISE part of the FAMILY statement is not used for copy
requests. Thus, in this example, the system does not search for the file on REPRO family,
even if the file is not present on UKFAM.
Copies all the files in DOC/UPDATES/= that do not yet exist at the destination.
The ADD statement is equivalent to the COPY statement, with one exception: the ADD
statement will not overwrite any existing files at a disk destination.
Suppose also that the following files already exist at the destination:
DOC/UPDATES/ONE
DOC/UPDATES/THREE
In this case, the system copies only the file DOC/UPDATES/TWO, because copying either
of the other files would require overwriting an existing file at the destination.
Note: For tape destinations, the ADD statement is equivalent to the COPY statement.
That is, the ADD statement does not preserve existing files at a tape destination.
Note that different subsets of the requested files might be copied to each destination. For
example, if REPORT1 already exists on COMMON family, then the statement copies only
REPORT2 to COMMON. If REPORT1 and REPORT2 both exist on DBFAM family, then the
second statement does not copy either file to DBFAM.
Suppose you want to avoid overwriting any destination files that are newer than the
corresponding source files. The following example accomplishes this goal by reading the
ALTERDATE file attribute of the source file and the destination file.
Example
FILE SOURCE(KIND = DISK, NEWFILE = FALSE, DEPENDENTSPECS = TRUE);
FILE DEST(KIND = DISK, NEWFILE = FALSE, DEPENDENTSPECS = TRUE);
STRING FILEN := "TEMP/INDEX/HTML",
SFAM := "DEVPK",
DFAM := "USERPK";
BOOLEAN UPDATE;
Explanation
• SOURCE and DEST
The source and destination files for the copy. These files must be explicitly declared
and opened before their file attributes can be read.
• ALTERDATE
The date when the data in the file was most recently changed. The date is an integer
of the form YYYDDD. For example, 98028 means January 28, 1998. Note that the
value changed from 99365 to 100001 on January 1, 2000.
• (SOURCE(ALTERDATE) GTR DEST(ALTERDATE))
True if the source file is newer than the destination file.
The preceding COPY command was entered in CANDE. Notice that the statement
initiates a task called *LIBRARY/MAINTENANCE, which performs the actual copying. If
the file is being copied from one host to another, this task is named *FILE/TRANSFER. You
can see these tasks referred to in system messages and in the output from mix display
commands such as A (Active Mix Entries).
?9849 HI
#9849 COPY -- COPYING (FILE 21 OF 30) (WONG)ACTDATA/431/950919
(39%) FROM REPOS TO: ACMAST
The preceding response shows that the system is 39 percent done copying the current
file, which is the 21st of 30 files.
This response indicates that the system has finished copying the two files, but has not yet
started copying the third file. This example is for a copy from a tape with the serial number
UT982.
Note: CD-R drives function as CD-ROM drives when reading CD-ROMs; however, CD-R
drives can also write to blank write-once CD-R media, creating a CD-ROM.
Track at once is the default recording mode. If you specify the attribute PACKETWRITE,
packet write recording is used. Additionally, you can specify how many copies of the disc
are to be burned with the attribute CDCOPIES, and build multivolume CD-ROM sets with
the attribute MULTIVOLUME. Refer to the explanations for each of these settings in the
following paragraphs.
Before the CD-ROM disc is finalized with the CLOSE SESSION SCSI command, the entire
data track is read and compared with the image file to ensure that no media defects
affected the burn.
Note: Except during this compare operation, the MCP refuses to read any CD-ROM disc
that is not finalized. Discs that fail the compare operation cannot be read by mistake in the
future.
The family used for the temporary disk file must have room for the entire image. Also, for
track at once recording, you cannot use a family that is heavily used by other programs.
The temporary disk file is created on the default family of the task executing the COPY
statement, unless you set the TASKSTRING attribute of that task to FAMILYNAME =
<family name>.
Track at Once
Track at once is the default recording mode and is normally used to create CDROMs to
be read in CD-ROM drives or to create master CD-ROMs for replication. However, this
mode carries a potential risk of “buffer underrun.” Buffer underrun occurs when the
CD-ROM drive buffers become empty in the middle of a track, consequently ruining the
disc. To reduce this risk, track at once recording uses ten output buffers of 391,168 bytes
and permits the implementation to run at MCP priority while writing to the CD-ROM drive.
Packet Write
Packet write recording causes the data to be written to the CD-ROM in relatively small
packets and is selected by specifying the PACKETWRITE attribute.
The default value of PACKETWRITE is FALSE. When set to TRUE, packet write recording
is used when the CDROM is written; otherwise, track at once recording is used.
Packet write recording has the following advantages and disadvantages compared with
track at once:
Advantages Disadvantages
The risk of buffer underrun is eliminated. The resulting disc can be read only in CD-R
drives.
Less save memory is used for output The resulting disc cannot be used as a master
buffers—130,390 words of output buffers are for replication. Track at once output must be
used for packet write versus 651,950 words used for this purpose.
for track at once.
The burn runs at normal priority. The capacity of the disc is reduced by 3.6
percent and throughput is reduced when
writing to the disk.
Because of the limitations of packet write, it is currently used only to backup and restore
files.
Multivolume
Multivolume recording causes the data to be written to multiple CD-ROMs when the data
overflows a single CD-ROM. The default value of MULTIVOLUME is TRUE. If
MULTIVOLUME is FALSE when a data overflow occurs, the copy is terminated with an
error.
When a multivolume set is written, the data for a given CD-ROM is written to a temporary
disk file, the CD-ROM is burned, and the temporary disk file is removed, all before the data
for the next CD-ROM is written to a temporary disk file. This allows the system to
determine whether storage capacity equal to or less than the CD-ROM is needed.
In a multivolume copy, the system splits files across CD-ROM boundaries. This capability
makes it possible to copy to a set of CD-ROM files that are much larger than the capacity
of a single CD-ROM.
Each CD-ROM in a multivolume set has a complete library maintenance directory listing
all files on the entire set. As a result, you can use the TDIR system command on any of the
CD-ROMs to list all files on the set.
The directory of a given CD-ROM (volume N) of a multivolume set contains the correct
locations for the file data of all files located on previous CD-ROMs in the set (volumes 1
thru N).
However, the directory records the location of all subsequent files as volume N+1. For
example, if volume 1 of a multivolume set is mounted and you enter a COPY command
specifying a file that happens to be on volume 3, the system asks for volume 2. If volume 2
is then mounted, the system asks for volume 3. If volume 3 is mounted, the COPY is then
carried out.
CD Copies
You can specify how many copies of a CD-R disc are to be burned with the attribute
CDCOPIES. The default value of CDCOPIES is 1.
When data is copied to a CD-R disc, it is first copied from the source media to a temporary
disk file. The data in the temporary disk file is formatted exactly as it is to appear on the
CD-ROM. The temporary disk file is then copied to a CD-R drive. CDCOPIES causes the
disk file to be copied to the CD-R drive as many times as you specify, without having to
re-copy the data from the source media.
Restrictions
• The capabilities of KIND=CD apply only to the COPY statement and are not valid with
the ADD statement.
• The only “& options” permitted are COMPARE, DSONERROR, WAITONERROR, and
REPORT.
• There can be only one destination volume and the destination volume cannot require
quotes.
• The source and destination volumes must both be on the local host. NFT is not
supported.
• When the MULTIVOLUME file attribute is set to FALSE, the data must fit on a single
CD-ROM.
- For track at once output, a single CD-ROM holds 681,984,000 bytes or 333,000
CD-ROM sectors of 2,048 bytes each.
- For packet write output, a single CD-ROM holds 657,553,408 bytes or 321,071
CDROM sectors of 2,048 bytes each.
• All errors except skipped files are fatal and cause the task executing the COPY
statement to terminate with a failure.
Examples
Example 1
COPY TEST1, TEST2 TO GGG(CD);
A library maintenance CD-ROM named GGG is created. The disk contains files TEST1 and
TEST2.
Example 2
BEGIN JOB J;
TASK T;
A library maintenance CD-ROM named SYSTEM_PRINT is created. The disc contains all
the files from *SYSTEM/PRINT/=.
The temporary disk file used to hold the CD-ROM image is placed on family BLUE.
Example 3
COPY (USER9)= FROM GREEN(PACK),
= FROM TEST4 (SERIALNO= "123321"),
*SYSTEM/PRINT/= FROM SYSTEM_45123;
A library maintenance CD-ROM named SYSTEM_012 is created. The disc contains all the
files from (USER9)= on family GREEN, from tape TEST4 (with serial number 123321), and
from *SYSTEM/PRINT/= on CD SYSTEM_45123.
Conversely, when you copy files from a tape, the COPY statement expects the tape to be
a library maintenance tape. When you copy files from tape to disk, COPY creates disk files
with the same file attributes that the files had before they were copied to tape.
Tapes created by application programs are usually not library maintenance tapes. To copy
data to or from such tapes, you must use another utility such as SYSTEM/DUMPALL. For
information about SYSTEM/DUMPALL, refer to the System Utilities Operations Reference
Manual.
A user enters a COPY command in CANDE. The command copies all files from a tape
named MYTAPE. If no tape of that name is mounted, the system suspends the job. The
operator must either mount a tape with the requested name, or use the IL (Ignore Label)
system command to specify the tape drive that should be used, as in the following
example.
9096 IL MT 30
Copies all files from a tape with the tape name MYTAPE and the serial number DBK009.
If no tape of that serial number is mounted, the system suspends the job. Messages such
as the following appear in CANDE:
#RUNNING 6745
#BOT 6746 (JOSEPH)WFLCODE
#BOT 6747 *LIBRARY/MAINTENANCE
#6747 NO FILE MYTAPE/FILE000 (MT) [DBK009] #1
At this point, you can either mount a tape with the requested serial number or use a
command such as IL (Ignore Label) to specify the tape drive to be used.
Rules
If the serial number includes only digits, then the quotes (″) are optional. If you omit
quotes, the system adds leading zeros if necessary to make the number six digits long. If
you include quotes, the system adds trailing blanks instead. Thus, 123 is the same as
000123, but ″123″ is the same as ″123 ″.
Copies file SYSTEM/ALGOL that originated on the disk family PACK. This is useful when
files with the same filename were copied to one tape from different disk families. You can
specify which file you want by the original family name.
Copies files in CANDE, without specifying a serial number for the tape destination. The
system assigns the name RECAP to the destination tape. The system might suspend the
job, depending on whether the SERIALNUMBER system option is set.
If SERIALNUMBER is .
.. Then . . .
Set The system suspends the job. The operator must enter a command
such as the following OU (Output Unit) command to specify a tape
drive that has a scratch tape mounted.
9188 OU MT 12
Reset The system opens any scratch tape that is mounted on a tape drive
and is not in use. If no such tape is available, the system suspends the
job until the operator mounts a scratch tape.
An operator can use the OP (Options) system command to set or reset the
SERIALNUMBER system option.
Copies files to a tape with the serial number JN33, regardless of which tape drive the tape
is mounted on. If no such tape is mounted, the system suspends the job. When the tape
is mounted, the system resumes execution of the job.
If you specify a serial number, the COPY statement will write to any tape that has that
serial number, even if the tape is not a scratch tape. The COPY statement overwrites all of
the data that is already on the tape.
If you perform daily backups of files to tape, then you need some method of assigning
unique serial numbers to the backup tapes so you can tell them apart.
Example
COPY (RITA)POOL/= TO RITAP(SERIALNO= #TIMEDATE(YYMMDD));
This technique guarantees uniqueness if the job is run no more than once a day. For more
frequent runs, you would need to incorporate a time as well as a date. You can accomplish
this effect with other forms of the TIMEDATE function, as discussed under Getting the
Date and Time in Section 16, Examining the System Environment.
Copies files to any tape with a SCRATCHPOOL attribute of MFC. The system
automatically chooses a tape from any scratch tapes that are currently mounted and that
have a matching SCRATCHPOOL value of MFC.
Rules
The SCRATCHPOOL attribute is intended to identify a group of tapes that share a common
purpose or common ownership. An operator can assign a SCRATCHPOOL value to a tape
as part of a PG (Purge) or SN (Serial Number) system command, as in the following
examples:
PG MT 28 SCRATCHPOOL="MFC"
SN MT 28 PARTS SCRATCHPOOL="MFC"
The SERIALNUMBER system option has no effect on a copy request that specifies a
SCRATCHPOOL.
Copies files to a scratch tape on any drive that supports the requested DENSITY value.
There are a number of DENSITY values that are supported by different types of tape
drives.
Rules
If the COPY statement specifies both a DENSITY and a SERIALNO for the destination
tape, then the system uses both criteria to select the tape. That is, the DENSITY and
SERIALNO must both match the tape.
Copies files to a scratch tape and then automatically rewinds and unloads the tape. You
can use the AUTOUNLOAD option to make the system automatically rewind and unload
the tape when the copy is completed or when a reel switch occurs. The AUTOUNLOAD
option is useful because it makes it obvious to an operator when a tape is finished being
used and can safely be removed from the tape mount.
Rules
You cannot use multiple COPY statements to copy files to the same tape. Therefore, if you
want to copy files from multiple sources to the same tape, you must combine the copy
requests into a single COPY statement.
Compressing Data
COPY (DANTON)COMFAB/= TO COMF(COMPRESSIONCONTROL =
USER, COMPRESSIONREQUESTED);
Copies files to a tape, and requests the tape unit to compress the data. The compression
options are meaningful only if the tape drive supports data compression.
Note: Use the compression options with care, as the resulting tape can be read only by a
tape drive that supports the same compression standard.
Output from the PER MT command for a tape that is compressed. You can tell that the
tape is compressed because of the letter C that appears after the density 38000.
Output from the PER MT command for a compressed tape. This tape has been remounted
on a tape unit that does not support tape compression. The COMPRESSION MISMATCH
message warns you of this problem.
One reason this message can occur is that the job attempts to copy a file from a
compressed tape that has been remounted on a tape drive that does not support
compression.
The LOCKEDFILE option also protects the tape from being overwritten by subsequent
COPY statements. A COPY statement automatically overwrites a destination tape if the
COPY statement specifies a serial number that matches the tape. However, if the tape
was created with the LOCKEDFILE option, the copy task becomes suspended with a
message such as the following:
---Job-Task-Pri---Elapsed------- 1 WAITING ENTRIES -----
6120/6121 50 :49 *LIBRARY/MAINTENANCE
CONF/FILE000 REQUIRES MT [950824] #1
To enable the copy to complete, you must enter a PG command to purge the tape, and
supply an OK response to the waiting entry for LIBRARY/MAINTENANCE.
A COPY statement, submitted in CANDE that copies more files than can fit on the
destination tape. The system creates a waiting entry that prompts you to mount another
tape. The continuation of data onto another tape is referred to as a reel switch. The system
performs as many reel switches as necessary to accommodate the amount of data being
copied.
At this point, you would mount another tape and purge it if it is not already a scratch tape.
Then you could use the following command to make the copy continue, writing this time
to the tape on MT 30:
5972 OU MT 30
Note: CANDE does not support the OU command, so you must enter it in MARC,
Operations Center, or at an ODT.
Copies files to the tape with the serial number JBACK1. If reel switches are necessary,
searches for the continuation reels under the serial numbers JBACK2, JBACK3, and
JBACK4.
This feature of the COPY statement is useful if you know that a copy will require multiple
tape reels, and you have mounted multiple tapes with the specified serial numbers in
advance.
Serial number
You assign this identifier with SN commands. If you use a meaningful serial number
convention, you can identify the tapes by the serial numbers alone and disregard the other
elements of the display.
Tape name
This identifier is the same for all tapes in a set. The tape name was specified in the COPY
statement that created the tape set.
File number
Indicates which file appears at the start of the tape. This number corresponds to the order
of the files in the tape directory. This number usually increases from one reel to the next.
For a single file that continues across multiple reels, this number indicates the order of the
reels.
Thus, in this example, the first tape contains the first 18 files and the beginning of file 19.
The second tape contains more of file 19. The third tape contains the remainder of file 19,
files 20 through 38, and the beginning of file 39. The fourth tape begins with the remainder
of file 39.
Copies a file from a multiple reel set without specifying which reel the tape is on. In this
example, the COPY statement was submitted in CANDE, and the requested file is not on
the first reel. After reading the first reel, the system displays a waiting entry that requests
you to mount the next reel.
When you mount the next reel, the copy request resumes automatically. The system
continues prompting you to mount the next reel until the correct one is mounted. Then
the system copies the requested file.
If you know in advance which reel the file begins on, you can start by mounting that reel
instead of the first reel of the set. Use the IL command to make library maintenance begin
with the reel you have mounted, even though it is not the first reel in the set.
Suppose you want to determine the reel where a particular file begins. Compare the tape
directories for each reel, starting from the first reel. The file begins on the last reel whose
tape directory includes an entry for that file.
Tape Directory Entries for Files That Are Not on the Tape
Be aware that the tape might not include all the files listed in the directory if any of the
following situations occurred when library maintenance first created the tape:
• Library maintenance was unable to copy one or more of the requested files to the
tape. If you later try to copy one of the missing files from the tape, the system
generates the error discussed under “<file name> NOT ON <tape name>” later in
this section.
• Library maintenance performed a reel switch because not all the files would fit on the
tape. If you later try to copy one of the missing files from the tape, the copy request is
suspended with the message discussed under “NO FILE <file name> (MT)” later in
this section.
• Library maintenance was discontinued or interrupted by a halt/load while creating the
tape. If you later try to copy one of the missing files from the tape, the system
generates the error discussed under TAPE FILE MISSING later in this section.
Copies files to the tape named BACK, and creates a tape directory disk file.
Copies a file from the tape named BACK. Library maintenance automatically uses the tape
directory disk file, if one is available for this tape. Otherwise, Library Maintenance uses the
conventional tape directory located on the tape itself.
Suppose the tape is part of a multireel set, and a tape directory disk file exists for that set.
Library maintenance takes the following actions:
1. Examines the first reel and finds a reference to the location of the tape directory disk
file.
2. Reads the tape directory disk file.
3. Prompts you to mount the reel that contains the source file (*OBJECT/REPFORMAT).
If there is no tape directory disk file, Library maintenance reads each reel until it finds the
file. You might have to mount multiple reels. For each reel, you have to wait while it
searches through the entire reel.
RUN *SYSTEM/FILEDATA
("FILENAMES: LIBMAINTDIR = LIBMAINTDIR/BACK/19980223/CLE187");
Prints the contents of the tape directory disk file created on February 23, 1998, for a tape
with the name BACK and the serial number CLE187.
DIR
RUN *SYSTEM/FILEDATA
PRI
Directs the output to a printer. If you omit this clause, the output displays at your screen
instead.
Tape directory disk files reside on the family specified by the DL LIBMAINTDIR form of the
DL (Disk Location) system command. Tape directory disk files have titles of the following
form:
LIBMAINTDIR/<tape name>/<date>/<serial number>
These files reside under the usercode of the WFL job. If the WFL job runs without a
usercode, the tape directory disk files are also nonusercoded (*) files.
The system automatically removes tape directory disk files when you reuse the
corresponding tapes for another purpose. For example, if you enter an SN (Serial Number)
or a PG (Purge) command, the following message appears in the Messages display:
Additionally, a job called PURGIT appears in the Waiting Entries display with the following
message:
MT <unit number> TO LEAVE THIS TAPE AS IS REPLY 'DS';
TO PURGE IT REMOVE THE 'LIBMAINTDIR' FILE OR REPLY 'OK'
If you enter a reply of OK, the system deletes the tape directory disk file.
By expanding a tape, you make use of tape space that otherwise would be unused. As a
result, you might not have to use as many different tapes for a given purpose. However,
you must take precautions to prevent ambiguities in the names of files on the tapes.
Displays label and path information for tape unit 33. If the response includes the message
shown here, then the unit has fast access capability.
Appends files to the end of the existing library maintenance tape named BACK. Note that
• All existing files on the tape are retained.
• The tape directory on the tape does not reflect the new files. However, the tape
directory disk file does.
• If BACK is a multireel tape set, library maintenance adds the files at the end of the
final reel.
• If the new files do not all fit on the tape, library maintenance performs a reel switch
and writes to a new reel.
• If a new file has the same title as an existing file, the new file is added and the old file
is retained. (The COPY and ADD statements both behave this way.) Thus, the
expanded tape can have two files with the same name. If you later attempt to copy
that file from the tape, library maintenance copies the first version of the file that it
finds.
Appends files to the end of the existing library maintenance tape with the name BACK
and the serial number OBJ33. For a multireel set, you can supply the name and serial
number of any single reel in that set. Library reads the start of the reel to find the name of
the tape directory disk file, and then prompts you to mount the final reel if necessary.
These statements serve a similar purpose. Each appends files to the end of the existing
library maintenance tape named BACK. Each statement specifies three serial numbers to
use for expansion reels: EXT01, EXT02, and EXT03.
The difference between these statements is that the first statement specifies the serial
number of an existing reel, OBJ33. The second statement specifies only a comma (,) for
this reel, with the result that library maintenance uses only the tape name BACK to locate
the reel. If you omit the leading comma, library maintenance assumes that EXT01 is the
serial number of an existing reel, rather than an expansion reel.
Appends files to a tape, and prefixes the files with the current date. This method helps
ensure that none of the new files on the tape has the same title as any of the old files. This
method works if you copy files to this tape no more than once a day.
Advanced Features
The following pages explain how to
• Assign task attributes to the copy request.
• Improve copy efficiency with the BLOCKSIZE option.
• Ensure the accuracy of the copied data.
Copies files and assigns several task attributes to the copy request. The effects of these
attributes are as follows:
• USERCODE = JAEGER / MYPW
Causes the copy to run under the JAEGER usercode.
• FAMILY DISK = DISK ONLY
Overrides the effect of any FAMILY statement previously specified for the job as a
whole.
Copies a file from disk to tape with increased efficiency by specifying a BLOCKSIZE value.
Rules
The BLOCKSIZE assignment results in greatly reduced processor usage by the copy
request. However, the BLOCKSIZE assignment does not necessarily reduce the elapsed
time for the copy. Instead, BLOCKSIZE benefits other processes on the system by leaving
the processor free for their use.
The BLOCKSIZE assignment is most helpful for copies from disk to tape. You should
specify BLOCKSIZE for the tape destination, not the disk source. A BLOCKSIZE value of
5400 is a good, typical value for improving efficiency of copies to tape.
These statements serve similar purposes. Each statement copies files to a tape and
checks to ensure that the data is written correctly.
Rules
The VERIFY option and the COMPARE each help to ensure the accuracy of copied data.
You can use one option or the other, but not both.
The disadvantage of these options is that they cause the copy request to take longer than
it otherwise would.
You can use the following factors to decide between the VERIFY option and the
COMPARE option:
Factor Considerations
Speed
• Single destinations
VERIFY is faster than COMPARE. COMPARE can take up to three
times as long as a straight copy. VERIFY is slower than a straight
copy but faster than a COMPARE.
• Multiple destinations
COMPARE might be faster than VERIFY. For multiple destinations,
COMPARE compares all destinations simultaneously, whereas
VERIFY checks destinations one at a time.
Thoroughness VERIFY does more thorough checking than COMPARE, in the following
respects:
• Tape destinations
COMPARE checks only the contents of files. VERIFY additionally
checks the correctness of tape structures between files.
• Tape sources
If the tape was originally created with VERIFY, then VERIFY checks
the integrity of the data on the source tape as well as the accuracy of
the copy at the destination. By contrast, COMPARE ensures only the
accuracy of the copy at the destination.
Recopies If COMPARE discovers an error in the copy at the destination, the system
asks you whether to recopy the file or skip the file.
In contrast, the VERIFY option does not allow you to request a recopy if a
verify error occurs in a copy to tape. You can only skip the file or terminate
the whole copy request.
Type of tape drive For 1250 BPI (quarter inch) tape drives, you can use the VERIFY option but
not the COMPARE option. For other types of tape drives, you can use
either option.
When you copy a file to a multipack disk family, the system might distribute portions of
the file across all the members of the disk family. Thus, if any disk unit in the family
crashes, you are likely to lose some of the data in the file.
You can use the SINGLEUNIT or FAMILYINDEX options to concentrate the destination file
on a single disk unit. This method makes it possible that the file can survive some disk
crashes intact. However, if the single disk unit holding the file crashes, you lose the entire
file. Thus, the SINGLEUNIT and FAMILYINDEX options do not eliminate the risk of data
loss; but these options convert the risk of partial data loss to a less likely risk of more
drastic data loss.
Caution
Neither the SINGLEUNIT nor the FAMILYINDEX option is a substitute for
backing up your files to a backup medium on a regular basis.
Example
COPY QDATA/UPDATE TO APT(PACK,SINGLEUNIT);
These statements serve similar purposes. Each statement copies a file to a single disk unit
on a multipack disk family. The SINGLEUNIT option allows the system to choose which
disk unit to use. The FAMILYINDEX option specifies the index number of a particular disk
unit within a family.
You can use a FAMILYINDEX = 0 assignment to prevent the condition discussed under
(FAMILYINDEX <number>) SECTORS REQUIRED ON <family> later in this section.
If you do not specify either option, the system handles most copy errors by skipping the
file with the error and continuing to copy the remaining files.
Displays the waiting entries in CANDE. The display shows a copy request suspended by
the WAITONERROR option.
Displays the status of the LIBRARY/MAINTENANCE task in CANDE. You can use a ?Y
command such as this one to determine which file the system was unable to copy. The
next to the last line displays the error that occurred. You can respond to this situation with
any of the following actions:
• Make a note of the file that could not be copied, and enter the command ?6445 OF or
?6445 OK. Either command causes the copy request to skip to the next file.
• Cancel the remainder of the copy request by entering ?6445 DS.
Copy Results
The following topics explain how to
• Determine if the copy was successful.
• Determine which files were copied, by printing a report or using the job summary.
In this example, the COPY statement is placed inside a DO UNTIL loop. After the COPY
statement completes, this example checks the value of the TASKVALUE attribute. Library
maintenance sets TASKVALUE to a nonzero value if one or more files were not copied.
Library maintenance also returns a nonzero value if the copy is discontinued, or in the case
of an RSVP condition, if the failing action is not retried.
If TASKVALUE indicates that not all files were copied, then the operator is prompted to
enter an AX (Accept) system command indicating whether the copy operation should be
retried.
Printing a Report
COPY & REPORT TEMP/1 AS SAVE/1, TEMP/2 AS BASIC/2,
TEMP/3 AS OTHER/3 FROM DBFAM(PACK) TO ACMAST(PACK);
Uses the & REPORT option to print a report of the files that are copied and any errors that
are encountered. Following is an example of this report:
PK412 (JASMITH)TEMP/3 NOT ON PACK
(JASMITH)TEMP/1 COPIED AS (JASMITH)SAVE/1 FROM DBFAM TO ACMAST
(JASMITH)TEMP/2 COPIED AS (JASMITH)BASIC/2 FROM DBFAM TO ACMAST
When you use this option, the system does not write FILE COPIED messages in the job
summary or system log.
Note: If you enter the COPY statement at a CANDE or MARC session, then by default,
the report will not print out until you end your session.
No report was generated because the ARCHIVESUPPORT library function has not been
defined or points to an old version of the ARCHIVESUPPORT library.
An operator or system administrator can remedy this problem with an SL (Support Library)
command that assigns the ARCHIVESUPPORT function to a current version of the
ARCHIVESUPPORT library. Following is an example of this command:
SL ARCHIVESUPPORT = *SYSTEM/ARCHIVESUPPORT ON PACK
Copies files and generates a job summary. The job summary is a printout that includes
messages showing whether each file copy succeeded, along with other information. For
further information about job summaries, refer to Using the Job Summary.
Example Output
15:15:40 7421 MESSAGE: PK412 (JASMITH)TEMP/3 NOT ON DBFAM
15:15:41 7421 MESSAGE: (JASMITH)TEMP/1 COPIED AS
(JASMITH)SAVE/1 FROM DBFAM TO ACMAST
15:15:41 7421 MESSAGE: (JASMITH)TEMP/2 COPIED AS
(JASMITH)BASIC/2 FROM DBFAM TO ACMAST
DSS INACTIVE
A copy request failed because the DSSSUPPORT system library was not active.
This error can occur when an NFT copy is restarted after a halt/load. Refer to “Ensuring
the Hosts Are Available” later in this section.
This message can result from any of several causes. Consider the following possibilities
Family substitution You forgot the effects of family substitution. This is the likely cause if
the message mentions a family name that was not specified in your
COPY statement. For a description of family substitution, refer to
Equating the Family Statement in Section 5, Running Tasks.
File not present The file you requested is not present at the source. To determine
whether the file is present, you can use a PD (Print Directory) system
command of the form
PD <file title>
In CANDE, you would use the FILE <file title> command instead of
PD.
File archived to tape The system is running cataloging or archiving, and the file is present
only in the tape library. (Cataloging and archiving are features that
enable the system to keep track of files that have been backed up to
tape.)
Security restrictions The job does not have access rights to the source file. The system
displays the <file name> NOT ON <family name> message rather
than reporting a security violation in this case. For information about
file access rights, refer to Section 15, Security.
System files The file is of a FILEKIND that cannot be copied. Examples are system
directory files, BADDISK files, and job description files.
The job attempted to copy the file from a tape, and one of the following problems
occurred:
• The file was not present in the tape directory. Possibly you mounted the wrong tape
or misspelled the tape name.
• The requested filename was listed in the tape directory, but the file was not actually
present on the tape.
• This difference between the tape directory and the tape contents results if either of
the following events occurred while the COPY statement was creating the tape:
- Someone deleted the file from the source disk after the COPY statement started
executing, but before the COPY statement copied that particular file.
- An error occurred in the file copy, and the operator responded to the RSVP
message with an OF (Optional File), DS (Discontinue), or FR (Final Reel) system
command.
For information about tape directories, refer to Understanding Tape Directories earlier in
this section.
A copy request failed because the requested host was not available.
This error can occur when an NFT copy is restarted after a halt/load. Refer to “Ensuring
the Hosts Are Available” later in this section.
Security Violation
SECURITY VIOLATION @ (41432000)
PK185 FILENAME NOT ENTERED INTO DISK DIRECTORY (PEEL)JC/REPORT
(PEEL)JC/REPORT NOT COPIED TO ACCTPK
The job attempted to copy the file to someone else’s usercode. This action requires the
privileges discussed under COPY or ADD in Section 15, Security.
Following are examples of COPY statements that could cause this error.
Explicitly requests that a file be copied to usercode PEEL. This statement causes a
SECURITY VIOLATION error if the job runs under a nonprivileged usercode other than
PEEL.
Because the AS clause is not specified, attempts to create the destination file under the
same usercode as the source file (that is, PEEL). This statement causes a SECURITY
VIOLATION error if the job runs under a nonprivileged usercode other than PEEL.
The system was searching for a file that was listed in the tape directory, and detected
missing endoffile labels. The END-OF-FILE and TAPE FILE MISSING messages occur
together in this case. Most likely one of the following happened while the tape was being
created:
• The system was halt/loaded.
• The WFL job was terminated by a DS (Discontinue) system command.
A nonprivileged job attempted to copy an entire directory of files from another usercode.
This action violates system security rules.
Following are descriptions of some conditions that can suspend the job, even if the
WAITONERROR option is not set.
The system is attempting to copy an area of a file to a specific disk unit, in this case the
second member of the disk family. The system targets a specific disk member in the
family if either of the following conditions is true:
• The COPY statement specifies the FAMILYINDEX option or the SINGLEUNIT option
for a disk destination.
• The source file has a FAMILYINDEX file attribute value. Source files on disk or on
library maintenance tapes might have a FAMILYINDEX value. The system uses the
same FAMILYINDEX for the destination unless you override it in the COPY statement.
You can give your permission by entering <mix number> OK. However, you have to make
this response for each area of the file. For a long file, this could mean a lot of OK
commands.
Copies a file and ignores any FAMILYINDEX attribute value stored in the source file.
Instead, the FAMILYINDEX=0 assignment allows the system to assign file areas to any
disk members in the disk family.
Indicates that the COPY request is waiting for a tape. This condition can occur for any of
the following reasons:
• You were deliberately copying from tape, but have not yet mounted the required tape.
The copy will resume when you mount the tape. In some circumstances, you might
have to use additional commands to direct the copy to use a particular tape or tape
unit. Following is one such command:
<mix number> IL MT <unit number>
• If the NO FILE message line ends with a number greater than 1, then you
attempted to copy from a multireel tape set. The file or files were not located
completely on this reel, and this system is prompting you to mount the next reel.
• You intended to copy from a disk family, but forgot to specify KIND = DISK for the
source. The system therefore attempted to copy from a tape, which is the default.
You should DS the job, fix the COPY statement, and submit it again.
• The job attempted to copy a file from a compressed tape that has been mounted on
a tape unit that does not support compression. To determine whether this is the
cause of the problem, refer to the PER MT display as described under
“Compressing Data” earlier in this section.
REQUIRES MT
---Job-Task-Pri---Elapsed---- 2 WAITING ENTRIES ----
3564\3674 50 7:59 (MFG) *LIBRARY/MAINTENANCE
DEBIT/FILE000 REQUIRES MT #1
The copy request is waiting to copy a file to a tape, for either of the following reasons:
• You intended to copy to a disk family, but forgot to specify KIND = DISK for the
destination. The system therefore attempted to copy to a tape, which is the default.
You should stop the job with a DS command, fix the COPY statement, and submit it
again.
• You were deliberately copying to tape, but have not yet mounted the required tape.
The copy will resume when you mount the tape. In some circumstances, you might
have to use additional commands to direct the copy to use a particular tape or tape
unit. Following is a sequence of commands that create a scratch tape on MT 30, and
direct the library maintenance task with mix number 3674 to use that scratch tape:
PG MT 30
3674 OU MT 30
The copy request is waiting to copy a file to a tape with a serial number of PARTS. Refer to
“Using a Serial Number for the Destination” earlier in this section.
SCRATCHPOOL Requests
---Job-Task-Pri---Elapsed---- 1 WAITING ENTRY USER=JOSEPH --
* 6636\6815 50 :06 (MFG) *LIBRARY/MAINTENANCE
DEBIT/FILE000 REQUIRES MT #1 SCRATCHPOOL=MFC
The copy request is waiting to copy a file to a tape with a SCRATCHPOOL value of MFC.
Refer to “Selecting from a Pool of Tapes” earlier in this section.
RECOPY REQUIRED
PK 64 RECOPY REQUIRED *CONTROL/DOCS
The system detected possible data corruption in the file being copied. This RSVP condition
is preceded by a library maintenance error message. Only some error conditions allow
recopying, such as those indicated by the following messages:
I/O ERROR DURING COPY
COMPARE ERROR
I/O ERROR DURING COMPARE
• From the local host to the remote host. In this case, the source file is on the local host
and the destination file is created on the remote host.
• From the remote host to the local host. In this case, the source file resides on the
remote host, and the destination file is created on the local host.
• From one remote location to another. In this case, the WFL job is initiated at the local
host, the source file resides on a remote host, and the destination file is created at that
remote host or a different remote host. This capability is available only for NFT copies.
To determine the status of a copy, enter a HI command for the first task initiated by
FILE/TRANSFER. The following examples show the use of the HI command to monitor file
transfers initiated in CANDE sessions.
NFT Copies
COPY = FROM SERV(PACK) TO PACK(HOSTNAME=LA001);
#RUNNING 3478
#BOT 3479 (APPS)WFLCODE
#BOT 3485 *FILE/TRANSFER
#BOT 3489 (APPS)NFT/TO/MPA15C
?3489 HI
#3489 DSS:COPYING (APPS)W/DAILY/XPS/CYCLE ON SERV AS
(APPS)W/DAILY/XPS/CYCLE ON PACK FROM SF001 TO LA001
#3489 DSS:ELAPSED TRANSFER TIME 00:29 = 75% TRANSFERRED
Displays the current status of an NFT copy task in CANDE. The HI command uses the mix
number of the first task initiated by FILE/TRANSFER.
FTP Copies
COPY 'counter.dat' AS COUNTER/DAT (FTPSITE = "MAPIN CCSYMBOL"),
FROM DISK(PACK,DOMAINNAME="users.omega.com",
USERCODE='jcom'/'mypass'/500421) TO SERV(PACK);
#RUNNING 3612
#BOT 3613 (JOSEPH)WFLCODE
#BOT 3614 *FILE/TRANSFER
#BOT 3615 (JOSEPH)FTP/FILE/TRANSFER/FROM/DNS_HOST
#BOT 3616 (JOSEPH)FTP/HELPER/FOR/BATCH/CLIENT/MIX_3615
?3615 HI
#3615 FTP: Copying counter.dat as COUNTER/DAT ON SERV
from "USERS.OMEGA.COM." to LA001
#3615 FTP: 2 octets transferred in 0.1 seconds (17.8 /
second)
Displays the current status of an FTP copy task in CANDE. The HI command uses the mix
number of the first task initiated by FILE/TRANSFER.
In general, NFT COPY statements look exactly like normal COPY statements, except that
a HOSTNAME option is added to the FROM clause, the TO clause, or both.
Copies a directory of files from the local host to a disk family on the remote host LAHUB.
Copies a file and a directory from the remote host LAHUB to the local host.
Copies a file from host LONDON1 to host PARIS4. This statement could be entered at
some third host, for example, ZURICH. In this case, ZURICH is said to be the local host
and is copying files between two remote hosts (LONDON1 and PARIS4).
Copies all files from a tape at host LAHUB with serial number DBK009. The files are
copied to DBFAM disk family at the local host.
Copies files from (JENNY)RECAP/= on SERV family. The files are copied to a tape with
serial number JN33 at host GENEVA1.
Copies files from a tape at host LAHUB to a tape at host GENEVA1. This statement could
be entered at some third host, for example TORONTO. In this case, TORONTO is said to
be the local host and is copying files between two remote hosts (LAHUB and GENEVA1).
If the WFL job was performing a COPY statement at the time of the halt/load, then the
system executes the COPY again. In some cases, the system is able to save time by
skipping files that were copied before the halt/load. In the case of NFT copies, the system
can even resume the copying in the middle of a disk file. (However, the latter capability
does not apply to tape files.)
You do not have to include anything special in the COPY statement to request a restart.
However, you can take certain measures to
• Ensure that the hosts are available.
• Restart copying from the beginning.
• Cleanup leftover recovery files.
After a halt/load, it might take some time for the system to reestablish connections to all
the other hosts in the network. If the copy restarts before the required host is available,
the file transfer fails with a message like the following:
DSS:HOST UNKNOWN OR NOT NETWORKING: BOSTON1
After a halt/load, it might also take some time for the system to activate the
DSSSUPPORT system library. This library must be active for the NFT service to work. If
an NFT copy is restarted before DSSSUPPORT is active, the file transfer fails with the
following message:
DSS INACTIVE
To prevent these problems, you can include code in the WFL job to delay the restart until
DSSSUPPORT and the remote hosts are ready. Following is an example that uses an
ACCEPT function to accomplish this goal.
Requesting an Operator AX
ON RESTART,
ACCEPTSTR := ACCEPT
("Enter AT BOSTON1 TD. Enter AX if BOSTON1 replies");
COPY GETNOTES/BARBBEA FROM DOC37(PACK)
TO PACK(HOSTNAME=BOSTON1);
Suppose that the contents of the source file or source directory are likely to change
between the time the file transfer is first submitted and the time the file transfer is
restarted. The system automatically recopies a file from the beginning if the file was in the
middle of being copied, and the source file contents changed before the restart. However,
the restarted copy does not
• Recopy source files that changed after being completely copied.
• Copy files that were added to the source directory after the original copy requests
started.
If you want to ensure that the entire copy request restarts from the beginning, you can use
the FROMSTART option to achieve this effect. For example, if a file is added to the
DAILY/TRANS/= directory after the halt/load and before the job restart, the FROMSTART
option ensures that the new file is copied.
Example
COPY [FROMSTART] DAILY/TRANS/= FROM DOC37(PACK)
TO PACK(HOSTNAME=LAHUB);
If the file transfer request is interrupted and restarted, the file transfer begins again from
the start. Any files that were already copied are copied over again.
NFT recovery files sometimes accumulate on disk from old file transfer requests
submitted by previous WFL jobs or COPY commands that never completed. You should
take measures to delete those recovery files periodically.
The NFT recovery files are stored at the local host in the following directory:
(<WFL job usercode>)FTRECOVERY/= ON DISK
If family substitution is in effect, the files are stored on the primary substitution family
instead of DISK.
Example
IF NOT MYSELF(RESTARTED) THEN
REMOVE FTRECOVERY/=;
COPY = FROM SERV(PACK) TO ARCH(PACK,HOSTNAME=LIMA);
IF NOT MYSELF(RESTARTED)
Checks whether the current WFL job has been restarted after a halt/load. If the job was
restarted, the job should not remove recovery files because they can be useful in
restarting the copy request. If the job was not restarted, then any recovery files are
probably old and can be removed safely.
REMOVE FTRECOVERY/=;
Removes all files in the directory where NFT recovery files are stored.
Note that this statement can remove recovery files from other WFL jobs and COPY
commands, if the copy requests were submitted under the same usercode and with the
same family substitution as the current job. If such copy requests are later restarted after
the recovery files are removed, the copy requests execute from the beginning just as if the
FROMSTART option had been used.
The following pages discuss only the most typical options for FTP copies. For information
about other options, and further details about any of the topics discussed here, refer to the
TCP/IP Distributed Systems Services Operations Guide.
Copies a file from a foreign host to the local MCP server. The individual elements of this
example are explained on the following pages under these headings:
• Specifying the foreign file
• Specifying the local file
• Copying multiple files
• Controlling input mapping
• Controlling line breaks
• Preserving the original record format
• Specifying the foreign disk family
• Specifying the foreign host
• Specifying the foreign usercode
Rules
Specify the source file name using the exact spelling and casing that are expected on the
foreign host.
Enclose the file name in single quotes (’). The single quotes denote a universal file name,
which follows different rules from an MCP server file name.
Note: Do not enclose the file name in double quotes (″). Rather than denoting a universal
file name, double quotes indicate a file name node that can include special characters.
For UNIX paths, use forward slashes (/) between the directory levels. For DOS or
Windows paths, use backward slashes (\) between the directory levels.
If you omit a path, the file is copied from the default working directory for the user ID.
Do not use wildcard characters (*). You can copy only one file at a time.
Rules
Use a file name that follows the standard MCP server syntax for file names.
Do not specify directories (for example, SYMBOL/=). You can copy only one file at a time.
Rules
If you copy multiple files, you must specify transform attributes separately for each file.
(FTPSITE is an example of a transform attribute.)
Concepts
On foreign hosts, files are often ASCII byte streams. Such files can have variable-length
records and embedded tab characters or other formatting codes.
On an MCP server, each file has a record layout defined by the FILEKIND attribute. There
are dozens of FILEKIND values, and each one implies a particular fixed record length and
the position of the sequence number and mark id fields, if any. For an explanation of the
record layout implied by each FILEKIND value, refer to the File Attributes Programming
Reference Manual.
The COPY statement offers a large number of options for mapping foreign file structures
to MCP server file structures. The preceding example shows one of the simplest types of
mapping.
Creates a destination file of FILEKIND = CCSYMBOL. Folds any excessively long records
into two or more standard length records. The division is made at the last blank space
before column 72 (because 72 is the length of the text field in CCSYMBOL files).
Rules
Value Meaning
Note: If the file is a program source, the additional line breaks in the destination file
might violate the syntax expected by the compiler. When you attempt to compile the
program, the syntax error messages will draw your attention to the places where such
problems have occurred.
Creates a destination file of FILEKIND = CDATA with records 120 characters long. No
sequence number field or mark ID field is defined.
Rules
When you assign a FILEKIND of CDATA, you can change the record length to any value
you want. Use the RECORDLENGTH option if all the following conditions are true:
• You know that the source file contains records too long for standard FILEKIND values.
• You can identify a record length that is long enough to contain all the records.
• You do not want the system to add line breaks to force the data into a standard
FILEKIND.
Note: Text that extends beyond standard record lengths cannot be compiled by
MCP server compilers or edited in CANDE or the Editor.
You might still find it useful to create such files for use as data files by application
programs.
Copies the file from the C: drive of a foreign host that runs the MSDOS or Windows
operating systems.
Rules
The system ignores the source family name (DISK in the above example), and determines
this information from the file name instead.
If the foreign host is a UNIX system, all disks available through the file system are mapped
to particular directories in a single tree structure. Thus, by specifying a path in the file
name, you implicitly also specify the disk unit. For an example that specifies a path in the
file name, refer to “Specifying the Foreign File” earlier in this section.
These statements are equivalent. The first specifies the remote host by its IP address. The
second specifies the remote host by its domain name.
Rules
If you have a domain name server on your network, you should be able to use either a
domain name or an IP address. If there is no domain name server, you must use an IP
address.
Copies the file after logging on to the foreign host with a user ID of jcom, a password of
mypass, and an account number of 500421.
Rules
Notes:
• Remember to use single quotes (’), not double quotes (″). The single quotes prevent a
value from being automatically uppercased.
• Remember to use a separate pair of single quotes for each element that needs them.
There can be up to three pairs of single quotes: one pair for the user ID, one pair for
the password, and one pair for the account number. For example, the following
assignment is incorrect:
USERCODE='jcom/mypass/500421'
If the host does not require an account number for logging on, you can omit the account
number clause. For example,
USERCODE='jcom'/'mypass'
Copies a file from the local host to the foreign host users.omega.com.
When no FTPSITE string is specified, the system takes default action in creating the
transmitted data stream from the source disk file. The default action sends the full record.
Trailing spaces and control fields, such as the sequence and ID fields, are not removed
before transmission. To discard the trailing spaces and control fields from the source file
record before the data is sent to the remote system, use the MAPOUT TRIM option,
which is discussed later in this section.
If the source file is of FILEKIND = CCSYMBOL, the system creates a destination file with
sequence numbers. However, if the source file is of FILEKIND = TEXTDATA, the system
creates a destination file without sequence numbers.
Rules
The following topics also apply for local MCP server to foreign host transfers:
• Specifying the foreign file
• Specifying the local file
• Specifying the foreign disk family
• Specifying the foreign host
• Specifying the foreign usercode
Copies a file and discards trailing spaces, sequence numbers, and mark IDs from the
records.
Rules
Use the MAPOUT TRIM option to remove the trailing spaces in the text portion of the file
record and to remove the control fields from the file data before transmitting the file to the
remote system.
The MAPOUT TRIM option can have any of the following values:
Value Meaning
BLANKS FTP discards all trailing space characters in the text field.
If the sequence and mark ID fields are immediately to the right of the
text field, they are also discarded.
Value Meaning
ALL FTP applies all of the trimming options; that is, FTP discards trailing
space characters, the sequence field, and the mark ID field.
NONE FTP does not apply trimming of the record. NONE is the default TRIM
value.
Copies a file from the local MCP server to a remote MCP server. The following pages
explain the following aspects of this example:
• Specifying the remote file name and disk family
• Specifying the remote host
• Specifying the remote usercode
• Controlling output mapping for the client
• Controlling input mapping for the server
• Changing the FILEKIND after the copy
Rules
If the local host and the remote host are connected by a BNA network, it is simpler to copy
the file using NFT instead of FTP. Refer to Copying Files with Native File Transfer (NFT)
earlier in this section.
Copies the file to the disk family ARCH on the remote host.
Rules
The destination family construct (DISK in the previous example) is ignored for FTP copies.
By default, the file is copied to the family named DISK. To specify a different destination
family, you must do both of the following:
• Enclose the destination file name in single quotes (’).
• Add an ON <family> clause to the destination file name.
Rules
You can specify a remote MCP server by its domain name, IP address, or host name.
However, if you use the host name, then by default the system assumes this is an NFT
copy rather than an FTP copy. Errors such as the following can result:
TRANSFORMATION ATTRIBUTES ARE NOT SUPPORTED BY NFT;
NO TRANSFORMATIONS WILL BE DONE
To prevent this error, you can include the [FTP] clause in the copy statement, as shown in
the preceding example. In fact, you can include the [FTP] clause for any of the FTP copy
statements discussed in this section. When you do not include the [FTP] clause, the
system determines the type of copy by examining the other attributes of the COPY
statement.
Uses the usercode YVES and password PW2 at the remote host.
Rules
Use an MCP server usercode and password for the first two nodes of the USERCODE
clause.
In many cases, you can leave the third node (the account number node) blank. However,
you need to supply an MCP server charge code if both the following conditions are true:
• The remote host requires a chargecode for your usercode, because the CHARGEREQ
usercode attribute is set.
• The remote host is unable to determine a default chargecode value to use, either
because the USEDEFAULTCHARGE usercode attribute is reset, or because the
CHARGECODE usercode attribute is null.
Copies the file and retains trailing blanks, sequence fields, or mark ID fields.
Rules
By default, FTP would trim trailing blanks, sequence fields, and mark ID fields. This
example prevents the trimming, because the destination file is an MCP server file that
should contain all these elements.
Causes the destination file to be created with FILEKIND = CDATA and record lengths of
90 characters.
FILEKIND = CDATA
This clause ensures that FTP preserves the existing sequence and mark ID values, instead
of creating new ones. You should change the FILEKIND of the destination file in CANDE
later on, as described under “Changing the FILEKIND after the Copy” later in this section.
RECORDLENGTH
For this value, you should specify a number equal to the length of the records in the source
file. You can determine this by looking at the record format descriptions for the FILEKIND
file attribute in the File Attributes Programming Reference Manual.
SITE
This option is actually part of the FTPSITE string. The FTPSITE string is broken across two
lines in this example because it is too long to fit on a single line. The ampersand (&)
character indicates that the second string is a continuation of the first.
The host where the COPY statement is entered is the FTP client. The other host is the FTP
server.
In the preceding example, the source file is on the FTP client, and the destination file is
created at the FTP server. This is because the remote host is specified in the TO clause.
The COPY statement “pushes” the file to the FTP server.
However, you could word a COPY statement to copy the file from the server to the client.
To do this, you would specify the remote host in the FROM clause. The COPY statement
“pulls” the file from the FTP server. For an example, refer to Remote MCP Server to Local
MCP Server FTP Transfers later in this section.
The FTPSITE option can include instructions for both the FTP client and the FTP server. To
indicate that instructions are for the FTP server, you must include them within the SITE
option. Outside of the SITE option, all the FTPSITE instructions apply to the FTP client.
This CANDE command changes the FILEKIND of the destination file from CDATA to
ALGOLSYMBOL. This step is necessary because the file was created with FILEKIND =
CDATA, as described previously under “Controlling Input Mapping for the Server.”
You can ignore the warning message. After the FILEKIND is changed, the original
sequence numbers from the source file are accessible in the destination file.
Copies a file from another MCP server host to the local host.
After the file arrives, you must change the FILEKIND as described previously under
“Changing the FILEKIND after the Copy.”
This statement is the same one given under Local MCP Server to Remote MCP Server
FTP Transfers except that the position of some elements has been reversed. Thus,
• The DOMAINNAME and USERCODE values are specified in the FROM clause rather
than the TO clause.
• The remote family name of ARCH is specified in the source file name rather than the
destination file name.
• In the FTPSITE value, the position of the MAPIN and MAPOUT options is reversed.
The SITE option, which specifies values for the FTP server, now includes the
MAPOUT option rather than the MAPIN option.
The copy statement above uses the MCPDATA transfer type to copy all files under the
USERFILES directory to the remote MCP host. The attributes of each file under the
directory are retained and assigned to the destination file at the destination host.
or
COPY [FTP] ACCT/BILLING/= AS SALES/ACCT/BILLING/=
FROM DISK(HOSTNAME = SALES,
USERCODE = MRKT/JAMES/532014)
TO DISK(PACK)
Copies a directory of files to or from a remote host. When you specify ″/=″ in the file name
being copied, all the files in the directory are copied.
Rules
When the remote host is a Windows or Unix machine, you can copy all files under a
directory between the local and remote host. When you specify a directory on a remote
host, each node in the directory must exist before you enter the COPY command. If the
remote directory in the COPY command is XX/YY/ZZ/= - the folders XX, YY, and ZZ must
exist on the remote host.
When you perform a directory copy and a file within the directory has a nonstandard MCP
filename, the filename is converted following the rules used by the
NONNATIVE_FILENAMES option. This conversion takes place regardless of the setting of
this option. For more information on how nonstandard names are converted on the MCP,
refer to the TCP/IP Distributed Systems Services Operations Guide.
Wrapping Files
You can use the WRAP statement to encode single or multiple files, a directory of files, a
container of files, or object files so that the files then can be transported to another
system. Once transported, the files can be returned to their original state by decoding
them using the UNWRAP statement.
If the DSONERROR option is specified, the wrap process aborts whenever it encounters
an error.
Each type of wrap operation has unique characteristics to it. This section describes each
type of operation and its unique features.
Note: Do not use this simple form of the command because it is possible that copying
the wrapped file could overwrite the original file if that file is also present on the system.
You then would have to unwrap the file to restore the original file. Instead, use the AS
statement to give the wrapped file a different, unique name.
WRAP MYFILE AS NEWFILE
Wraps the files MYFILE and YOURFILE as NEWFILE and NEW1FILE respectively.
WRAP MYFILE AS NEWFILE, YOURFILE
Wraps MYFILE as NEWFILE and YOURFILE as YOURFILE and overwrites the existing
version of YOURFILE because the AS statement is not used to specify a new name for the
wrapped file.
Wraps the file and writes it to a different directory. The AS statement is not necessary
because the file is written to a different disk where the file name is unique. Disk is always
the default device for the KIND value with the WRAP command because files cannot be
wrapped to tape. WRAP also used the standard family substitution rules as described in
Section 6, Managing Files.
Wraps a directory. The forward slash and equal sign (/=) are required when the directory
name is specified.
The same rules apply to wrapping directories that apply to wrapping files. If an AS
statement is not specified, the wrapped files replace the original files on the default disk
family. You also can use the TO statement to write the wrapped files to a different disk.
WRAP ZDIR/= AS BETA/=
Wraps all of the files in ZDIR and writes them to the directory BETA.
WRAP ZDIR/= AS BETA/= TO DISK50
Wraps all of the files in ZDIR and writes them to the directory BETA and then writes BETA
to a new disk.
WRAP ZDIR/= AS BETA/=, OLDDIR
Wraps the file MYFILE as NEWFILE and the directory ZDIR as BETA.
To wrap files that are not on your default disk, include the FROM statement in the
command syntax. The standard family substitution rules also apply with this form of the
command.
WRAP MYFILE AS NEWFILE FROM HOME TO DISK50
Wraps the file from the specified pack, specifies a new name for the file, and then writes
the wrapped file to a new destination.
When the WRAP command specifies wrapping to a container file, the container file is
opened first and then the files and directories are wrapped and inserted into the container
file. The container file is created using the INTO statement in the WRAP command as
shown in the following example.
WRAP MYFILE AS NEWFILE INTO TANKER
Creates the container file TANKER and then wraps MYFILE with the new name
NEWFILE. Then writes the file NEWFILE to the container file TANKER.
All of the files and directories specified before the INTO statement are included in the
container file unless the SEPARATELY statement is included. Multiple container files can
be specified in the same command.
WRAP MYFILE AS NEWFILE, ZDIR/= AS BETA/= INTO TANKER,
XFILE AS XXFILE, WORKING/= AS OLDDIR/= INTO STORE
Writes the first group of files and directories to the container file TANKER and the second
group to STORE.
WRAP MYFILE AS NEWFILE SEPARATELY, ZDIR/= INTO TANKER
Wraps MYFILE as NEWFILE but does not include the file in the container file TANKER.
Unwrapping Files
The unwrap process re-creates the original files from the data contained within the
wrapped files or containers. By default, the unwrap process also marks system files,
compilers, backup files, and code files as restricted. An appropriately privileged user can
override this behavior using the RESTRICTED volume attribute.
Unwraps the wrapped file MYFILE and overwrites the file on the disk.
UNWRAP MYFILE AS NEWFILE
Unwraps the wrapped file MYFILE and writes the file as NEWFILE on the disk.
Unwraps the directory OLDDIR and writes it as the new directory ZDIR.
UNWRAP OLDDIR/= AS ZDIR/=, XDIR/= AS WORKING/=
Unwraps MYFILE and then writes the file to a new location on DISK50.
UNWRAP MYFILE, ZDIR/= TO DISK50
Unwraps both the file and the directory and writes both to DISK50.
UNWRAP MYFILE, ZDIR/= FROM DISK50 TO WORKING
Unwraps both the file and the directory and writes both from DISK50 to the new directory
WORKING.
UNWRAP MYFILE, AS NEWFILE TO DISK50 (RESTRICTED=FALSE)
Unwraps the file with the new file name and writes the new file to the specified disk. The
Restricted option can only be used by a user with security administrator or privileged user
status.
Writes the unwrapped container files to from the specified disk to the new locations.
UNWRAP MYFILE AS NEWFILE TO DISK50
Unwraps the file using the new file name and writes the file to the specified disk.
Security Considerations
When a file is wrapped, the wrapped file inherits the usercode of the user who wrapped
the file unless a different usercode is used with the file name in the WRAP command
syntax.
This means that if you wrap a file and send it to a nonprivileged user, that user cannot
unwrap the file. Nonprivileged users can only unwrap files under their usercodes.
Therefore, remember to include the usercode of the nonprivileged user as part of the file
name.
Privileged users do not have this problem and can unwrap any files that are sent to them.
You can use WFL statements to print files or to change the ways that files are printed by
tasks. This section explains the following topics:
• Printing files and directories
• Specifying print defaults
• Choosing the printer destination
• Specifying the number of copies
• Specifying when printing takes place
• Controlling page layout
• Controlling headers and trailers
• Controlling banner pages
This section discusses only a few of the printing features that you can control in WFL. For
a complete discussion of printing, refer to the Print System User’s Guide and Printing
Utilities Operations Guide.
Initiates printing of the file CUST/DATA and of the printable files in the directory
TRANS/LOGS/=.
RUN OBJECT/DBINQ;
PRINTDEFAULTS = (AFTER = "14:00");
PRINT TRANS/LOGS/=;
PRINTDEFAULTS = (DESTINATION = "PA163");
END JOB
Specifies print defaults for the job, for a task, and for a PRINT statement.
The task OBJECT/DBINQ inherits the job-level print defaults, together with its own print
defaults. Where there are conflicts, the task-level print defaults take precedence. The
effect on the task is the same as a single task-level assignment of
RUN OBJECT/DBINQ;
PRINTDEFAULTS = (DESTINATION = "PA150", AFTER = "14:00");
The PRINT statement similarly inherits the job-level print defaults, together with its own
print defaults. The effect on the PRINT statement is the same as a single task-level
assignment of
PRINTDEFAULTS = (DESTINATION = "PA163", AFTER = "18:00");
Directs the printout to the printer or group named LP8 at the host DUBLIN2.
The PRINT statement is an exception to this general rule. By default, the system queues
output from PRINT statements immediately after completing the PRINT statement.
You can use the PRINTDISPOSITION and AFTER print modifiers to override these default
behaviors.
Specifies when the printer files created by this PRINT statement should be made into an
active print request.
Following are the effects you can achieve with various values of PRINTDISPOSITION.
Note that the CLOSE, DIRECT, DIRECTPS, FILEOPEN, NOW, and DONTPRINT values are
not valid with the PRINT statement.
To . . . Set to . . .
Generate a print request for each printer file as soon as the file CLOSE
is closed.
Route output directly to a printer (rather than placing the print DIRECT
request in a print queue).
Cause the Print System to generate a print request when the NOW
file is opened, but a backup file is not created. Instead, all of
the I/O operations of the application are routed directly to the
Print System rather than to the physical I/O subsystem.
Cause the Print System to generate a print request when the FILEOPEN
file is opened. This allows the Print System to begin printing
the file while the file is still open, as long as a suitable device
is available and a complete block of records can be written.
Prevent printing, but save the printer file for possible later use. DONTPRINT
Generate a print request when the WFL job or CANDE or EOJ
MARC session terminates.
Several different examples of ways to delay printing. The system does not mark the
request eligible for printing until the specified time or date.
Rules
Times are specified using a 24-hour clock. Thus, 18:00 means 6:00 p.m.
Dates are specified with the month first, then the day, then the year.
A plus sign (+) means that the following time or date should be added to the current time
or date. For example, if the current time is 13:00, then +4:00 requests a time of 17:00.
Prints a file, using the following PAGECOMP options to control page layout:
PORTRAIT
Prints lines parallel to the shorter dimension of the page. To print lines parallel to the
longer dimension of the page, specify LANDSCAPE instead.
Specify the left margin, right margin, top margin, and bottom margin, respectively. The
default unit of measure is inches.
Characters per line and lines per page, respectively. The system uses this information to
select an appropriate font size.
Header and trailer pages are useful when you use a printer that is shared by many people.
These pages print at the start and end of each print request, and make it easy to separate
printer output that belongs to different users. However, if you are the only one using a
printer, you might want to save paper by suppressing the header and trailer pages.
For the opposite effect, to force printing of headers and trailers, you would assign a value
of UNCONDITIONAL to the HEADER and TRAILER options.
If you do not specify HEADER and TRAILER values in your job, then the printer
configuration determines whether header and trailer pages are printed. The printer
configuration is controlled with the PS CONFIG system command.
Banner pages, if you request them, are printed before each file in a print request. You can
specify the text to be printed on the banner pages.
Example
PRINTDEFAULTS = (BANNER = TRUE, NOTE = "NEWFILE");
Causes a banner page with the text NEWFILE to be printed before each file in a print
request.
Rules
The overall formatting of banner pages is controlled by the PS BANNER system command.
By default, the NOTE value is printed in large block letters, and the value is truncated if it
does not fit on a single line.
When you write a program, you store the program statements in a file called the source
code file. You cannot run this file directly. Instead, you must use a compiler to read the
source code file and produce an executable file called the object code file. An object code
file is suitable for use in RUN statements.
You can submit compilations from WFL with the COMPILE statement.
Compiles a program, specifying the following equations for the source code file:
KIND = DISK
TITLE = REPORTGEN
Compiles a program, specifying OBJECT/REPORTGEN as the title for the object code file.
The object code file title can optionally include a family name, such as the ON DEVPK
clause in this example.
Compiles a program, specifying COBOL85 as the compiler to use. You should choose the
compiler that matches the language of the source program. The following compilers are
available:
BINDER CC COBOL74
COBOL85 DCALGOL DMALGOL
FORTRAN77 NDLII NEWP
PASCAL RPG SORT
Compiles a program, specifying that the resulting object code file should be saved. The
LIBRARY value is an example of a code file disposition. Following are the dispositions that
you can specify:
Disposition Effect
GO The object code file is executed but is not saved. If there are syntax
errors, execution does not occur. This is the default disposition if no
disposition is specified in the COMPILE statement.
LIBRARY The object code file is saved but is not executed. If there are syntax
errors, the object code file is not saved.
LIBRARY GO The object code file is saved and also executed. If there are syntax
errors, the object code file is not saved or executed.
SYNTAX The object code file is not saved and not executed. This disposition is
used to check the program for syntax errors only.
Each compiler supports a number of compiler control options. These options control many
different aspects of the compilation. You can include compiler control options in the source
code file. However, you might find it more convenient to specify these options as part of
the COMPILE statement.
The following pages use examples of compiling COBOL85 programs. However, the
options discussed here are also supported by most other compilers. For a description of
the options supported by each compiler, refer to the reference manual for the appropriate
programming language.
Example
COMPILE OBJECT/REPORTGEN WITH COBOL85 LIBRARY;
COMPILER FILE SOURCE(KIND = DISK, TITLE = REPORTGEN);
COMPILER DATA CARD
000000$ SET MERGE FREE ERRLIST
?
Specifies the program source file. This example equates SOURCE instead of CARD
because the CARD file is being used for another purpose.
Supplies the contents of the compiler input file CARD. In this example, CARD is used to
store compiler options.
$ SET MERGE
Instructs the compiler to combine the contents of files CARD and SOURCE. If you do not
set this option, the compiler expects the entire program to be in the CARD file.
FREE ERRLIST
Included to show how multiple options can be set on the same line.
Note: For COBOL85 programs, compiler options should begin in column 7 of the data
deck. For most other languages, such as ALGOL, the options should begin in column 1 or
2.
Uses the FREE option to prevent a COBOL85 syntax error. This error occurs, for example,
if you wrote the program in the Editor and began your program statements in the first
available column of each record. In reality, this is column 7, but in the Editor it is displayed
as the first column of the text field. The COBOL85 compiler expects only compiler options
to begin in column 7; program statements begin in column 8.
A program with statements in column 7 can compile successfully in CANDE, but receives
the following syntax error if you compile it in WFL:
ERROR: 901: SYNTAX ERROR; SYMBOL EXPECTED ----> IDENTIFICATION ***
• By editing the program source in the Editor, and placing a blank character at the start of
the editable part of each record
• By using the FREE option in the WFL job, as shown previously
Compiles a program and produces a printout of the program listing. The program listing is
produced because the LIST option is not specified, and this option defaults to SET.
Any syntax errors are flagged where they occur in the program listing.
Suppresses the program listing. If errors are found, the compiler produces a printout of the
errors only. If there are no errors, then the compiler produces no printout.
ERRLIST
If syntax errors occur, creates a disk file storing the errors. You can use this error file in an
Editor session. First, get the source code file and start Editor. Then use the command
]LOAD E <file name> to load the error file. You can then skip forward to the next error with
the key combination Ctrl85 or the command ]+ERR. You can skip back to the previous
error with Ctrl-75 or ]-ERR.
Specifies a title for the error file. The default title is ERRORS.
$ RESET LIST
Suppresses the program listing and the error listing, if any. The error listing is suppressed
because the ERRLIST option is set, and ERRLIST directs errors to a disk file instead of to a
printer file.
XREFFILES
Produces cross-reference files. You can load these files in the Editor, where they make it
possible to easily locate declarations and references to particular items in the program.
The files are titled
XREF/<source code file name>/DECS
XREF/<source code file name>/REFS
To use these files, get the source code file and start Editor. Then use the command ]LOAD
XREF <source code file name> to load the cross-reference files. You can then use the
command ]DEC <item name> to find the declaration of an item, or ]REF <item name> to
find references to the item.
XREF
Produces a printout of the cross-reference information, stating where various items are
declared and used in the program.
Under Using Compiler Control Options earlier in this section, a number of examples were
given that used a patch file and a source file. However, in these examples the patch file
was equated to a WFL data deck, and this deck was used to store only compiler options. A
patch file could be used instead to store changes to the program statements.
Example
TASK PT;
RUN SYSTEM/PATCH [PT];
FILE TAPE(KIND = DISK, TITLE = REPORTGEN);
FILE PATCH(KIND = DISK, TITLE = PATCH/RP/MERGED);
DATA CARD
$# PATCH INPUT
$.COBOL
000000$SET MERGE FREE
000000$# FIX HEADERS BUG
000000$.FILE PATCH/RP/FIXHEADERS
000000$# NEW FEATURE REQUEST 1
000000$.FILE PATCH/RP/ENHANCE1
?
Uses SYSTEM/PATCH to specify options for the compile and to combine two patches
together. Then compiles the program using the combined patch file,
PATCH/REPORTGEN/MERGED.
IF PT(TASKVALUE) NEQ 1 . . .
Checks whether the SYSTEM/PATCH run was successful. If the run is successful,
SYSTEM/PATCH sets its TASKVALUE to 1.
Explanation of Compilation
• COMPILER FILE CARD(KIND = DISK, TITLE = PATCH/RP/MERGED);
Uses the combined patch created by SYSTEM/PATCH as the patch for the compile.
• COMPILER FILE SOURCE(KIND = DISK, TITLE = REPORTGEN);
Specifies that the source file for the compile is named REPORTGEN.
Uses the COMPILER keyword to specify which file and task equations apply to the
compilation itself, and which apply to the resulting object code file.
Thus, the compiler runs with a PRIORITY setting of 40, and reads the input files specified
by the FILE CARD and FILE SOURCE equations.
The object code file created by the compilation stores the equation for the file PARAMS
and the equation for the task attribute FAMILY. The system applies these equations each
time that object code file is run, unless they are overridden by conflicting equations in the
RUN statement that initiates the program.
Adds a file equation and two task equations to the object code file OBJECT/UPDATE.
These equations provide default values that are used each time the program is run. The
MODIFY statement itself does not actually compile or run the program.
If the object code file already has file or task equations, the equations supplied by the
MODIFY statement are merged with the existing equations. Where conflicts occur, the
equations supplied by MODIFY take precedence over the previous equations.
If the RUN statement supplies conflicting equations, the equations in the RUN statement
take precedence over the equations in the object code file.
IF CT IS COMPILEDOK THEN
COPY OBJECT/DBUPDATE FROM DEVPK(PACK) TO USERPK(PACK)
ELSE ABORT "COMPILATION FAILED";
CT
A task variable. Note the position of this task variable in the COMPILE statement: the task
variable is placed immediately after the compiler name (COBOL85).
CT IS COMPILEDOK
A Boolean expression that returns the value TRUE if the compile was successful.
Work flow management consists of controlling the order, timing, and priorities of the
various jobs that run on the system. The goal of work flow management is to ensure that
the system runs efficiently and gives preference to the most urgent elements of the work
load.
Overall work flow management policies are discussed in the System Administration
Guide. This section introduces the following work flow management features that you can
use in a WFL job:
• Assigning job attributes
• Using job queues
• Selecting a start time
• Running a job on a regular basis
The concept of task attributes was introduced under Using Task Equations. That section
explained how to specify task attributes in a statement that runs a task. To achieve a
similar effect for the WFL job as a whole, you can include a job attribute list at the start of
the job.
The job attribute list can include assignments to any task attributes. Some of the most
useful are the USERCODE, FAMILY, and PRIORITY attributes, which were described in
Section 5.
Assignments in the job attribute list affect the job from the moment it starts running.
However, certain job attributes affect the job even before it starts running, when the job is
being compiled. These attributes are related to work flow management, and are
discussed later in this section.
Format
BEGIN JOB <job name> (<job parameters>);
<job attribute list>
<declarations>
<statements>
END JOB
The job attribute list is positioned after the job name and parameters (if any), but before
any declarations and statements in the job.
Example
BEGIN JOB RUNTRAN (STRING MODE);
FAMILY DISK = SYSPK OTHERWISE DISK;
PRIORITY = 40;
MAXPROCTIME = 360;
CLASS = 2;
STRING MFIX := "MODE = ";
RUN OBJECT/TRAN (MFIX & MODE);
END JOB
By default, the system comes with a single job queue, which is queue 0. However, your
system administrator generally defines a set of job queues that are appropriate to the
needs of your site. The system administrator uses the MQ (Make or Modify Queues)
system command to define job queues.
The system administrator typically defines job queues to group together WFL jobs that
need to run with a similar priority, or that have similar patterns of resource usage.
LIMITS
Limits the admission of WFL jobs to this job queue. For example, suppose the job attribute
list of a WFL job includes the assignment MAXPROCTIME = 300. That job would not be
accepted into this job queue, because the MAXPROCTIME value of the job exceeds the
PROCESSTIME limit for the queue.
DEFAULTS
Specifies default values for job attributes. These defaults can be overridden by statements
in the job attribute list of each job. For example, suppose the job attribute list of a WFL job
does not include any PRIORITY assignment. The job receives a PRIORITY value of 60
because the job queue default for PRIORITY is 60.
MIXLIMIT
One of several job queue attributes that are separate from the DEFAULTS and LIMITS
clauses. The other job queue attributes in this category are FAMILY, TASKLIMIT, and
TURNAROUND.
These system commands define several job queues. Following are the purposes of these
job queues:
Job queue 1
For short jobs that require rapid turnaround. These jobs are permitted an above-average
PRIORITY of 60, but a MIXLIMIT of 2 restricts the number of such jobs that can run at
once. To prevent misuse of this high-priority job queue, a PROCESSTIME limit of 120
seconds is enforced. Anyone who puts a lengthy, processor-intensive job in this queue
will find that the job gets DSed before it completes.
Job queue 2
For medium-length jobs of average urgency. Because the PRIORITY is only average (50),
slightly more jobs are permitted from this queue (MIXLIMIT = 3). A PROCESSTIME limit
of 600 seconds (10 minutes) prevents this queue from being used for truly long jobs.
Job queue 3
For very long jobs that are not especially urgent. These are jobs that might take hours to
run. To enable other work to get done on the system, the PRIORITY is limited to the
below-average value of 40.
A MIXLIMIT of 1 is used to keep multiple jobs of this class from competing with each
other.
Following are the examples of WFL jobs that use this job queue structure.
Specifies that the job should run from job queue 2, and also requests a priority of 55. This
priority is invalid because job queue 2 was defined with a priority limit of 50. Therefore,
the system refuses to place the job in the queue and displays a QDS message.
Does not specify a job queue. The system therefore selects an appropriate queue for the
job. Following are some of the factors that can determine the choice:
• The CLASS usercode attribute, which specifies a default job queue for jobs initiated
under a particular usercode.
• The system default queue, if any. This queue is defined by the DQ (Default Queue)
system command.
• Any resource-related attributes in the job attribute list. These include PRIORITY,
MAXCARDS, MAXIOTIME, MAXLINES, MAXPROCTIME, MAXWAIT, RESOURCE,
SAVEMEMORYLIMIT, TASKLIMIT, and WAITLIMIT. The system tries to find a job
queue whose queue attributes permit the values specified for the job attributes.
For a complete description of how the system selects the job queue, refer to the System
Administration Guide.
Causes the job wait in a job queue until at least 6:00 p.m. However, initiation is not
guaranteed to be exactly at 6:00. The job can be delayed by the queue MIXLIMIT.
Causes the job to wait in a job queue until at least 2:00 p.m.
The start time in the START statement overrides any start time specified in the job
attribute list.
Examples showing the various formats that you can use to assign STARTTIME values.
Note the following rules:
• Times are specified using a 24-hour clock. Thus, 18:00 means 6:00 p.m.
• Dates are specified with the month first, then the day, then the year.
• A plus sign (+) means that the following time or date should be added to the current
time or date. For example, if the current time is 13:00, then +4:00 requests a time of
17:00.
Runs the program OBJECT/DBAUDIT on a daily basis. The job first runs the program. The
START statement then starts a new copy of the job with a STARTTIME of 7:00 a.m. on the
following day.
Runs the program each weekday (Monday through Friday), but not on weekends.
TIMEDATE(DAY)
+ 1, + 2, or + 3
By default, the system executes all the statements in a WFL job one after another, in the
exact order that the statements appear. This section describes all the ways you can
change the order that statements are executed. In particular, this section describes the
following topics:
• BEGIN...END: Grouping statements together
• IF: Making a choice
• CASE: Choosing between many alternatives
• GO TO: Jumping to a statement elsewhere in the job
• WHILE and DO: Repeating statements in loops
• Subroutines: Reusing statements at various points in the job
• WAIT: Interrupting the job temporarily
• ABORT and STOP: Interrupting the job permanently
Groups two or more statements together. These statements are then treated as a single
unit that can be used wherever a single statement is allowed. The BEGIN...END clause is
typically used within other flow-of-control statements, such as IF, CASE, DO, and WHILE.
Executes an action if a test condition is TRUE. Otherwise, skips past that action.
Example
RUN OBJECT/VALIDATE [T];
IF T(TASKVALUE = 1) THEN
BEGIN
PRINT VALID/DATA/=;
REMOVE TEMP/VALIDATE;
END;
Executes a PRINT statement and a REMOVE statement if the task OBJECT/VALIDATE set
its TASKVALUE task attribute to 1.
Rules
The IF statement executes another statement if a particular condition is true. You specify
the condition that should be checked, and the statement that should be executed if the
condition is true.
Test Condition
For descriptions of the various types of conditions that can be tested in an IF statement,
refer to Booleans: Evaluating Truth Conditions in Section 13, Working with Data.
Executes one of two actions, depending on whether the test condition is TRUE or FALSE.
Example
IF FILE TRANS/STATUS IS RESIDENT THEN
RUN OBJECT/TRANS;
ELSE
ABORT "NO FILE TRANS/STATUS";
Checks whether a file is resident, and takes one of two different actions, depending on the
result.
Stringing IF Statements
IF FILE TRANS/STATUS IS RESIDENT THEN
RUN OBJECT/TRANS;
ELSE
IF TRANS/BACKUP IS RESIDENT THEN
BEGIN
RUN OBJECT/TRANS;
FILE SOURCE = TRANS/BACKUP;
REMOVE TRANS/BACKUP;
END;
ELSE
ABORT "NO FILE TRANS/STATUS OR TRANS/BACKUP";
Nesting IF Statements
Incorrect Nesting
IF LENGTH(AXINPUT) GTR 0 THEN
IF TAKE(AXINPUT,1) = "R" THEN
RETRYVAL := TRUE;
ELSE
BADINPUT := TRUE;
One IF statement occurs within another IF statement. At first glance, it might look as if
the ELSE clause goes with the outermost IF statement. However, for nested IF
statements, the WFL compiler matches the first ELSE clause it encounters with the
innermost IF statement. As a result, the BADINPUT assignment is executed only if the
length of AXINPUT is greater than 0 and the first character is not R.
Uses a BEGIN . . . END clause to clearly separate the nested IF statement from the outer
IF statement. The BADINPUT assignment is executed any time AXINPUT has a length of
0.
Uses a null ELSE clause to clearly separate the nested IF statement from the outer IF
statement. The BADINPUT assignment is executed any time AXINPUT has a length of 0.
Example
CASE STYPE OF
BEGIN
("DAILY"): RUN OBJECT/DAILY/UPDATE;
("WEEKLY"): RUN OBJECT/WEEKLY/UPDATE;
("SUMMARY"):
BEGIN
RUN OBJECT/REPORTSUM;
PRINT REPORTSUM/DATA;
END;
ELSE:
ABORT "INVALID INPUT STRING; USE DAILY, WEEKLY, OR SUMMARY";
END;
Runs several programs. For example, if STYPE has the value DAILY, this statement runs
the program OBJECT/DAILY/UPDATE.
STYPE
The case expression, which in this case is a string variable. Integer expressions are also
accepted.
A clause that appears before and after the list of possible actions. (In some WFL
statements, the BEGIN...END clause is optional. The CASE statement is unusual in that it
requires the BEGIN...END clause.)
ELSE
Specifies an action to take if the string has none of the permitted values DAILY, WEEKLY,
or SUMMARY. If you do not include an ELSE clause, and the case expression does not
have one of the permitted values, the system discontinues the job with the error
BAD VALUE FOR CASE EXPRESSION
Case Expression
For descriptions of the various types of expressions that can be tested in a CASE
statement, refer to Numeric Values: Doing Your Arithmetic and Strings: Storing and
Modifying Text in Section 13, Working with Data.
Example
RUN OBJECT/REPORT/PREP [T];
IF T ISNT COMPLETEDOK THEN
GO TO LASTTASK;
RUN OBJECT/REPORT/VALIDATE;
LASTTASK:
RUN OBJECT/REPORT/PRINT;
Skips the second of three tasks if the first task does not complete normally.
The use of GO TO statements is generally a sign of bad programming style. In general, the
more GO TO statements you use, the more difficult the job will be to understand or
maintain. Whenever you are tempted to use a GO TO statement, consider whether it
would be clearer to use another flow-of-control structure instead. For instance, the
preceding example could be expressed more clearly as
RUN OBJECT/REPORT/PREP [T];
IF T IS COMPLETEDOK THEN
RUN OBJECT/REPORT/VALIDATE;
RUN OBJECT/REPORT/PRINT;
If the test condition is TRUE, executes an action repeatedly until the test condition is
FALSE. If the test condition is FALSE at the start, the action is never executed.
Example
WHILE LENGTH(INSTR) GEQ 4 DO
BEGIN
IF TAKE(INSTR,4) = "ACCT" THEN
BEGIN
INSTR := DROP(INSTR,4);
FRONT := FRONT & "ARCH";
END
ELSE
BEGIN
FRONT := FRONT & TAKE(INSTR,1);
INSTR := DROP(INSTR,1);
END;
END;
Searches through the string INSTR and replaces any occurrences of ACCT with ARCH.
The WHILE statement tests the length of INSTR at the start, because there is no point in
checking any further if INSTR is not long enough to contain the phrase ACCT.
Test Condition
For descriptions of the various types of conditions that can be tested in a WHILE
statement, refer to Booleans: Evaluating Truth Conditions in Section 13, Working with
Data.
Executes an action repeatedly until the test condition is TRUE. If the test condition is
FALSE at the start, the action is still executed once.
Example
DO
BEGIN
INITIALIZE(T);
RUN OBJECT/VALIDATE [T];
END
UNTIL T(TASKVALUE) GTR 0;
The INITIALIZE statement is included because the task variable T is being reused. Refer to
Reusing Task Variables in Section 5, Running Tasks.
Test Condition
For descriptions of the various types of conditions that can be tested in a DO statement,
refer to Booleans: Evaluating Truth Conditions in Section 13, Working with Data.
Runs a program exactly four times. The integer variable I is used to keep track of how
many times the program has been run.
This use of the DO statement with an integer variable is the closest WFL equivalent to the
FOR statement provided by some other languages.
Each time a subroutine is invoked, all the statements in the subroutine are executed. Then
execution continues with the statement following the subroutine invocation statement.
The subroutine can be invoked from many different places within the WFL job.
Example
110 BEGIN JOB;
120
130 SUBROUTINE CLEANUP;
140 BEGIN
150 RUN OBJECT/UTIL/TRACK;
160 SECURITY TRACK/OUTPUT PUBLIC IO;
170 COPY TRACK/OUTPUT TO DEVPK(PACK);
180 END;
190
200 RUN OBJECT/VALIDATE;
210 CLEANUP;
220 RUN OBJECT/FORMAT;
230 CLEANUP;
240 RUN OBJECT/REPORT;
250 CLEANUP;
260
270 END JOB
Runs three programs. After running each program, executes the subroutine CLEANUP.
SUBROUTINE CLEANUP
Begins the declaration of the subroutine. Note that a WFL job consists of a series of
declarations, followed by a series of statements. Thus, the subroutine declaration is earlier
in the job than the statements that invoke the subroutine.
CLEANUP
Using Parameters
Rationale
You can use parameters to pass data to a subroutine. The behavior of the subroutine can
be made to vary, depending on the parameters that you pass to it.
Example
BEGIN JOB CUSTOM (STRING INPARAM);
STRING INBUF;
SUBROUTINE REMOVEBLANKS(STRING INSTR);
BEGIN
BOOLEAN DONE;
STRING LEADCHAR,
NEWSTR;
DONE := FALSE;
WHILE NOT DONE DO
BEGIN
LEADCHAR := TAKE(INSTR,1);
IF LEADCHAR NEQ " " THEN
NEWSTR := NEWSTR & LEADCHAR;
IF LENGTH(INSTR) GTR 1 THEN
INSTR := DROP(INSTR,1);
ELSE
DONE := TRUE;
END;
INSTR := NEWSTR;
END REMOVEBLANKS;
INBUF := INPARAM;
REMOVEBLANKS (INBUF);
DISPLAY (INBUF);
RUN OBJECT/REFDATA (INBUF);
END JOB
Uses the subroutine REMOVEBLANKS to delete any blank characters from a string
parameter provided by the operator.
STRING INSTR
The parameter as declared in the subroutine. This is known as the formal parameter.
INSTR := NEWSTR;
Changes the value of the parameter that was passed to the subroutine.
INBUF
The parameter that is passed in the subroutine invocation statement. This parameter is
known as the actual parameter. The subroutine changes this value by removing all blanks
from it.
Exiting Early
SUBROUTINE REPORTER;
BEGIN
TASK T;
RUN OBJECT/PAYROLL/REPORT [T];
IF (T IS COMPLETEDOK) AND
(FILE PAYROLL/NEWMASTER IS RESIDENT) THEN
RETURN;
RUN OBJECT/PAYROLL/RECOVER;
END REPORTER;
Additional Features
WFL subroutines have several capabilities that will be noted here only briefly. For further
information about any of the following features, refer to the WFL Programming Reference
Manual:
• Subroutine parameters can be of type Boolean, integer, real, string, file, or task.
• By default, subroutine parameters are passed by reference. In other words, if the
subroutine changes the value of a parameter, that change is visible to the rest of the
job. To make such changes visible only within the subroutine, add the word VALUE to
the formal parameter declaration.
• You can use the PROCESS <subroutine> statement to initiate a subroutine as an
asynchronous task. This is a task that runs in parallel with the job.
Ends execution of the job. Any remaining statements in the job are never executed.
Example
RUN OBJECT/PREPARE [T1];
IF T1 IS NOT COMPLETEDOK THEN
ABORT "Job aborted due to failure of OBJECT/PREPARE";
RUN OBJECT/SORTDATA [T2];
IF T2 IS NOT COMPLETEDOK THEN
STOP "Job terminated due to failure of OBJECT/SORTDATA";
RUN OBJECT/REPORT;
The ABORT and STOP statements differ only in the termination messages they produce.
• An ABORT statement causes the system to display a PDS termination message,
which is typical of an abnormal termination.
• A STOP statement causes the system to display an EOJ termination message, which
is typical of a normal termination.
Because WFL is specialized for job control, WFL does not contain such elaborate data
manipulation and I/O capabilities as many programming languages. For example, WFL can
neither read from nor write to files.
However, WFL does support several types of data that you can use to control tasks. This
section explains the following topics:
• Variables: Using placeholders for data
• Job parameters: Making your job flexible
• Booleans: Evaluating truth conditions
• Numeric values: Doing your arithmetic
• Strings: Storing and modifying text
This section is not required reading for the beginner. Refer to this section if you are
specifying a value in some WFL statement, and you find yourself unsure of how to create
or specify that value.
All variables must be declared at the start of the job, before the statements begin. A
declaration simply defines the variable so it can be used.
Example
BEGIN JOB;
BOOLEAN B1,
B2 := TRUE;
INTEGER INT1 := 16,
INT2 := 23;
REAL R1 := 3.6,
R2;
STRING STR := "STANDARD";
IF B2 THEN
RUN (ICS)OBJECT/DBREPORT (INT1, R1, STR);
END JOB
Data Types
Multiple Declarations
INTEGER INT1,
INT2;
A single declaration can declare multiple variables, which must be separated by commas.
You can specify initial values different from the defaults in the declaration.
Assigning Values
INTEGER INT1, INT2;
.
.
.
INT1 := INT2 * 3;
You can use assignment statements to change the value of a variable at any point in the
job. The assignment operator (:=) assigns the value on the right to the variable on the left.
For example, if INT2 has the value 4, then the preceding statement multiplies 4 by 3 to get
12, and assigns the result to the variable INT1.
END JOB
Accepts several job parameters that the operator can specify in the START statement. The
job then uses the parameter values to specify various parts of a RUN statement. Because
the parameter values are specified by the operator at run-time, they make it possible for a
single job to have many different effects.
NOLIST
Indicates that the value of the parameter is to be suppressed from the job summary, the
SQ (Show Queue) response, the analysis of the beginning-of-job log record in the job
summary, and by LOGANALYZER.
OPTIONAL
Indicates a parameter that is not required in the START statement. If the parameter is
omitted, the job uses the default value for that data type (FALSE for Booleans, 0 for
integers or reals, ″″ for strings).
DEFAULT = <value>
Supplies an initial value for an optional parameter. This value is used only if the START
statement omits the parameter. You can use the DEFAULT clause if you want the default
to be different from the default for that data type. The example provides a default of 1 for
an integer parameter, which would otherwise default to 0.
Initiates the previous example and provides values for each of the parameters.
Supply the first and last parameters only. These examples show two different ways of
omitting selected optional parameters:
• Specifying only a comma for each omitted parameter
• Skipping parameters and specifying the next parameter by name, such as TVAL
For instructions on using Boolean expressions to check whether a file is present, refer to
Determining if a File Is Resident in Section 6, Managing Files.
Two forms of the task state expression, which returns information about the current state
of a task. Possible values of the task state are as follows:
SCHEDULED The task has not yet been initiated by the system.
ACTIVE The task is currently running.
STOPPED The task was stopped by the operator, suspended by the system, or
programmatically suspended.
INUSE The task is SCHEDULED, ACTIVE, or STOPPED.
COMPLETED The task was initiated and has terminated.
COMPLETEDOK The task is completed and was terminated without faulting or being
discontinued.
For examples that use the task state expression, refer to Checking Whether a Task
Completed Successfully and Waiting for Changes in Task Status in Section 5, Running
Tasks.
Preliminaries
FILE G(KIND=DISK,NEWFILE=FALSE,DEPENDENTSPECS=TRUE,
TITLE=TEMP/UTIL ON DCON);
OPEN(G);
You must declare and open the file before checking any file attribute values.
Comparing Values
You can compare strings with strings, numeric values with numeric values, or Boolean
values with Boolean values. You can also build complex combinations of comparisons.
The following table shows the keywords you can use to compare or modify values in a
Boolean expression:
EQL, = Equal to
Boolean Comparison
IF BOOL1 AND NOT BOOL2 THEN ...
Numeric Comparison
IF I LSS 43 THEN ...
String Comparison
IF STR1 = "CLEANUP" THEN ...
Uses sets of parentheses to indicate the order in which the complex expression should be
evaluated. The innermost expressions are evaluated first.
Suppose that the file REMINDERS/INPUT is resident, the date is not Friday, and the job
usercode is JHIGGS. In this case, the expression evaluates as
(TRUE OR FALSE) AND TRUE
Then as
TRUE AND TRUE
Then as
TRUE
You can generally use real expressions and integer expressions interchangeably in WFL.
For example, you can assign an integer value to a real variable, or a real value to an integer
variable.
Notes:
• The fractional part of a real value is truncated when you assign that value to an integer.
Truncation always reduces the real value to the integer with the next lowest absolute
value. For example, 5.76 truncates to 5, and -5.76 truncates to -5.
• Real variables can store much greater values than integer variables can. If you assign a
real variable to an integer variable and the real variable has a value higher than
549755813887, then the fatal error INTEGER OVERFLOW occurs.
Numeric Operators
Following are the operators you can use to modify numeric values.
Operator Effect
Performs a complex computation. RVAL1, RVAL2, RVAL3, and RVAL4 are all real variables.
The expression yields drastically different results, depending on whether you use
parentheses.
The first assignment to RVAL4 has no parentheses. The system therefore evaluates the
expression using a default order of evaluation. In this order, multiplication and division are
always performed before addition or subtraction. The expression is thus treated as 2 +
0.375 – 16, or 2.375 – 16, or –13.625.
Combining Strings
STR1 := "REPORT";
STR2 := "SUM";
STR3 := STR1 & STR2;
Assigns STR3 the value REPORTSUM using the ampersand (&) operator, which attaches
one string to the end of another string.
Many WFL statements need to specify file titles, including common statements such as
RUN, COPY, CHANGE, and REMOVE.
For each of these statements, you can use constants and/or string expressions to specify
the file titles. Constants are useful for file titles that will be the same each time the job is
run. String expressions make it possible for a statement to affect different files each time
the job is run.
Using Constants
RUN OBJECT/DBUPDATE;
FILE SOURCE = (DBCON)CUST/DATA;
Using Strings
BEGIN JOB DBUPDATE (STRING FNAME);
JOBSUMMARY = SUPPRESSED;
RUN OBJECT/DBUPDATE;
FILE OPTIONS = TRANS/OPT ON DEVPK;
FILE SOURCE = #FNAME;
END JOB
Uses a string-valued job parameter to supply a file name and part of another file name. For
example, if the parameter has the value ″SEPT/REPORTS″, then file SOURCE is equated
to ″SEPT/REPORTS″.
Note that the string variable name must be preceded by a number sign (#). If the number
sign in this example were omitted, the title of the file SOURCE would be changed to
″FNAME″.
The COPY statement uses a combination of a string value and constants to specify a
filename such as ″LOG/SEPT/REPORTS/OUT″. You can use string expressions in this way
to replace any portion of a file title.
Uses several string operators to build a string that contains the value ″*CONFIG/LOGS/=
ON DEVPK″. These operators are particularly suited to building file titles:
• *
Prefixes a string with an asterisk, which signifies the null usercode.
• /
Modifying a String
WFL provides the following functions for selecting parts of a string:
Form Purpose
HEAD ( <string>, <character set>) Returns all leading characters in the string that
belong to the character set
TAIL ( <string>, <character set> ) Returns the part of the string that would not be
returned by a HEAD function with the same
parameters
TAKE ( <string>, <number> ) Returns the specified number of characters
from the start of the string
DROP ( <string>, <number> ) Returns the part of the string that would not be
returned by a TAKE function with the same
parameters
UPPERCASE (<string expression>) Converts the string expression to uppercase
characters.
LOWERCASE (<string expression>) Converts the string expression to lowercase
characters.
You can use various combinations of these functions to select any portion of a string that
you want. However, the actual use of these functions can quickly become complicated.
The following pages demonstrate how to combine these features to accomplish the
following tasks:
• Removing blanks
• Removing leading and trailing blanks
• Replacing a target within the string
• Parsing a file title
• Parsing a family task attribute
• Converting a string to uppercase or lowercase characters
• Converting between strings and numbers
Removing Blanks
SUBROUTINE REMOVEBLANKS(STRING INPUTSTR);
BEGIN
STRING FRONT, % All nonblank chars get copied into this string
MID; % Buffer for storing single characters
WHILE LENGTH(INPUTSTR) GTR 0 DO
BEGIN
MID := TAKE(INPUTSTR,1);
IF MID NEQ " " THEN
FRONT := FRONT & MID;
INPUTSTR := DROP(INPUTSTR,1);
END;
INPUTSTR := FRONT;
END REMOVEBLANKS;
Explanation
As the subroutine progresses, the string FRONT gets longer and the string INPUTSTR
gets shorter. When INPUTSTR is empty, the contents of FRONT are copied back into
INPUTSTR.
After REMOVELEAD and REMOVETRAIL have run, TESTSTR has the value
"(ACCT) TEST / DATA"
ELSE
BEGIN
FRONT := FRONT & TAKE(INSTR,1);
INSTR := DROP(INSTR,1);
END;
END;
% Update INSTR to reflect replacements
INSTR := FRONT & INSTR;
END;
Searches a string for occurrences of a text target, and replaces any such occurrences with
specific replacement text.
After REMOVEBLANKS runs, TESTSTR has the value ″The Quick Brown Kittens″. The
target ″dog″ matches the text ″Dog″ because the search is not case-sensitive.
After REMOVEBLANKS runs, TESTSTR has the value ″The Quick Brown Dogs″. The target
″dog″ does not match the text ″Dog″ because the search is casesensitive.
Explanation
• INSTR
The larger string that is to be searched for the target text.
• TARGET
The target text that is searched for.
• REPLACEMENT
The text to replace the target text with.
• CASED
The mode of comparison to use: case-sensitive or case-insensitive.
The following pages show how to extract the usercode, file name, or family name from a
file title.
Assumptions
For these subroutines to work correctly, the file title that is passed to them must follow
valid file title syntax.
Explanation
REMOVELEAD
Remove leading and trailing blanks from a string. Refer to “Removing Leading and Trailing
Blanks” earlier in this section.
DONE := FALSE;
TLEN := LENGTH(TITLEBUF);
WHILE NOT DONE DO % To extract last word,
BEGIN % scan backward for blanks
% Check length of remainder first; if a file title includes
% a family, the remainder must be at least 4 char
% E.g. "A ON B" minus the family name is "A ON"
IF TLEN GTR 4 THEN
BEGIN
LASTCHAR := DROP(TITLEBUF, TLEN - 1); % Look at last char
IF LASTCHAR NEQ " " THEN % Remove char from title and
BEGIN % add it to FAM string instead
FAM := LASTCHAR & FAM;
TITLEBUF := TAKE(TITLEBUF, TLEN - 1);
TLEN := TLEN - 1;
END
ELSE DONE := TRUE % We hit a blank, found start of family
END
ELSE % Remainder is 4 char or less; this title does not
BEGIN % include a family name
DONE := TRUE;
FAM := "";
END;
END;
REMOVETRAIL (TITLEBUF); % Remove trailing blanks again
% Check for ON statement
TLEN := LENGTH(TITLEBUF);
IF TLEN LSS 3 THEN % No room for ON statement
FAM := ""
ELSE IF DROP(TITLEBUF, TLEN - 3) NEQ " ON" THEN
FAM := "";
ELSE IF LENGTH(TAIL(FAM, ALPHA)) NEQ 0 THEN
FAM := ""; % There are illegal characters in family name
ELSE % Ensure there is a file name before ON
BEGIN
TITLEBUF := TAKE(TITLEBUF, TLEN - 3);
TEST := HEAD(TITLEBUF, NOT " ");
IF TEST = "" THEN
FAM := "";
END;
END;
Extracts the family name from a file title. If there is no family name, returns a null string as
the family name.
Explanation
REMOVELEAD, REMOVETRAIL
Remove leading and trailing blanks from a string. Refer to “Removing Leading and Trailing
Blanks” earlier in this section.
TITLEBUF := TITLE;
TITLEBUF := UPPERCASE (TITLEBUF); % Uppercase the title
IF LENGTH(TITLEBUF) = 0 THEN % Check for empty title
BEGIN
UC := "";
RETURN;
END;
REMOVELEAD (TITLEBUF); % Remove leading blanks
CASE TAKE(TITLEBUF,1) OF % Check leading char
BEGIN
("*"): UC := "*"; % Nonusercoded file
("("): % File has usercode
BEGIN
TITLEBUF := DROP(TITLEBUF,1);
UC := HEAD(TITLEBUF, NOT ")");
IF UC = TITLEBUF THEN % Means there was no ")"
Examines a file title and returns the middle part, which does not include the usercode or
family name.
Explanation
• REMOVELEAD and REMOVETRAIL
Remove leading and trailing blanks from a string. Refer to “Removing Leading and
Trailing Blanks” earlier in this section.
• FINDUSER
Returns the usercode part of a file title. Refer to “Extracting the Usercode” earlier in
this section.
• FINDFAM
Returns the family part of a file title. Refer to “Extracting the Family Name” earlier in
this section.
For an introduction to the FAMILY task attribute, refer to Equating the Family Statement in
Section 5, Running Tasks.
In some cases you might want to analyze the FAMILY value of the job or of a task. You can
use the resulting information to build a new FAMILY value that will ensure that the job or
task can use all the files it needs to.
The following pages explain how to extract the target family, primary family, and alternate
family from a family statement.
Assumptions
For these subroutines to work correctly, the FAMILY value that is passed to them must
follow valid syntax.
Explanation
Remove leading and trailing blanks from a string. Refer to “Removing Leading and Trailing
Blanks” earlier in this section.
Explanation
REMOVELEAD
Removes leading blanks from a string. Refer to “Removing Leading and Trailing Blanks”
earlier in this section.
There is no secondary family. Therefore, after FINDALT runs, TESTSTR is a null string (″″).
Explanation
Remove leading or trailing blanks from a string. Refer to “Removing Leading and Trailing
Blanks” earlier in this section.
Examples
Use the STRING function to convert an integer or real value to a string. Note that
• If you convert a real value, the fractional part is rounded off to the nearest integer.
• If the value is negative, it is converted to positive.
You can design a WFL job to display information to an operator or accept information from
an operator.
Note: Your operators probably do not want to spend their whole day reading and
responding to WFL job messages. Further, operator input is subject to typographical
errors. For these reasons, it is best to use the features in this section sparingly.
DISPLAY
Note that on a busy system, many system messages appear each minute. There is no
guarantee that the DISPLAY message will stand out enough to be noticed by an operator.
DISPLAYONLYTOMCS = TRUE
If the job is started from a CANDE session, this attribute causes DISPLAY messages to
appear only in the originating CANDE session, and not at an ODT. (If the job is started from
an ODT, the DISPLAYONLYTOMCS value is ignored and DISPLAY messages do appear at
an ODT.) Use this attribute if you expect the job to be started from CANDE and you believe
the DISPLAY messages will interest only the person who started the job.
Stores information that an operator can display at any time with the IB (Instruction Block)
system command.
For example, if the WFL job has mix number 7645, the following command displays the
most recent instruction block:
7645 IB
If the WFL job has mix number 7645, the following command displays instruction block
number 2:
7645 IB 2
The advantage of instruction blocks is that they remain available to the operator as long as
the WFL job is running. The disadvantage of instruction blocks is that nothing prompts the
operator to use the IB command. The operator has to know in advance that instruction
blocks exist for a particular WFL job.
Prevents a job from running until the operator acknowledges the presence of the FETCH
specification. The job appears in the waiting entries display with the message
REQUIRES FETCH, QUEUE = <queue number>
The operator can use a command of the following form to display the FETCH specification:
<mix number> PF
The operator can use a command of the following form to cause the job to be initiated:
<mix number> OK
If the system option NOFETCH is set, then the system does not suspend jobs with
FETCH specifications. However, an operator can still use the PF command to display
FETCH specifications. An operator can set or reset the NOFETCH system option with the
OP (Options) system command.
Displays a message and then waits for the operator to enter a HI command. If the mix
number of the job is 9477, the HI command is of the following form:
9477 HI
Note that the job will also resume if any task of the job changes status.
While the job is waiting, it does not appear in the waiting entries display. That is why this
example uses a DISPLAY message to attract the operator’s attention.
Waits for the operator to supply a TASKVALUE. For example, if the mix number of the job
is 1164, an operator could enter a command such as the following:
1164 HI 3
The number after the HI is an assignment to the TASKVALUE task attribute. The WHILE
statement is structured to make the job resume waiting if no TASKVALUE assignment
was entered. For example, if a task of the job changes status, the job momentarily
becomes active but then returns to a waiting state.
Once the job has definitely awakened, it can make decisions based on the TASKVALUE
that was entered by the operator.
Suspends the job and waits for operator input. The job appears in the waiting entries
display with the message
ACCEPT:Enter AX BRIEF or AX LONG.
If the mix number of the job is 8364, the operator can restart the job with a command such
as the following:
8364 AX BRIEF
Waits until the operator sets the Boolean task attribute SW1 to TRUE. If the mix number
of the job is 4875, the operator can make this assignment with the following command:
4875 SW1 TRUE
Note that the job might take several seconds before it notices the new SW1 value and
resumes execution.
The task attributes from SW1 through SW8 all work in the same way.
To understand whether a job can perform a particular action on a file, you must first
understand:
• The security restrictions applying to the particular file
• The privileges of the job
• This section presents a brief introduction to the security features available to WFL
jobs.
Default Usercode
If you log on to MARC or CANDE under a usercode, that usercode becomes the default
usercode for any files that you create. Similarly, if a WFL job runs under a usercode, then
files created by that job default to that usercode.
Default SECURITYTYPE
By default, files are created with SECURITYTYPE = PRIVATE. This means that the files can
be accessed only by users who have the same usercode as the file or who are privileged.
Nonusercoded Files
Files that begin with an asterisk (*) instead of a usercode are referred to as nonusercoded
files. These files have unusual properties because they are intended for use by many
different users or by the operating system. Thus,
• On a typically configured system, nonusercoded files have a default SECURITYTYPE
of PUBLIC and SECURITYUSE of IO. This default ensures that anyone can read or
execute these files.
• However, only privileged or nonusercoded processes can create or write to
nonusercoded files.
Changes the security of the specified file. PUBLIC IO is only one of several possible
security settings, of which the following are the most useful:
• PUBLIC IO
Makes the specified file available to anyone, for reading, writing, or execution.
• PUBLIC IN
Makes the specified file available to anyone, for reading or execution.
• PUBLIC SECURED
Makes the specified file available to anyone, for execution only. This setting is
intended for object code files.
• PRIVATE
Restricts the file to those users who have the same usercode as the file or who are
privileged.
The SECURITY statement has many additional options, which are described in detail in the
WFL Programming Reference Manual.
The following discussion makes a number of references to usercodes with various types
of privileged status. Such privileges are assigned by the security administrator; refer to the
I for details.
COPY or ADD
To ensure that you can copy any files, regardless of their usercode or security attributes,
do any of the following:
• Submit the copy request from an ODT, without any usercode.
• Submit the copy request from a usercode that has PU status or LOCALCOPY status.
CHANGE
To ensure that you can change the titles of any files, regardless of their usercode or
security attributes, do any of the following:
• Enter the CHANGE statement as a single statement at an ODT.
• Submit the change request from a usercode that has PU status or CHANGE status.
REMOVE
To ensure that you can remove any files, regardless of their usercode or security
attributes, do any of the following:
• Enter the REMOVE statement as a single statement at an ODT.
• Submit the REMOVE statement from a usercode that has PU status or REMOVE
status.
RUN
To ensure that you can run any program, regardless of its usercode or security attributes,
submit the RUN request from a usercode that has PU status or EXECUTE status.
Note that the RUN statement does not receive any special privileges from being
submitted from an ODT.
START
To ensure that you can start any WFL job, regardless of its usercode or security attributes,
do any of the following:
• Enter the START statement as a single statement at an ODT.
• Submit the START request from a usercode that has PU status or READ status. Note
that EXECUTE status has no effect on the START statement.
You can use WFL functions to find out the current date and time, or to find out information
about the system where the job is running.
The following table shows examples of date and time formats and identifies the
TIMEDATE parameter to use for each format. The examples reflect a current date of
February 11, 1998 and a current time of 18 seconds after 2:43 p.m.
Hostname
IF MYSELF(HOSTNAME) = "ATHENS" THEN
MYSELF(FAMILY DISK = MFC OTHERWISE DISK);
Changes the FAMILY statement for the job if the job is being run on the host named
ATHENS.
Serial Number
COPY *SUMLOG/ #SYSTEM(SERIALNUMBER) /091898/=
FROM PACK(PACK) TO OPS(PACK);
Copies all system log files on family PACK that were released on the date September 18,
1998. This statement uses the SYSTEM(SERIALNUMBER) function because titles of
released log files have the following form:
SUMLOG/<system serial number>/<date>/<log number>
System Type
CASE SYSTEM(TYPE) OF
BEGIN
("A18"): COPY *OBJECT/A18/REPGEN AS *OBJECT/REPGEN
FROM PACK(PACK,HOSTNAME=MPA15C) TO DISK(PACK);
ELSE: COPY *OBJECT/DEFAULT/REPGEN AS *OBJECT/REPGEN
FROM PACK(PACK,HOSTNAME=MPA15C) TO DISK(PACK);
END;
Chooses a particular file to copy to the local host, depending on the type of system the
current host is. In this example, it is assumed that there are several different versions of
the program REPGEN. Each version was compiled with the TARGET compiler option set
to optimize the program for a particular type of system. The example checks the system
type of the local host to decide which version of the program to copy.
MCP Level
CASE TAKE(SYSTEM(MCPLEVEL),4) OF
BEGIN
("44.1"): COPY *OBJECT/441/REPGEN AS *OBJECT/REPGEN
FROM PACK(PACK,HOSTNAME=MPA15C) TO DISK(PACK);
ELSE: COPY *OBJECT/DEFAULT/REPGEN AS *OBJECT/REPGEN
FROM PACK(PACK,HOSTNAME=MPA15C) TO DISK(PACK);
END;
Chooses a particular file to copy to the local host, depending on the MCP level of the
current host. In this example, it is assumed that there are several different versions of the
program REPGEN. Each version was compiled under a different MCP level. The example
checks the system type of the local host to decide which version of the program to copy.
WFL jobs automatically restart after being interrupted by a system halt/load or a RESTART
(Restart Jobs) system command. This section introduces the following topics related to
job restarts:
• Understanding where jobs restart
• Restoring attribute values
• Restarting copies
• Aborting the job on restart
For a more detailed discussion of job restarts, refer to the Task Management
Programming Guide.
After a halt/load, the system recovers any WFL jobs that were in progress and inserts
them in job queues again. When a job is selected from a queue, the job resumes
execution from the last point in the job where a successful job rollout was taken. A job
rollout stores information that helps in restarting the job. The system attempts a job rollout
before each task initiation statement (such as COMPILE, COPY, PROCESS, and RUN) as
well as before or after certain other statements.
Variables and job parameters retain their values across a halt/load. However, values
assigned to a task or file attribute outside the declaration are lost. You can use the ON
RESTART statement to restore task or file attribute values or to take other actions
immediately following a halt/load.
Example
100 BEGIN JOB RUNUPDATES;
110
120 TASK T1(PRIORITY = 60);
130
140 SUBROUTINE INIT;
145 BEGIN
150 IF TIMEDATE(DAY) = "FRIDAY" THEN
160 T1(TASKVALUE = 1);
165 END;
170
180 ON RESTART,
185 BEGIN
190 INIT;
195 END;
200
210 INIT;
220
230 RUN OBJECT/DB/UPDATE [T1];
240
250 RUN OBJECT/INTEREST/CALC;
260 FILE SOURCE = CUST/BALANCES ON ACCT;
270
280 END JOB
Explanation
If the halt/load occurs while the task OBJECT/DB/UPDATE is running, then after the
halt/load
• The ON RESTART statement invokes subroutine INIT.
• The job restarts at line 230 and runs OBJECT/DB/UPDATE again.
• The job continues to line 250 and runs OBJECT/INTEREST/CALC.
If the halt/load occurs while the task OBJECT/INTEREST/CALC is running, then after the
halt/load
• The ON RESTART statement invokes subroutine INIT.
• The job restarts at line 250 and runs OBJECT/INTEREST/CALC again.
Restarting Copies
Suppose a COPY statement is copying files between hosts, and a halt/load occurs. After
the halt/load, the WFL job restarts and the copy request is resubmitted. There is a risk that
the copy request may resume before the networking software and connections are
reestablished. If this problem occurs, the copy request fails. To learn how to prevent this
problem, refer to “Ensuring the Hosts Are Available” in Section 7, Copying Files.
Aborts the job if it is interrupted by a halt/load. This action is appropriate if the job runs
tasks that cannot be restarted safely. For example, suppose that OBJECT/PAYROLL prints
paychecks. After OBJECT/PAYROLL has printed half the paychecks, a halt/load occurs. By
default, the WFL job restarts OBJECT/PAYROLL from scratch after the halt/load. As a
result, OBJECT/PAYROLL prints some paychecks a second time and those employees
effectively receive twice their normal pay
Rules
When you create a WFL job, find out whether its tasks can safely be restarted. Take
precautions to prevent restarts if necessary.
WFL jobs are rarely perfect when you first create them. After you write a WFL job, you
typically must spend some time correcting errors in the job. This process is referred to as
debugging . The following topics introduce basic techniques that will help you to debug
syntax errors and run-time errors.
Compiles the job INTEG/JOB and displays messages indicating if there are any syntax
errors. However, the SYNTAX option keeps the job from actually being executed, even if it
compiles without error.
If you use the SYNTAX option, you do not need to include any job parameters, even if the
job would normally require them.
00018000
00020000 END JOB
Syntax Errors
START INTEG/JOB SYNTAX
#RUNNING 5562
6000 FAM := FILE INTEG/INPUT IS RESIDENT;
*
ERROR: UNDECLARED IDENTIFIER
10000 IF NOT FAM AND PARAM NEQ "" THEN
*
ERROR: UNDECLARED IDENTIFIER
10000 IF NOT FAM AND PARAM NEQ "" THEN
*
ERROR: BOOLEAN EXPRESSION EXPECTED
#SNTX
Starts a job for syntax checking in CANDE. The resulting messages describe three syntax
errors. Each syntax error description is three lines long, and has the following format:
<line number> <line text>
<asterisk marking error position>
ERROR: <error name>
You could correct this error by adding the following declaration to the job:
5000 BOOLEAN FAM;
You fixed only the first syntax error, but all three syntax errors went away. The fact is that
all three errors were really the result of a single problem. The undeclared identifier FAM
was used at both line 6000 and line 10000.
Further, two different errors resulted at line 10000. The error UNDECLARED IDENTIFIER
is straightforward. The second error, BOOLEAN EXPRESSION EXPECTED, results
because FAM was used within a larger Boolean expression.
Note: It is rarely worthwhile to try to correct all syntax errors at one time. Instead, fix the
first syntax error and any others that you understand, then submit the job again. The new
set of syntax messages might be much shorter than the original one.
The WFL compiler reports an error when it encounters something that is syntactically
invalid. However, the actual cause of the error might be a mistake made much earlier in
the job. The following example illustrates this problem.
Example Job
00000100 BEGIN JOB DBDATA/JOB(STRING PARAM);
00000110
00000120 SUBROUTINE OUTERBLANKS(STRING TYPEVAL);
00000130 % This subroutine removes leading and trailing blanks
00000140 % from a string, but not embedded blanks (in case we
00000150 % someday want to allow a file title as a value)
00000160 BEGIN
00000170 BOOLEAN DONE;
00000180 STRING FRONT, BACK;
00000190 DONE := FALSE;
00000200 WHILE NOT DONE DO % Remove leading blanks
00000210 BEGIN
00000220 IF LENGTH(TYPEVAL) GTR 0 THEN
00000230 IF TAKE(TYPEVAL,1) = " " THEN
00000240 TYPEVAL := DROP(TYPEVAL,1)
00000250 ELSE DONE := TRUE
00000260 ELSE DONE := TRUE;
00000270 DONE := FALSE;
00000280 WHILE NOT DONE DO % Remove trailing blanks
00000290 BEGIN
00000300 IF LENGTH(TYPEVAL) GTR 0 THEN
00000310 IF DROP(TYPEVAL,LENGTH(TYPEVAL) - 1) = " " THEN
00000320 TYPEVAL := TAKE(TYPEVAL,LENGTH(TYPEVAL) - 1)
00000330 ELSE DONE := TRUE
00000340 ELSE DONE := TRUE;
00000350 END;
00000360 END OUTERBLANKS;
00000370
00000380 STRING PARAMBUF;
00000390
00000400 PARAMBUF := PARAM;
00000410 OUTERBLANKS (PARAMBUF);
00000420
00000430 RUN OBJECT/DBDATAGEN (PARAMBUF);
00000440
00000450 END JOB
Syntax Errors
START DBDATA/JOB SYNTAX
#RUNNING 5584
360 END OUTERBLANKS;
*
ERROR: END OF STATEMENT EXPECTED
380 STRING PARAMBUF;
*
ERROR: A STATEMENT CANNOT BEGIN WITH THIS
400 PARAMBUF := PARAM;
*
ERROR: UNDECLARED IDENTIFIER
410 OUTERBLANKS (PARAMBUF);
*
ERROR: UNDECLARED IDENTIFIER
410 OUTERBLANKS (PARAMBUF);
*
ERROR: STRING EXPRESSION EXPECTED
430 RUN OBJECT/DBDATAGEN (PARAMBUF);
*
ERROR: UNDECLARED IDENTIFIER
***** ERROR LIMIT EXCEEDED, COMPILATION ABORTED *****
#SNTX
Explanation
Reports a number of errors. You should begin by concentrating on the first error listed:
END OF STATEMENT EXPECTED.
The problem is a missing END clause. For every BEGIN clause, there must be a matching
END clause. Because BEGIN...END pairs can be nested within each other, the compiler
has no way of knowing which END clause you forgot to put in. The error is reported
relative to line 360 because the subroutine terminates there, and an END was omitted
somewhere in that subroutine.
This type of problem is easy to solve if you properly format your job. The example shows
good formatting practice. The matching BEGIN and END clauses are each indented the
same amount. The BEGIN at line 290 and the END at line 350 begin in the same column.
But the BEGIN clause at line 210 does not have an END clause to match it. You can fix the
error by adding an END clause between lines 260 and 270.
If you fix the error and start the job again, you will find that all the other syntax errors have
gone away. They were side-effects of the missing END clause.
Runs the programs OBJECT/DATA/PREP and OBJECT/REPGEN. The job accepts a single
parameter, and removes leading blanks from the parameter before passing the value to
OBJECT/REPGEN.
Run-Time Errors
START REPORT/JOB("TERSE")
#UPDATING
#RUNNING 6811
#JOB 6812 IN QUEUE 2
#
#6812 BOJ REPORT/JOB
#6812\6813 BOT (ICS)OBJECT/DATA/PREP ON SERV
#6812\6813 EOT (ICS) (ICS)OBJECT/DATA/PREP ON SERV
Starts a job in CANDE, and displays the resulting run-time error. The method of displaying
job messages depends on whether you started the job from CANDE, MARC, Operations
Center, or the ODT. For details, refer to Section 3, Submitting WFL Statements and Jobs.
Note: CANDE displays WFL messages if the CANDE session option MSG is set. If you
are not seeing these messages, try entering the command SO MSG . This command
affects only the current CANDE session. To set the MSG option permanently, ask your
system administrator to set the CANDEGETMSG attribute for your usercode.
Data-Dependent Errors
Rationale
A WFL job might run successfully on one occasion, but commit an error on another
occasion. The differences result because the same job might be processing different data
on different occasions. Consider the job in the previous example, Using Job Messages. If
you start that job with a null parameter (″″) or a parameter containing only blanks (″ ″), a
new type of error results, as shown in the following example.
Example
START REPORT/JOB (" ")
#RUNNING 6842
#JOB 6843 IN QUEUE 2
#
#6843 BOJ DBDATA/JOB
#6843 BAD PARAMETER VALUE FOR 'TAKE' FUNCTION @ (00000230)
#6843\6843 P-DS (JOSEPH) JOB DBDATA/JOB
At line 230 in the job, you will find the following TAKE function:
00000230 IF TAKE(PARAMBUF,1) = " " THEN
This function returns the first character of the string PARAMBUF. If PARAMBUF contains
at least one character, no error occurs. However, if the string PARAMBUF is empty, there
is no first character to return and an error results.
Before using the TAKE function or the DROP function, you should generally check the
length of the string. You can fix the problem in this job by adding the two statements
highlighted in the following example:
00000200 WHILE NOT DONE DO % Remove leading blanks
00000210 BEGIN
00000220 IF LENGTH(PARAMBUF) GTR 0 THEN
00000230 IF TAKE(PARAMBUF,1) = " " THEN
00000240 PARAMBUF := DROP(PARAMBUF,1)
00000250 ELSE DONE := TRUE;
00000260 ELSE DONE := TRUE;
00000400 END;
One of the basic techniques for debugging any program is to display the values of
variables at various points during execution. To begin with, you should find out which
variables are used in the statement that causes the error. You should then arrange to
display the values immediately before the statement that causes the error.
The Test and Debug System (TADS) exists to perform this type of task for a number of
different programming languages. However, TADS is not available for debugging WFL
jobs. To get a similar effect in WFL, you can include DISPLAY statements to display the
value of variables.
The following example is based on the example in Using Job Messages except that a
DISPLAY message is added.
Example Job
00000100 BEGIN JOB DBDATA/JOB(STRING PARAM);
00000110
00000120 BOOLEAN DONE := FALSE;
00000130 STRING PARAMBUF, FRONT, BACK;
00000140
00000150 PARAMBUF := PARAM;
00000160
00000200 WHILE NOT DONE DO % Remove leading blanks
00000210 BEGIN
00000215 DISPLAY PARAMBUF;
00000230 IF TAKE(PARAMBUF,1) = " " THEN
00000240 PARAMBUF := DROP(PARAMBUF,1)
00000250 ELSE DONE := TRUE;
00000400 END;
00000420
00000422 RUN OBJECT/DATA/PREP;
00000424
00000430 RUN OBJECT/REPGEN (PARAMBUF);
00000440
00000450 END JOB
Run-Time Messages
START (" ")
#RUNNING 6859
#JOB 6860 IN QUEUE 2
#
#6860 BOJ DBDATA/JOB
#6860 DISPLAY: .
#6860 DISPLAY: .
#6860 DISPLAY:.
#6860 BAD PARAMETER VALUE FOR 'TAKE' FUNCTION @ (00000230)
#6860\6860 P-DS (JOSEPH) JOB DBDATA/JOB
The DISPLAY statement shows the value of the PARAMBUF variable each time the
WHILE statement repeats itself. (Note that DISPLAY appends a period (.) to any value that
it displays.) Thus, these messages show that PARAMBUF started out as a string of two
blanks, then a string with one blank, then an empty string. Then the error occurred.
You might therefore guess that the problem is caused by the string being empty. In this
case, that guess would be correct. The TAKE function could not handle an empty string.
The job summary is a printout that records the major events in the execution of a job. If
you are not able to watch the job messages while the job is running, you can sometimes
figure out problems by looking at the job summary later.
W O R K F L O W S T A T E M E N T S
J O B S U M M A R Y
By default, the job summary is preceded by a section labeled “Work Flow Statements.”
This section lists the complete text of the WFL job, as well as the values of any
parameters passed to it.
If you don’t want the Work Flow Statements listing, you can suppress it by including the
compiler option $RESET LIST in the job.
This statement in the WFL job requests printing of a job summary. The following are the
possible values for JOBSUMMARY:
• UNCONDITIONAL
Always print a job summary.
• CONDITIONAL
Print a job summary if a job or task terminates abnormally, or if there are syntax errors
or printer backup files.
• ABORTONLY
Print a job summary only if a job or a task terminates abnormally.
• SUPPRESSED
Never print a job summary.
• DEFAULT
Use system-level defaults to decide whether to print a job summary.
The job summary typically contains entries recording the initiation and termination of the
WFL job and its tasks. The messages BOJ and EOJ indicate a normal “Beginning of Job”
and “End of Job.” The message BOT and EOT indicate normal “Beginning of Task” and
“End of Task.”
If the job or a task terminates abnormally, the EOJ or EOT message is replaced by a DS
message. There are a number of possible DS messages. For example, PDS and F-DS
indicate that the process committed an error of some kind. ODS indicates that an
operator issued a DS command. For a complete list of DS messages and their meanings,
refer to the Task Management Programming Guide
Finding Errors
17:49:13 7074 MESSAGE: BAD
PARAMETER VALUE FOR 'TAKE' FUNCTION @ (00000230)
An error message. If there is a DS message, you will usually find an error message right
before it. For information about error messages, refer to Using Job Messages earlier in
this section.
The first of several messages showing values displayed by the job. For an explanation of
the DISPLAY messages, refer to Adding DISPLAY Statements earlier in this section.
Specifies a number of program dump options for a task. A program dump is a printout of
information about the task, including the values of variables and the structure of the
process stack.
Program dumps can help you to debug a task that terminated abnormally. However, to
understand a program dump, it helps to have some knowledge of the system architecture.
Contact your Unisys service representative for information about classes on reading
program dumps.
If you have someone at your site who understands program dumps, then you should
probably set program dump options for most tasks you run. The effects of the options in
the example are as follows:
• FAULT
Causes a program dump if the task is terminated by an internal error.
• DSED
Causes a program dump if the task is terminated by operator DS or some other
problem external to the task.
• ARRAYS
If a dump occurs, includes the contents of any arrays used by the process.
• LIBRARIES
If a dump occurs, includes information about libraries used by the process.
This is a typical set of program dump options, but several others are available. For details,
refer to the description of the OPTION task attribute in the Task Attributes Programming
Reference Manual.
Example
00000100$SET XREF XREFFILES
00000200BEGIN JOB EXAMPLE;
00000300INTEGER VAR;
00000400
00000500SUBROUTINE SUB;
00000600BEGIN
00000700VAR := 10;
00000800END;
00000900
00001000VAR := 5;
00001100SUB;
00001200IF VAR = 10 THEN DISPLAY("GOOD");
00001300END JOB
Entering START FOR SYNTAX will create the files XREFFILES/OBJECT/<file title>/DECS
and XREFFILES/OBJECT/<file title>/REFS. These cross-reference files can be used in
Programmer’s Workbench, EDITOR and INTERACTIVEXREF to determine where VAR is
assigned and referenced and where the subroutine SUB is called.
A -
abnormal terminations, messages indicating, - minus operator, 13–8
18–11 ampersand (&) string operator, 13–9
ABORT statement, 12–13 AND Boolean relation, 13–6
ABORTED task state, 13–5 ARCHIVESUPPORT system library and
ABORTONLY value, of JOBSUMMARY task LIBMAINTREPORTER errors, 7–32
attribute, 18–10 arithmetic operators, 13–8
ACCEPT function, 14–4 ARRAYS option, of OPTION task attribute,
18–12
AS statement, 8–2
: assignment statements, 13–2
:= character asterisk (*) character
assignment operator, 13–2 nonusercoded files, 15–1
string operator, 13–10
in multiplication, 13–8
’ asynchronous tasks, 5–17
’ character automatic display mode (ADM), 3–6
in FTP copies, 7–49 AUTOUNLOAD option of tape copies, 7–18
AX (Accept) system command, receiving
information from, 14–4
″
″ character
in FTP copies, 7–49 B
BAD VALUE FOR CASE EXPRESSION error,
12–5
; BADFILE system command, 7–38
; character, for separating statements, 4–3 BANNER print modifier, 9–5
Action field, in MARC, 3–4 BEGIN JOB prefix, 4–1
Active Entries display, 3–7 in ODT, 3–6
ACTIVE task state, 13–5 BEGIN...END statements, 12–1
actual parameter of a subroutine, 12–11 blanks, removing
ADD statement, 7–8 all, 13–12
and tape copies, 7–8 leading and trailing, 13–13
privileges for, 15–3 BLANKS value for FTP trimming, 7–50
addition, 13–8 BLIND value for FTP folding, 7–47
ADM (automatic display mode), 3–6 BLOCKSIZE file attribute for copy requests,
AFTER file attribute, 9–3 7–27
ALGOL parameter types, 5–20 BM option of PAGECOMP attribute, 9–4
ALL value, for FTP trimming, 7–51 BOJ message, 18–11
alternate family, in FAMILY statement, 5–7 Boolean expressions, 13–4
checking file attribute values, 13–6
checking task attribute values, 13–5
nesting, 13–7
FOLDING option of FTP copies, 7–47 remote MCP server to local MCP server,
foreign host definition, 7–45 7–55
formal parameter of a subroutine, 12–11 restart problems, 7–56
FREE compiler control option, 10–3 USERCODE clause, 7–55
FROM clause FTPSITE option
in CHANGE statement, 6–4 controlling input mapping, 7–47
in REMOVE statement, 6–6 line breaks, 7–47
FROMSTART option, in NFT copies, 7–43 trimming output, 7–50
FTP clause, 7–53 defaults when omitted, 7–50
FTP copies, 7–45 in FTP copies, 7–55
account number, 7–49 RECORDLENGTH, 7–48
charge code, 7–53 FTRECOVERY files, removing, 7–44
directories, 7–46
disk family, 7–48
DOMAINNAME option, 7–49 G
file, 7–46 GEQ numeric relation, 13–7
FOLDING option, 7–47 GO disposition in COMPILE statement, 10–2
foreign to MCP server, 7–45 GO TO statement, 12–6
host, 7–49, 7–52 GTR numeric relation, 13–7
input mapping, 7–47, 7–54
line breaks, 7–47
local MCP server to remote MCP server, H
7–51 halt/load effect on WFL jobs, 17–1
MAPIN option, 7–47, 7–55 HEAD string expression, 13–11
MAPOUT option, 7–55 HEADER print modifier, 9–4
MCP server to foreign, 7–49 HI (Cause EXCEPTIONEVENT) system
multiple files, 7–46 command
password, 7–53 and simple WAIT statement, 14–3
preserving record format, 7–48 and TASKVALUE, 14–3
RECORDLENGTH option, 7–48 monitoring FILE/TRANSFER status, 7–40
remote file and family, 7–51 host, determining name of, 16–2
restoring FILEKIND, 7–55 Host Services File Transfer, 7–39
servers, 7–54 HOSTNAME
trimming output data, 7–50 task attribute, 16–2
usercode, 7–49, 7–53 NFT copy option, 7–41
USERCODE clause, 7–49, 7–53
clients, 7–54
DOMAINNAME option, 7–55 I
FILEKIND file attribute, 7–48 IB (Instruction Block) system command,
FTP clause, 7–53 14–2
FTP service, 7–39 ID value, for FTP trimming, 7–51
FTPSITE option, 7–55 IF statement, 12–1
IPADDRESS option, 7–49 Boolean expressions for, 13–4
local file, 7–46 IF...ELSE, 12–3
MAPOUT option, 7–53 stringing, 12–3
MAPOUT TRIM option, 7–50 nesting, 12–4
monitoring FILE/TRANSFER status, 7–40 null ELSE, 12–4
output mapping, 7–53 simple IF, 12–2
password, 7–49 IL (Ignore Label) system command
RECORDLENGTH option, 7–54 and tape copies, 7–15
IMP Boolean relation, 13–6
M N
MAPIN option in FTP copies name of WFL jobs, 4–1
foreign to MCP server, 7–47 named parameters, 13–4
remote MCP server to local MCP server, Native File Transfer (NFT), 7–39
7–55 negation
MAPOUT option, of FTP copies of numeric values, 13–8
remote MCP server to local MCP server of Boolean values, with NOT, 13–6
transfers, 7–55 NEQ
local MCP server to remote MCP server, numeric relation, 13–7
7–53 string relation, 13–7
MAPOUT option of FTP copies NEWFILE file attribute, 6–8
MCP server to foreign, 7–50 NFT copies
MARC, 3–4 deleting recovery files, 7–44
margins, in printing, 9–4 ensuring hosts are available, 7–42
MAXCARDS task attribute from beginning, 7–43
job queue selection, 11–6 FROMSTART option, 7–43
MAXIOTIME task attribute between remote hosts, 7–41
job queue selection, 11–6 between tapes on remote hosts, 7–42
MAXLINES task attribute from a remote host, 7–41
job queue selection, 11–6 from tapes on remote hosts, 7–41
MAXPROCTIME task attribute monitoring FILE/TRANSFER status, 7–40
job queue selection, 11–6 NFT service, 7–39
MAXWAIT task attribute to disk on a remote host, 7–41
job queue selection, 11–6 to tapes on remote hosts, 7–42
MCP server NO FILE <file name> MT condition, 7–36
definition, 7–45 NOFETCH system option, 14–2
Menu-Assisted Resource Control (MARC) NONE value
individual WFL statements, 3–4 FTP folding, 7–47
multiple WFL statements, 3–4 FTP trimming, 7–51
starting WFL jobs, 3–4 nonusercoded files, 15–1
TASKSTATUS screen, 3–5 NOT Boolean relation, 13–6
tracking progress of jobs, 3–5 NOT ON <family name> copy error, 7–33
using the Action field, 3–4 NOT ON <tape name> copy error, 7–33
using the COMND screen, 3–4 NOTE print modifier, 9–5
WFL prefix, 3–4 number sign (#), preceding string
MERGE compiler control option, 10–3 expressions, 13–10
Messages display, at ODT, 3–7