Iseries AS400 File Attributes

On the IBM AS/400 where are the attributes of a file stored?  Do they reside with the file?

Is there a command to display the attributes of a file that is stored on a tape?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave FordSoftware Developer / Database AdministratorCommented:
Normally, the attributes of a file are associated with that file itself. You'd access that info with the DspFd command.

DspPd MyLibrary/MyFile

If the file is only on tape, I think you'd have to restore it to the file-system first.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SCDFITAuthor Commented:
I am interested in one of the file attributes at the time of a file was saved to tape.  I have used the DSPOBJD command and learned that the attribute had been changed.  That is why I was wondering if the attributes remain with the file when it is saved to tape.
Dave FordSoftware Developer / Database AdministratorCommented:
I suppose that depends on what attribute you're interested in. To my knowledge, all attributes follow the file itself, except things like "Last change date/time" and "Last restore date/time"

Gary PattersonVP Technology / Senior Consultant Commented:
In general, IBM i objects are self-contained, so the answer is "yes" - attributes are saved.

For example, a physical file contains object attributes, file attributes, attributes for each member, file data (possibly segmented into multiple members) including fixed length data space and overflow space (for variable length data over the allocated length and LOBs).  All of that is saved to tape as part of the member.

One thing that isn't stored as part of the object are private authorities. Private authorities are saved as part of the user profile.

Some of these attributes, of course, are updated during save/restore operations: like last restore date, as daveslash mentions above.

DSPTAP DATA(*SAVRST) will show some very basic information about each saved object, including size, but in order to view most of the attributes of an object stored on tape, you'll need to restore the object.  You can always restore the saved object to a different library, where you can examine all of the attributes using DSPOBJD/DSPFD commands.

It is possible to use the DMPTAP command to dump raw save/restore data, but this is very difficult to decode unless you have a knowledge of the internal structure of the object.
Abishek SrivastavaCommented:
You can use DSPFD to check file level attributes and DSPFFD to check field level
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.