Z-MOD05N

This document covers the following topics:


Description

Activate/deactivate a command-object combination for a specific cabinet.

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.

This subprogram allows you to authorize commands for a specific cabinet. You can allow and disallow commands. It is recommended that you specify both a command number and an object number.

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.
Command-number N2 R   See the Con-nect Administration documentation, section System Maintenance for a list of command numbers.
Object-number N2 O   See Object Numbers. If an object number is not specified, the entire object table is activated/deactivated for the specified command.
Active-flag A1 R   The setting of the command-object combination. If marked, the combination is allowed. If blank, the combination is not allowed.

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 Invalid Command-number
93 Invalid Object-number
96 Invalid Cabinet-name
97 Invalid Cabinet-ISN
99 Cabinet SYSCNT cannot be modified

Subprograms

Z-120
Z-122
Z-123
Z-175

Example

DEFINE DATA
LOCAL
1 RETURN-CODE       (N2)
1 CABINET           (A8)
1 PASSWORD          (A8)
1 CABINET-NAME      (A8)
1 CABINET-ISN       (P10)
1 COMMAND-NUMBER    (N2)
1 OBJECT-NUMBER     (N2)
1 ACTIVE-FLAG       (A1)
END-DEFINE
*
RESET RETURN-CODE
MOVE 'CABINET'  TO CABINET            /* Cabinet ID
MOVE 'PASSWORD' TO PASSWORD           /* Password
MOVE 'CAB-NAME' TO CABINET-NAME       /* Name of cabinet to be modified
RESET CABINET-ISN
MOVE 13         TO COMMAND-NUMBER     /* USE command
RESET OBJECT-NUMBER                   /* All objects
MOVE 'X'        TO ACTIVE-FLAG        /* Allow
*
CALLNAT 'Z-MOD05N'
   RETURN-CODE
   CABINET
   PASSWORD
   CABINET-NAME
   CABINET-ISN
   COMMAND-NUMBER
   OBJECT-NUMBER
   ACTIVE-FLAG
*
IF RETURN-CODE EQ 0
  WRITE 'The command-object combination has been changed.'
    // 'Cabinet' CABINET-NAME 'was modified'
ELSE
  WRITE 'Return Code' RETURN-CODE
END-IF
*
END