I dont have any AIX system but if the system doesn’t have a service pack, it would throw that singular expression error as indicated by @FatScottishGuy . If the inspectors for AIX follow the same concept as other platforms you can possibly pluralize the statement so systems with no service pack return an empty result instead of a singular expression error but as I do not manage any AIX systems, I can’t say for sure that will avoid your issue, ie
I have one confusion here. As per your comments, if the system doesn’t have a service pack, it would throw singular expression error. Then why are we getting output for oslevel -s command with the correct service pack level for these servers?
My confusion is why are the commands and inspectors behaving in a different way?
I can’t give an answer to that per say as I have no AIX experience but my frist thought would be to check the version of AIX is supported by the version of the agent. I see from the release page the 9.5.x agents are certified for v6.1 and the 10.x agents are required for v7 so one possible option could be if you have 9.5.x on AIX 7 and the inspectors do not fully support the OS version. This same scenario can exists in other platforms, eg a 9.2 agent will not fully support all aspects of say a Windows 10 21H2 OS so may miss-resport on certain inspectors.
If the OS version and agent version combination are fully support, you might consider opening a support case so the issue can be checked out.