Skip to content

240B AppendSpooling

Stub   MON 240B (160 decimal) · Mnemonic APSPE · Group: File Operations (manual section 2.4)

Available from: not known - no compatibility box captured from the manual

Emulation source: src/handlers/mon_240B_AppendSpooling.c

Description

Prints a file. The printer has a queue of files waiting to be output. The file is appended to this queue. One or more copies can be printed.

  • You may connect a text, e.g. INVOICE, to the job. The operator uses the text to select all files to be printed on special paper.
  • SINTRAN III, version K, allows both the file and the printer to be on remote systems. The complete standard syntax for remote file specification is as follows: system(user(password:project)).(directory:user)file:type;version

Notes

  • Version history: K-version added remote-file support - both the file and the printer may be on remote systems, using the full remote file-specification syntax (ND-60230-5-EN SINTRAN III - Release Information - K-version.md:2004). M-version decreased the maximum length of parameter 4 (the optional message / text) from 128 characters to 80 characters (ND-860230-7A-EN SINTRAN III - Release Information - M-Version.md:1089, 2455).

Parameters

Name Type Direction Description
FileName STRING In File name to print (64 chars).
PrinterName STRING In Spooling device name, e.g. 'LINE-PRINTER' (64 chars).
NoOfCopies INTEGER In Number of copies (bits 0-14). Set bit 15 if UserText is present.
UserText STRING In Optional message to operator (128 chars). Only used if bit 15 of NoOfCopies is set.

Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.

See also

CloseSpoolingFile, @APPEND-SPOOLING-FILE

Compatibility

ND-100 ND-500 User programs RT programs System programs
Yes Yes Yes Yes No

From the YAML extraction; this call's page in the manual had no compatibility box that was captured.

Examples

From the manual (OCR text, not corrected).

INTEGER : NoOfCopies
BYTES : FileName(0:63), PrinterName(0:63), UserText(0:127)
...
% If UserText is present, set bit 15 in NoOfCopies to 1
TRUE =: Bit(NoOfCopies,15)
ON ROUTINEERROR DO
    IF ErrCode >< 0 THEN ...
ENDON
Monitor_Call('AppendSpooling', FileName, PrinterName, NoOfCopies, UserText)
INTEGER NoOfCopies
CHARACTER FileName*64, PrinterName*64, UserText*128
...
C If UserText is present, add 100000B to NoOfCopies
NoOfCopies=NoOfCopies+100000B
CALL Monitor_Call('AppendSpooling', FileName(1:64), PrinterName(1:64),
& NoOfCopies, UserText(1:128))
C IF (ErrCode .NE. 0) THEN ...
FileName, PrinterName : PACKED ARRAY [0..63] OF CHAR;
NoOfCopies : INTEGER2;
UserText : PACKED ARRAY [0..127] OF CHAR;
...
AppendSpooling(FileName, PrinterName, NoOfCopies, UserText);
IF ErrCode <> 0 THEN ...
01 NoOfCopies COMP.
01 FileName PIC X(64).
01 PrinterName PIC X(64).
01 UserText PIC X(128).
01 ErrCode COMP.
...
>>> Comment: If UserText is present, add 32768 to NumberOfCopies
ADD 32768 TO NoOfCopies.
MONITOR-CALL "AppendSpooling" USING FileName, PrinterName, NoOfCopies, UserText.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
NoOfCopies : W BLOCK 1
FileName : STRINGDATA 'EXAMPLE:SYMB'...
PrinterName : STRINGDATA 'LINE-PRINTER'...
UserText : STRINGDATA 'File queued'...
ErrCode : W BLOCK 1
AppendSpooling : EQU 3789 + 240B
...
CALLG AppendSpooling, 4, FileName, PrinterName, NoOfCopies, UserText
IF K GO ERROR
...
ERROR : W1 =: ErrCode  %ErrorCode in W1 register.
LDX    (FILE     %Memory address of file name.
LDT    NOCOP   %Number of copies to be printed in bit 0:14.
LDA    (TEXT    %Memory address of message to the error device.
COPY   SA DO
LDA    (DEV     %Memory address of name of spooling device.
MON    240      %Monitor call AppendSpooling.
JMP    ERROR    %Error return from monitor call.
...            %Normal return.
ERROR, ...      %Error number in register A.
...
FILE, 'EXAMPLE:SYMB'   %Send EXAMPLE:SYMB to a printer.
DEV, 'LINE-PRINTER'    %Print file on the device LINE-PRINTER.
NOCOP, ...             %Bit 15 set to 1 means print message.
TEXT, 'GUMMED LABELS'  %Message to be send to error device.


`ND-100 and ND-500` | `All users` | `All programs`

ndmonlib implementation

Stub Registered MON_STATUS_NOT_IMPLEMENTED: the handler is a stub. mon_dispatch() in src/core/mon_dispatch.c reports the call as unimplemented without calling it.

Handler mon_240B_AppendSpooling
Code lines 9 (non-blank, non-comment lines in the file)

Source

SINTRAN III Monitor Calls (ND-860228.2 EN), page 79.