SP-ASSIGN Command

Use SP-ASSIGN to direct and control output sent to the Spooler and to assign a form queue to a process. SP-ASSIGN determines what the current Spooler assignments are and specifies the number of copies to be printed, print job priority, and the destination of the print job.

Format

SP-ASSIGN [options]

Parameter(s)

options

Can be any of the following (more details about each option follow this list):

?

Displays the current SP-ASSIGNments.

n

Assigns the number of copies to be printed. Up to 125 copies can be assigned.

A

Directs spooler output to the terminal AUX port connected to the process requesting print-job de-spooling.

C

Chokes printer output to the speed of the printer. The C option must be used with the I option.

Fform

Assigns a specified form queue to the user’s process. form can be any number from 0 to 125.

H

Saves output as a hold file.

I

Specifies immediate printing.

O

Keeps print files open, allowing multiple print requests to be processed as one print job. See also the SP-OPEN/SP-CLOSE commands.

Rpfile

Reassigns print files generated by mvBASIC PRINT ON statements.

S

Suppresses printing of a print job.

T

Sends output to the tape device or floppy disk drive.

Options need not be enclosed in parentheses and can be entered in any order. They need not be separated by spaces or commas.

Description

When the system is initially installed, all printer output is sent by default to form queue 0 and the number of copies to print is set to 1. To see a list of current SP-ASSIGNments for all processes, use the LISTABS command.

Users can change their queue assignments and output specifications for their own processes at any time with SP-ASSIGN. Any changes made remain in effect until the next time the SP-ASSIGN command is issued, or until the user logs to another account or logs off. To reset the SP-ASSIGNments to the original default options, use SP-ASSIGN with no options.

Using SP-ASSIGN Options

The following sections group the SP-ASSIGN options by function, and describe in more detail how to use them.

Status Option (?)

When used alone, ? displays the current status of the SP-ASSIGN command for the user’s process. The report looks like this:

Status codes, which correspond to SP-ASSIGN options, can be any of the following:

A

Output to the terminal AUX port connected to the process.

C

Choke printing process.

H

Output to a hold file.

I

Print immediately.

O

Keep print file open.

P

Output to the printer.

T

Output to backup medium.

If you use ? with other options, the changes specified by those options are made, then the resulting status is displayed.

The following example shows how to display the current SP-ASSIGN options:

>SP-ASSIGN ?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

P

1

0

 

 

 

 

>

 

 

 

Form Queue Option (F)

Fform

The F option assigns a form queue to the user’s process. When the system is initially installed, all processes have form queue 0 assigned to them. When users change their form queues, these assignments remain until they are explicitly changed by the SP-ASSIGN command, or until the user logs to another account or logs off. If output is sent to a tape device or floppy disk drive, the F option is ignored.

The following example assigns form queue 3 to the user’s process and displays the new assignment:

>SP-ASSIGN F3?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

P

1

3

 

 

 

 

>

 

 

 

Number of Copies Option

n

The n option assigns the number of copies to be printed. If n is not specified, one copy is printed. When multiple copies are assigned, the print file is not released until the last copy is printed. If either the T (tape) or the C (choke) options are used, the n option is ignored.

The following example assigns the number of copies to be printed to 20:

>SP-ASSIGN 20?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

P

20

0

 

 

 

 

>

 

 

 

Job Priority Options (I,C)

I

The I (immediate printing) option starts the print job as soon as possible. This option assigns a higher priority to this job, causing it to be processed before other jobs. When the I option is used, the Spooler finishes any currently active print job before it “immediately” processes the job requested. I-jobs are processed in the order in which they are entered. If either the T (tape) or the H (hold file) options are used, the I option is ignored; the I option has no effect if the S (suppress printing) option is used.

C I

Using the C (choke) option breaks up a print job, sending it in amounts of 20 frames or less to the printer. When the printer catches up to the 20 stored frames, processing continues. If choking isn’t needed, the printer waits until the input processor finishes its current frame. The C option must be used with the I (immediate printing) option. If the C option is used with either the H (hold file) or the T (tape) options, it is ignored. Multiple-copy print jobs cannot be choked.

