I am doing some testing with file attributes that I want to automate. I have been using the DSPFD command to print the attributes of the file. I would now like to automate that. I tried dumping the output of the command to an outfile and then using FNDSTRPDM to find out if the attribute was set correctly. The outfile is a database file so the fndstrpdm doesn't really work for me as my output is in hex.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: 10 &nbspReplies

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Since you have a database, you could use the command DSPPFM (Display physical file member) it has a search like find string.
But the query/400 tool is very easy to use .. WrkQRY command will start it. Plenty of info on it available on the Web or come back here with your questions.
Phil

Tom - I am looking at many different attributes - I am testing a software product and I want to be able to easily verify in an automated way that certain attribs are being set correctly via the software when it creates a file. (alwdlt, alwupt, delpct,expdate,etc) There will be many tests so I was trying to keep as simple as possible. I will take a look at the query interface - Thanks for your help

If youi're looking for the attributes of the file, you're using the right command, dspfd, just dump it to an *outfile. You'll need to provide the file name and library. Then query the resulting database file.

I am testing a software product and I want to be able to easily verify in an automated way that certain attribs are being set correctly...
In that case, you probably want a basic CL program that does most/all of the work.
Try these two commands to get some background on what happens:

The DSPFD command converts the attributes of one of the system files on your system into an outfile. The RUNQRY command does a basic query of the content of the outfile. The outfile is created in QTEMP, so it will disappear when you sign off of your session.
That system file is one of the "model" files that are supplied with your system. In fact, it's the model that is used by the DSPFD command when you request TYPE(*ATR) for FILEATR(*PF) files. So the DSPFD command is retrieving the attributes of the file that defines what the output of the DSPFD output will contain -- kind of a circular reference there. (It seemed like a good example to use.)
By looking at what RUNQRY shows, you can see if the attributes that you're looking for are supplied. If they are, then the rest is fairly straightforward. If they aren't, then we need to know what else you need to see.
Post back if this is a direction we can go or not.
Tom

Thanks Tom.
I am going to try the CL programming. I have done some things in CL but by no means an expert. My background is MVS - Z/os. I do not have a development background so things get tricky for me sometimes.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy