SP-ASSIGN - Assigning Print Report Characteristics

Assigns the following parameters to a particular print report number:

Syntax

SP-ASSIGN {{report-no} =form-queue-name} {FILE=job-file} {NAME=job-name} {spooler-options} {copies}

Notes

  • The equals signs '=' in the syntax can be surrounded by spaces.
  • Refer to Overview of Spooler Operation for more information on how to use SP-ASSIGN.

Syntax elements

report-no is a print report number in the range 0 to 127. If you specify report-no, you must also specify the parameter =form-queue-name.

Note

If you do not specify report-no, the current assignments for all print report numbers are cancelled and all open print jobs are closed. The default assignment is applied to all unassigned report numbers. This is described later in this section.

Print reports are numbered according to their origin.

0 is assigned by most processor's print commands, including TCL, English and Proc, and provides automatic pagination, headers and footers.

1-127 are assigned by DataBasic programs using the PRINT statement.

=form-queue-name
is the name of the formqueue assigned to the specified print report number. If you omit the formqueue name, SP-ASSIGN assigns all print reports to the formqueue 'STANDARD'.

If job-file is a remote file, form-queue-name must specify a form queue on the remote system containing job-file.

job-file is the name of the file assigned to store print data for each job. If job-file is not specified, the Spooler uses the default job file specified in the formqueue definition. If none is specified in the formqueue definition, it uses the SPOOL.JOBS file.

job-name is a name used with a sequence number appended, to form print job-ids in the assigned formqueue. If omitted, then each job name is a sequence number only.

spooler-options specifies the Spooler characteristics to be assigned to the formqueue. If you omit spooler-options, none are assigned.

Note

There is no left parenthesis before spooler-options.

The following options can be entered, in any order. Spaces or commas between options are not required.

A Align. Suspends despooling from the formqueue, giving time to align the print job to the paper in the printer. With option A assigned, each print job spooled to the formqueue takes the 'Align' status.

SP-JOBS Action Code 13 or the SP-ALIGN command can be used to align the print job and restart despooling.

B Banner override. Prevents a report banner from printing even if the formqueue has banner printing selected.

H Hold. Despools each print job, but holds a copy in the formqueue. The print job is assigned 'Finish' status. To spool a job and output it later, you must use the S and H options together. The print job is then assigned  'Hold' status.

The H option cannot be used with the N option.

When spooling to a formqueue with the H option assigned, the Spooler displays the message:

Print Job Id - job-name seq-no

where:

job-nameis specified in the SP-ASSIGN statement.

seq-nois a sequence number.

For the first job, seq.no is null.

To despool a job with 'Hold' or 'Finish' status, use SP-JOBS Action Code 19: Re-queue Hold File or the SP-QUEUEHOLD command. To delete the job use SP-JOBS Action Code 5: Delete Job or SP-DELETE.

I Instant output. Begins writing a print job without waiting for it to close.

The I option cannot be used with the S option, or with copies not equal to '1'.

If instant printing is suspended using SP-SUSPEND, or SP-JOBS Action Code 9, then resumed using SP-RESUME or SP-JOBS Action Code 7, the print job continues printing where it stopped. Data already despooled cannot be recovered.

N No printing for others. This option prevents all print jobs in the formqueue, except those from your own process, from being despooled. All other jobs are made to wait in the formqueue. To release a queue so that other jobs can be printed, either log off or enter SP-ASSIGN without parameters.

The N option is included for compatibility with earlier releases of software.

The N option cannot be used with the H option, or copies not equal to '1'.

O Opens a print report and prevents the print job from closing when the process returns to TCL or Proc. This can be used to group a series of print reports into one print job. To close an open print job use the SP-CLOSE command, log off or enter a further SP-ASSIGN.

Note that if you set the SPASSIGN environment option, SP-ASSIGN will close open print jobs only when no arguments are specified (as on other MultiValue systems).

S Suppresses printing. If you specify the S option only, a print job is not created. This option is most useful when used together with the H option.

copies specifies the number of copies to output (1-100). The default is the system reset parameter value '1'. You cannot specify copies when using I or N options.

Restrictions on options

The following combinations of Spooler options are incompatible and therefore cannot be assigned together.

