Z-MOD79

This document covers the following topics:


Description

Modify a logical printer.

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

Any values that were previously defined in the parameters Printer-profile and Description are deleted. Thus, to retain the previously defined values, you must specify them once more.

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-MOD79 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-ISN P8 R*   The ISN of the logical printer to be modified. Either Printer-ISN or Printer-name, not both.
Printer-name A32 R*   The name of the logical printer to be modified. Either Printer-name or Printer-ISN, not both. The Printer-name cannot be modified.
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. To retain the previously defined printer profile, you must specify it once more.
Description A60/1:4 O   A brief description for the logical printer. To retain the previously defined description, you must specify it once more.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
08 Supply either ISN or name, not both
15 Invalid administrator status
84 Requested printer profile does not exist
89 No printer TID/LU supplied
91 Supply ISN or name
92 Printer-name not found

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-ISN          (P8)
0080 1 PRINTER-NAME         (A32)
0090 1 PRINTER-TID          (A8)
0100 1 PRINTER-PROFILE      (A32)
0110 1 DESCRIPTION          (A60/1:4)
0120 *
0130 END-DEFINE
0140 *
0150 RESET RETURN-CODE
0160 MOVE 'CABINET'         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-MOD79'
0270   RETURN-CODE
0280   CABINET
0290   PASSWORD
0300   PRINTER-ISN
0310   PRINTER-NAME
0320   PRINTER-TID
0330   PRINTER-PROFILE
0340   DESCRIPTION(*)
0350 *
0360 IF RETURN-CODE = 0
0370   WRITE 'LOGICAL PRINTER WAS MODIFIED'
0380 ELSE
0390   WRITE 'RETURN CODE' RETURN-CODE
0400 END-IF
0410 *
0420 END