Z-MOD13

This document covers the following topics:


Description

Modify a folder. You can also modify a system folder or a TRS folder.

You can rename the folder or any file it contains. You can modify the description and the sorting sequence. The sorting sequence can only be modified for a folder. The sequence of a file is always that of the corresponding folder.

You must always specify the parameter New-folder-name. If you do not want to rename the folder (e.g. if you only want to modify the description), you must specify the same name in the parameters Folder-name and New-folder-name. Accordingly, when you modify a file, you must specify the parameter New-file-name. If you do not want to rename the file, you must specify the same name in the parameters File-name and New-file-name.

Note:
Renaming a folder or file does not create a new folder or file.

You can modify the description of either a folder or a file. You cannot modify both at the same time. When you specify the parameter File-name, you can only modify the description of the file. When you want to modify the description of the folder, the parameter File-name must be blank. In contrast to the description of a folder (A60/1:2), the description of a file has only one line and can be up to 40 characters long (A40). When you modify a folder or file and want to keep the existing description, you must specify it once more.

You cannot add files with Z-MOD13. To add a file, you must use Z-ADD13.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the folder is to be modified.
Password A8 R   The password of the above cabinet.
Folder-name A15 R   Either the name of the folder to be modified, or the name of the folder in which the file to be modified is stored.
File-name A15 O   The name of the file to be modified. When specified, you can only modify the description of the file.
New-folder-name A15 R   This must always be specified. If you do not want to rename the folder, you must specify the same name as in Folder-name.
New-file-name A15 O   When you want to modify a file, you must specify this parameter. If you do not want to rename the file, you must specify the same name as in File-name.
Folder-sequence N1 R   The sorting sequence for a folder: 1 (ascending by date), 2 (descending by date), or 3 (user-defined). The Inbasket, Outbasket and Wastebasket cannot use sorting sequence 3. The sorting sequence for a file must be 0.
Description A60/1:2 O   To modify the description of a folder, the File-name must be blank. For a file the description has only one line and can be up to 40 characters long (A40).

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
55 Requested folder/file does not exist
73 Invalid folder/file name
74 Folder/file already exists
92 File name is required
95 Invalid sequence
96 Sorting sequence cannot be modified for a file

Subprograms

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

Example

0010 DEFINE DATA LOCAL
0020 1 RETURN-CODE      (N2)
0030 1 CABINET          (A8)
0040 1 PASSWORD         (A8)
0050 1 FOLDER-NAME      (A15)
0060 1 FILE-NAME        (A15)
0070 1 NEW-FOLDER-NAME  (A15)
0080 1 NEW-FILE-NAME    (A15)
0090 1 FOLDER-SEQUENCE  (N1)
0100 1 DESCRIPTION      (A60/1:2)
0110 *
0120 END-DEFINE
0130 *
0140 INPUT 'CABINET     :' CABINET /
0150   'PASSWORD        :' PASSWORD /
0160   'FOLDER-NAME     :' FOLDER-NAME /
0170   'FILE-NAME       :' FILE-NAME /
0180   'NEW-FOLDER-NAME :' NEW-FOLDER-NAME /
0190   'NEW-FILE-NAME   :' NEW-FILE-NAME /
0200   'FOLDER-SEQUENCE :' FOLDER-SEQUENCE /
0210   'DESCRIPTION     :' DESCRIPTION (*)
0220 *
0230 CALLNAT 'Z-MOD13' RETURN-CODE
0240   CABINET
0250   PASSWORD
0260   FOLDER-NAME
0270   FILE-NAME
0280   NEW-FOLDER-NAME
0290   NEW-FILE-NAME
0300   FOLDER-SEQUENCE
0310   DESCRIPTION (*)
0320 *
0330 IF RETURN-CODE EQ 0
0340   WRITE 'Folder/file was modified'
0350 ELSE
0360   WRITE 'Folder/file could not be modified:' RETURN-CODE
0370 END-IF
0380 *
0390 END