Z-ADD79

This document covers the following topics:


Description

Add a logical printer.

This subprogram can be used only by a supervisor or system administrator.

You must specify both parameters, Printer-name and Printer-TID.

Note:
When you operate under Natural Advanced Facilities, you must enter the name of the logical printer profile in the parameter Printer-TID.

Successful termination of Z-ADD79 always results in an END TRANSACTION. You are not able to control transaction handling.

Parameters

Parameter Format In Out Remarks
Return-code N2   X  
Cabinet A8 R   The cabinet ID of a supervisor or system administrator.
Password A8 R   The password of the above cabinet.
Printer-name A32 R   The name of the logical printer to be added.
Printer-TID A8 R   The terminal ID number, LU number or comparable terminal destination for the printer which is to be used when the user enters the name of the logical printer.
Printer-profile A32 O   The printer profile which is to be assigned to the logical printer.
Description A60/1:4 O   A brief description for the logical printer.
Printer-ISN P8   X The ISN of the new logical printer.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
15 Invalid administrator status
84 Requested printer profile does not exist
91 Printer-name is not unique
93 Printer-name and Printer-TID must not be left blank

Subprograms

Z-120
Z-122
Z-123
Z-1200&0

Example

0010 *
0020 DEFINE DATA
0030 LOCAL
0040 1 RETURN-CODE          (N2)
0050 1 CABINET              (A8)
0060 1 PASSWORD             (A8)
0070 1 PRINTER-NAME         (A32)
0080 1 PRINTER-TID          (A8)
0090 1 PRINTER-PROFILE      (A32)
0100 1 DESCRIPTION          (A60/1:4)
0110 1 PRINTER-ISN          (P8)
0120 *
0130 END-DEFINE
0140 *
0150 RESET RETURN-CODE
0160 MOVE 'LS'              TO CABINET
0170 MOVE 'PASSWORD'        TO PASSWORD
0180 MOVE 'PRINTER-NAME'    TO PRINTER-NAME
0190 MOVE 'TID'             TO PRINTER-TID
0200 MOVE 'PRINTER-PROFILE' TO PRINTER-PROFILE
0210 MOVE 'DESCRIPTION-1'   TO DESCRIPTION(1)
0220 MOVE 'DESCRIPTION-2'   TO DESCRIPTION(2)
0230 MOVE 'DESCRIPTION-3'   TO DESCRIPTION(3)
0240 MOVE 'DESCRIPTION-4'   TO DESCRIPTION(4)
0250 *
0260 CALLNAT 'Z-ADD79'
0270   RETURN-CODE
0280   CABINET
0290   PASSWORD
0300   PRINTER-NAME
0310   PRINTER-TID
0320   PRINTER-PROFILE
0330   DESCRIPTION(*)
0340   PRINTER-ISN
0350 *
0360 IF RETURN-CODE = 0
0370   WRITE 'LOGICAL PRINTER WAS ADDED'
0380 ELSE
0390   WRITE 'RETURN CODE' RETURN-CODE
0400 END-IF
0410 *
0420 END