Option Incompatible Options
H N
I S and copies
N H and copies
S I
copies I and N

In addition, the I and N options cannot be assigned to SYS type formqueues.

Any attempt to enter one of the above combinations returns the error message:

INCOMPATIBLE OPTIONS: N A/H/S/O, I S, C NOT I, COPIES N/I

If you enter SP-ASSIGN without specifying the report number, all assigned report numbers, including '0' are unassigned; all open print jobs are closed; all report numbers, now unassigned, use the default assignment parameters.

Initial default assignment

When you first log on, the following system reset parameters are assigned to all print reports.

Parameters

Value

form-queue-name

STANDARD

job-file

SPOOL.JOBS

job-name

null

spooler-options

none

copies

1

This is the initial default assignment used by all unassigned report numbers. System reset assignments are discussed further in Overview of Spooler Operation.

Changing the default assignment

If you enter SP-ASSIGN without a report number, but with one or more other parameters specified, then the values given to SP-ASSIGN are applied to the default assignment parameters. You can also redefine the default job file assignment from the FORM.QUEUES File Maintenance menu. See Spooling System Maintenance. All unassigned print report numbers will use the revised default assignment.

Changing assignments

The assignment set by SP-ASSIGN for a specified report number remains in effect until another SP-ASSIGN for that particular report number is executed, or until you log off.

Displaying current assignments

Assignment information for each print report number is held in a process's Spooler assignment table. This can be displayed using the SP-LOOK command.

Example 1

To assign the system reset parameters as the default assignment for all print report numbers, enter:

SP-ASSIGN

This also closes any print jobs that are currently open.

Example 2

To assign print jobs for all print report numbers to the formqueue "LASER" with all other parameters set to their system reset values, enter:

SP-ASSIGN =LASER

Example 3

To assign print jobs for print report number 10 to the formqueue "LASER" with all other parameters set to their system reset values, enter:

SP-ASSIGN 10 =LASER

Example 4

To assign print jobs for all print report numbers to the formqueue "LASER" and specify options to suppress printing, but keeping jobs on hold, enter:

SP-ASSIGN =LASER NAME=DAVE HS

Job-ids will be of the form DAVE, DAVE0001, DAVE0002, and so on. Print data is stored in the default job file SPOOL.JOBS and the number of copies of each job printed will be '1'.

When you initiate a print report,

LIST DEPT 'NAMES' (P

an entry number for the report is displayed, similar to the following:

Print Job Id - DAVE

The next print report:

CP MD MD

will display the message:

Print Job Id - DAVE0001

 You can output jobs held in LASER using SP-JOBS Action Code 8 or SP-EDIT.

Example 5

To set up your default formqueue and two specific print report assignments, enter:

SP-ASSIGN =INVOICE

followed by

SP-ASSIGN 4 =CHECK H

then

SP-ASSIGN 7 =STANDARD 2

The first SP-ASSIGN statement assigns the formqueue named INVOICE, with no special options, as the default for all print report numbers. The Spooler will output one copy of any print job generated without a specific report number.

The second SP-ASSIGN statement assigns the formqueue named CHECK with the H option to print report number 4. The Spooler will output one copy of each print job with report number 4 and hold a copy in the formqueue.

The third SP-ASSIGN statement assigns the STANDARD formqueue with no special options to print report number 7. The Spooler will output two copies of any print job with report number 7.

Note that the order in which the SP-ASSIGN statements are entered is important. For example if you enter them in the order:

SP-ASSIGN 4 =CHECK H
SP-ASSIGN 7 =STANDARD 2
SP-ASSIGN =INVOICE

The first two statements set up the assignments as before, but the third statement unassigns all report numbers, nullifying the effect of the first two statements.

Example 6

To assign print jobs for print report 0 to the formqueue "MEMOS", with options set to suppress printing, with print jobs on hold and also, to store print data in the MEMO.JOBS file with job-ids starting with job name MEMO, enter:

SP-ASSIGN 0 =MEMOS FILE=MEMO.JOBS NAME=MEMO HS

Note

It is only necessary to specify the report number '0' for use by DataBasic. All other Reality processors, such as TCL and English, only use report number 0 which is assigned by the Spooler.