The field names for the file (xxxx/AIR) are automatically declared to the CL (I am assuming that they are S and USER) If they are then just remove the DCL statements for these and it should work. If they are not then just prefix the actual names with & and use them instead.
First, get rid of all processing of spooled files. There is no need to process the QPSECUSR or the QPQUPRFIL spooled file. There are almost always better, faster and simpler ways of doing it. Further, it’s almost always closer to be certain to be correct if you do it in more correct ways.
Since you’re a beginner at CL programming, the best start for you will be:
DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/XXXXXX)</pre>
List the user profiles to a real output file and read that file in your CL program. Don’t try reading a spooled file.