The following example assigns form queue 1 to process 4. The C option chokes printer output to the output rate of the printer. The I option is required by the C option:

>SP-ASSIGN F1CI?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

PIC

1

1

 

 

 

 

>

 

 

 

Destination Options (H,S,T)

H

The H option creates a hold file. If the H option is used with the S option, a hold file is created but nothing is sent to the printer. The H option is useful when you want to save print jobs until it is more convenient to print them, or when the system administrator needs to change the type of paper in the printer. For information on how to manipulate hold files, see the SP-EDIT command.

The following example saves the print job as a hold file; the S option prevents the print job from being sent to the printer. When the hold is removed, the print job is sent to an available printer assigned to form queue 0. Three copies will be printed:

>SP-ASSIGN HS3?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

H

3

0

 

 

 

 

>

 

 

 

 

T

If used without the S (suppress printing) option, the T option sends the output to a tape device or floppy disk drive as well as to the printer. Output is sent to the tape wherever the tape is currently positioned. The tape unit does not automatically rewind, so print files can be sent to the tape one after another.

 

NOTE

Verify that the tape drive is attached (T-ATT) and that the proper tape unit is selected (T-SELECT).

 

S

If the T option is used with the S option, output is sent to the tape device or floppy disk drive, but nothing is sent to the printer. If the T option is used with both the S and the H options, output is sent to the tape device or floppy disk drive and a hold file is created, but nothing is sent to the printer.

The S (suppress printing) option suppresses printing and is ordinarily used with the T (tape) and the H (hold file) options. When the S option is used, the print file is not enqueued for printing.

The following example directs output directly to tape, bypassing the Spooler (the S option suppresses printing):

>SP-ASSIGN TS?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

S

1

0

 

 

 

 

>

 

 

 

Open Option (O)

O

The O (open) option keeps a print file open until it is explicitly closed. The O option is useful when you want to collect output from multiple print requests and print it as a single print job. All other print jobs are prevented from printing until the print file is closed (print jobs will continue to be spooled, however). Remember to close the O option setting after you use it. Do this by re-executing the SP-ASSIGN command without the O option. Using the SP-CLOSE command or logging off also closes an open print file.

The following example creates a hold file using form queue 2 and leaves the print job open. Several print requests are sent, then the print job is closed by reissuing the SP-ASSIGN statement without the O option:

>SP-ASSIGN TS?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

S

1

0

 

 

 

 

>SORT ORDERS WITH DATE >= 05/01 AND DATE <= 05/31 (P)

 

 

 

 

HOLD ENTRY # 24

 

 

 

 

>SORT ORDERS.WITH DATE >= 06/01 AND DATE <= 06/30 (P)

 

 

 

 

>SORT ORDERS.WITH DATE >= 07/01 AND DATE <= 07/31 (P)

 

 

 

 

>SP-ASSIGN    HSF2

 

 

 

 

[1140] YOUR OPEN FILES WERE CLOSED

 

 

 

 

>

 

 

 

Pre-assignment Option (R)

R

Use the R (reassign) option in conjunction with the PRINT ON pfile statement in an mvBASIC program. The R option reassigns the print files generated by a PRINT ON statement. Use the R option with other SP-ASSIGN options to customize the SP-ASSIGN options for the reassigned print file. These options apply only to that particular reassigned print file; they do not change any of the current SP-ASSIGNments, nor do they affect the options assigned to any other reassigned print file by the R option.

The following example allows a print job to be generated by a PRINT or PRINT ON 3 statement in an mvBASIC program. The print job will be made into a hold file, and 1 copy will be printed using form queue 3:

>SP-ASSIGN F3HSR3?

 

 

 

 

PROCESS

STATUS

COPIES

FORM #

 

 

 

 

4

H

1

3

 

 

 

 

>