Z-INF13

This document covers the following topics:


Description

Return information about a specific folder or file. This subprogram also offers the possibility to modify the keywords and description of a folder or file.

To return information about a specific folder, you must specify either the Folder-name or the ISN of the folder. You must not specify both.

To return information about a specific file, you must specify either the names (Folder-name and File-name) or the ISN of the file. You must not specify both.

When you specify the value U in the parameter Command, you can define new keywords and a new description and then return the folder/file information. When you do not specify a keyword, all previously defined keywords are deleted. When you specify at least one keyword, all previously defined keywords are deleted. Thus, to retain the existing keywords, you must specify them once more.

When you specify the value R in the parameter Command, the folder/file information is returned. You are not able to define new keywords or a new description. Existing keywords are not deleted.

When you specify a value lower than 1 in the parameter Items, the number of items in the folder or file is not returned.

When you specify a value greater than or equal to 1 in the parameter Items, you determine an upper limit. In this case, the parameter Items returns the number of items that are stored in the folder or file. If the number of items is greater than the upper limit you specified, the value defined in the parameter Items is returned with the notation "+1" (for example, when 300 has been defined in the parameter Items, "300 +1" is returned).

The returned date and time values are based on GMT.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet which contains the folder for which you want to return information.
Password A8 R   The password of the above cabinet.
Folder-name A15 R* X Input: either the name of the folder for which you want to return information or its ISN, not both.
File-name A15 O X Input: either the name of the file within the above folder for which you want to return information or its ISN, not both.
ISN P10 R* X Input: the ISN of the folder or file for which you want to return information. For a folder: either ISN or Folder-name, not both. For a file, either ISN or File-name, not both.
Command A1 R   R=return folder/file information, U=update keywords and return folder/file information.
Keywords A15/1:6 O X You can only specify keywords when you specify the value U in the parameter Command. You can define up to 6 new keywords. A keyword must not contain an asterisk (*). Keywords are helpful when you search for an object.
Description A60/1:2 O X A brief description for the folder or file. For a file, the description has only one line and can be up to 40 characters long (A40).
Items P10 O X See the description above.
Date-created P8   X The date when the folder was created.
Time-created P4   X The time when the folder was created.
Created-ID A8   X The user ID of the person who has created the folder.
Date-modified P8   X The date when the folder was last modified.
Time-modified P4   X The time when the folder was last modified.
Modified-ID A8   X The user ID of the person who has last modified the folder.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
04 ISN was not found
08 Supply either ISN or name, not both
09 ISN does not point to correct object
51 Invalid name
53 Requested object does not exist
54 At least one keyword was invalid
90 An invalid value has been specified in the parameter Command

Subprograms

Z-120
Z-122
Z-175
Z-1200&0

Example

0010 DEFINE DATA
0020 *
0030 LOCAL
0040 *
0050 1 RETURN-CODE               (N2)
0060 1 CABINET                   (A8)
0070 1 PASSWORD                  (A8)
0080 1 FOLDER-NAME               (A15)
0090 1 FILE-NAME                 (A15)
0100 1 ISN                       (P10)
0110 1 COMMAND                   (A1)
0120 1 KEYWORDS                  (A15/1:6)
0130 1 DESCRIPTION               (A60/1:2)
0140 1 ITEMS                     (P10)
0150 1 DATE-CREATED              (P8)
0160 1 TIME-CREATED              (P4)
0170 1 CREATED-ID                (A8)
0180 1 DATE-MODIFIED             (P8)
0190 1 TIME-MODIFIED             (P4)
0200 1 MODIFIED-ID               (A8)
0210 1 #READ-ITEM                (A1)  INIT <'R'>
0220 1 #UPDATE-ITEM              (A1)  INIT <'U'>
0230 1 #LIMIT                    (P10) INIT <300>
0240 1 #ITEMS                    (A4)
0250 1 #UPDATE                   (A1)
0260 *
0270 END-DEFINE
0280 *
0290 INPUT (IP=OFF AD=A'_')
0300         'Cabinet       ' CABINET
0310      /  'Password      ' PASSWORD (AD=N)
0320      /  'Folder        ' FOLDER-NAME
0330      /  'File          ' FILE-NAME
0340 *
0350 * Read folder-file
0360 *
0370 MOVE #READ-ITEM                        TO COMMAND
0380 MOVE #LIMIT                            TO ITEMS
0390 PERFORM INFO-FOLDER
0400 IF   RETURN-CODE EQ 0
0410      IF   ITEMS GT #LIMIT
0420           COMPRESS '>' #LIMIT        INTO #ITEMS LEAVING NO SPACE
0430      ELSE
0440           MOVE ITEMS                   TO #ITEMS
0450      END-IF
0460      INPUT NO ERASE (AD=M'_' IP=OFF)
0470           // 15X FOLDER-NAME (AD=O)
0480           /  15X FILE-NAME (AD=O)
0490           // 'Nr of items   ' #ITEMS (AD=O)
0500           /  'Keywords      ' KEYWORDS (1:3)
0510           /  15X KEYWORDS (4:6)
0520           /  'Description   ' DESCRIPTION (1)
0530           // 'Mark to update' #UPDATE
0540 * Update keywords and description
0550 *
0560      IF   #UPDATE NE ' '
0570           MOVE #UPDATE-ITEM            TO COMMAND
0580           RESET                           ITEMS
0590           PERFORM INFO-FOLDER
0600           IF   RETURN-CODE EQ 0
0610                WRITE 'Information was updated'
0620           ELSE
0630                WRITE 'Information cannot be updated:' RETURN-CODE
0640           END-IF
0650      END-IF
0660 ELSE
0670      WRITE 'Folder or file cannot be accessed:' RETURN-CODE
0680 END-IF
0690 *
0700 DEFINE SUBROUTINE INFO-FOLDER
0710 *
0720 IF   ISN NE 0
0730      RESET                                FOLDER-NAME FILE-NAME
0740 END-IF
0750 CALLNAT 'Z-INF13'
0760      RETURN-CODE
0770      CABINET
0780      PASSWORD
0790      FOLDER-NAME
0800      FILE-NAME
0810      ISN
0820      COMMAND
0830      KEYWORDS (*)
0840      DESCRIPTION (*)
0850      ITEMS
0860      DATE-CREATED
0870      TIME-CREATED
0880      CREATED-ID
0890      DATE-MODIFIED
0900      TIME-MODIFIED
0910      MODIFIED-ID
0920 *
0930 END-SUBROUTINE
0940 END