Command reference / ifs

CHGCURDIR

Change Current Directory

Sets the current working directory for relative path resolution. A directory, library, folder, or database file can serve as the working directory.

Allowed environments: *ALL. Positional parameters: 1.

Parameters

DIR Directory

Sets the path name of the directory that replaces the current working directory of the job.

Type
*CHAR
Required
Yes
Length
5000
Case
Mixed case

Examples

CHGCURDIR DIR(/DIRECTORY2)

Changes the current directory to the directory named DIRECTORY2.

CHGCURDIR DIR('..')

Changes the current directory to the parent directory of the directory that contains the current directory before this command is run.

IBM command documentation

Generated from os/cl/catalog/CHGCURDIR.json and os/cl/help/CHGCURDIR.json.