IBM Support

How to Find IFS Files that Have the Can be Saved (*ALWSAV) Attribute Set to *NO

Troubleshooting


Problem

This document describes how to find a list of IFS files on the system or in a specific directory that have the attribute *ALWSAV set to *NO

Resolving The Problem

Disclaimer: This document contains code made available by IBM Corporation on an as is basis. Anyone receiving this document is considered to be licensed under IBM copyrights to use the IBM-provided source code in any way he or she deems fit, including copying it, compiling it, modifying it, and redistributing it, with or without modifications. No license under any IBM patents or patent applications is to be implied from this copyright license.


IFS objects on a System i can be set so that they are allowed to be saved or not saved using the CHGATR ATR(*ALWSAV) command.

To get a list of all files that have the Can be saved attribute set to No, at V5R4M0 and above, the following commands can be run:
1.RTVDIRINF DIR('/directory_name')

The database files will be created with a unique prefix generated by this command. The prefix will begin with QAEZD followed by four digits. The files created to store the collected information will be named using this prefix followed by either the letter 'D' (for the file which contains directory information) or the letter 'O' (for the file that contains information about objects in directories). For example, the first time the command is run with *GEN specified, files QAEZD0001D and QAEZD0001O will be created in the library specified by the INFLIB parameter. Informational message CPI1E30 will be sent to the job log and will contain the names of the files created.
2.

3.
Take note of the two files in the CPI1E30 message.

CHGJOB CCSID(37)
4.Issue the following STRSQL command:

SELECT T01.QEZNONSAV, T01.QEZOBJNAM, T02.QEZDIRNAM1 FROM QUSRSYS/QAEZD0001O T01, QUSRSYS/QAEZD0001D T02 WHERE T01.QEZDIRIDX = T02.QEZDIRIDX AND QEZNONSAV = '1'

This will list all files that have the Can be saved attribute (*ALWSAV) set to No.

Note: Running this for the root (/) directory or large directories can take a long time and could lock files.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

514219745

Document Information

Modified date:
11 November 2019

UID

nas8N1013208