Z-MOD05K

This document covers the following topics:


Description

Modify the print defaults in the user profile of a specific cabinet.

This subprogram is the same as Z-MOD05D with the exception that you can specify additional parameters: Left-margin and Wrap-printed-text.

This subprogram can be used only by a supervisor or cabinet administrator. It is not possible to use this subprogram to modify the user profile of the cabinet SYSCNT.

To get the ISN for the wanted cabinet, you can invoke either Z-ADD05 or Z-DIS05 prior to this subprogram.

Parameters which are not completed in the parameter list are deleted from the user profile. Thus, to retain the existing values, you must specify them once more before you invoke this subprogram.

Successful termination of Z-MOD05K 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 cabinet administrator.
Password A8 R   The password of the above cabinet.
Cabinet-name A8 R*   The name of the cabinet to be modified. Either Cabinet-name or Cabinet-ISN, not both.
Cabinet-ISN P8 R*   The ISN of the cabinet to be modified. Either Cabinet-ISN or Cabinet-name, not both.
Printer-name A32 R   The name of a logical printer.
Printer-profile A32 O   The name of a printer profile
Format-profile A32 O   The name of a formatting profile.
Page-length N2 R   The number of lines ( 1 to 80) per page of printout.
Page-width N3 R   The number of characters (1 to 249) per line.
Left-margin N2 O   Left margin.
Wrap-printed-text A1 O   If marked, the text is wrapped. If not marked, the text is truncated.
Print-banner A1 O   If marked, the "Info" screen information is printed.
Print-notes A1 O   If marked, attached notes, cover notes and enclosures are printed.
Print-address A1 O   If marked, the addressee list of a mail item is printed.

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
91 Supply Cabinet-name or Cabinet-ISN
92 Page-length is 1 to 80 lines per page; Page-width is 1 to 249 characters per line
93 No printer defined with this name
94 Printer-profile not found
95 Format-profile must be alphanumeric
96 Cabinet-name is not valid
97 Cabinet-ISN is not valid
98 Printer-name can not be blank
99 Cabinet SYSCNT cannot be modified

Subprograms

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

Example

0010 *
0020 * Example program to modify print profile of a cabinet
0030 *
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE         (N2)
0080 1 CABINET             (A8)
0090 1 PASSWORD            (A8)
0100 1 CABINET-NAME        (A8)
0110 1 CABINET-ISN         (P8)
0120 1 PRINTER-NAME        (A32)
0130 1 PRINTER-PROFILE     (A32)
0140 1 FORMAT-PROFILE      (A32)
0150 1 PAGE-LENGTH         (N2)
0160 1 PAGE-WIDTH          (N3)
0170 1 LEFT-MARGIN         (N2)
0180 1 WRAP-PRINTED-TEXT   (A1)
0190 1 PRINT-BANNER        (A1)
0200 1 PRINT-NOTES         (A1)
0210 1 PRINT-ADDRESS       (A1)
0220 END-DEFINE
0230 *
0240 RESET RETURN-CODE
0250 MOVE 'CABINET'         TO CABINET
0260 MOVE 'PASSWORD'        TO PASSWORD
0270 MOVE 'CAB-NAME'        TO CABINET-NAME
0280 MOVE 'PRINTER-NAME'    TO PRINTER-NAME
0290 MOVE 'PRINTER-PROFILE' TO PRINTER-PROFILE
0300 MOVE 'FORMAT-PROFILE'  TO FORMAT-PROFILE
0310 MOVE 60                TO PAGE-LENGTH
0320 MOVE 132               TO PAGE-WIDTH
0330 MOVE 10                TO LEFT-MARGIN 
0340 MOVE 'X'               TO WRAP-PRINTED-TEXT
0350 MOVE 'X'               TO PRINT-BANNER
0360 MOVE 'X'               TO PRINT-NOTES
0370 MOVE 'X'               TO PRINT-ADDRESS
0380 *
0390 CALLNAT 'Z-MOD05K'
0400     RETURN-CODE
0410     CABINET
0420     PASSWORD
0430     CABINET-NAME
0440     CABINET-ISN
0450     PRINTER-NAME
0460     PRINTER-PROFILE
0470     FORMAT-PROFILE
0480     PAGE-LENGTH
0490     PAGE-WIDTH
0500     LEFT-MARGIN 
0510     WRAP-PRINTED-TEXT
0520     PRINT-BANNER
0530     PRINT-NOTES
0540     PRINT-ADDRESS
0550 *
0560 IF RETURN-CODE = 0
0570   WRITE 'Cabinet was modified'
0580 ELSE
0590   WRITE 'Return code' RETURN-CODE
0600 END-IF
0610 *
0620 END