Z-DIS17C

This document covers the following topics:


Description

Display a list of all members of a shared cabinet. The list also includes the profile type of each member cabinet (shared cabinet profile, private cabinet profile or special profile).

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

To get the ISN for the wanted shared cabinet, you can invoke Z-DIS05X prior to this subprogram. To display the cabinet profile of a member, you can invoke Z-DIS17F after this subprogram.

This subprogram should be invoked iteratively until the return code 77 indicates the end of the list.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
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 shared cabinet for which you want to display the members. Either Cabinet-name or Cabinet-ISN, not both.
Cabinet-ISN P10 R* X The ISN of the shared cabinet for which you want to display the members. Either Cabinet-ISN or Cabinet-name, not both.
Member-array (20)
  Member-name A8   X The cabinet name of the member.
  Cabinet-type A1   X 0=private cabinet, 1=standalone cabinet, 2=shared cabinet, 3=public cabinet.
  Name/description A32   X For cabinet type 0: the user's last name. For cabinet types 1, 2 and 3: the description of the cabinet.
  Profile-type A1   X 1=shared cabinet profile, 2=private cabinet profile, 3=special profile.
  Date-added N8   X The date on which the member was added to the shared cabinet.
Work-parameter A32     For internal use. See The Work Parameter.

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
30 Shared cabinet name invalid
31 No members found
77 End of list
91 Supply Cabinet-name or Cabinet-ISN
96 Cabinet-name is not valid
97 Cabinet-ISN is not valid

Subprograms

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

Example

*                                                                    
* Example program to return a list of all members of a shared cabinet
*                                                                    
DEFINE DATA                                                          
LOCAL                                                                
1 RETURN-CODE        (N2)                                            
1 CABINET            (A8)                                            
1 PASSWORD           (A8)                                            
1 CABINET-NAME       (A8)                                            
1 CABINET-ISN        (P10)                                           
1 MEMBER-ARRAY       (20)                                            
  2 MEMBER-NAME      (A8)                                            
  2 CABINET-TYPE     (A1)                                            
  2 NAME/DESCRIPTION (A32)                                           
  2 PROFILE-TYPE     (A1)                                            
  2 DATE-ADDED       (N8)                                            
1 WORK-PARAMETER     (A32)                                           
*                                                                    
1 INX                (P3)                                            
1 DIV                (P3)     
1 REM                (P3)                                     
*                                                             
END-DEFINE                                                    
*                                                             
RESET RETURN-CODE WORK-PARAMETER                              
*                                                             
MOVE 'CABINET'  TO CABINET                                    
MOVE 'PASSWORD' TO PASSWORD                                   
MOVE 'SHAR-CAB' TO CABINET-NAME                             
*                                                             
REPEAT UNTIL RETURN-CODE NE 0                                 
*                                                             
  CALLNAT 'Z-DIS17C' RETURN-CODE                              
                     CABINET                                  
                     PASSWORD                                 
                     CABINET-NAME                           
                     CABINET-ISN                               
                     MEMBER-ARRAY(*)                          
                     WORK-PARAMETER                           
*                                                             
  IF RETURN-CODE EQ 0  OR  RETURN-CODE EQ 77                         
    IF MEMBER-NAME(1) EQ ' '                                         
      WRITE 'No items found !' (AD=I)                                
    ELSE                                                             
      FOR INX 1 TO 20                                                
        IF MEMBER-NAME(INX) NE ' '                                   
          DIVIDE 5 INTO INX GIVING DIV REMAINDER REM                 
          IF REM EQ 1                                                
            NEWPAGE                                                  
            WRITE 'Return Status OK' (AD=I) /                        
          END-IF                                                     
          WRITE INX (EM=Z9) 1X                                       
            'Member Name:' MEMBER-NAME (INX) 3X                     
            'Name/Description:' NAME/DESCRIPTION (INX) /             
            4T 'Cabinet Type:' CABINET-TYPE (INX) 10X                
            'Profile Type:' PROFILE-TYPE (INX) 10X                   
            'Date Added:' DATE-ADDED (INX) (EM=9999-99-99) /         
        END-IF                                                       
      END-FOR                                                        
    END-IF                                                           
  ELSE                                          
    WRITE 'Return Code' RETURN-CODE             
  END-IF                                        
END-REPEAT                                      
*                                               
END