Hi, I was running a simple SQL select from the Run SQL script
utility on Access client solutions
(ACS) and was getting a SQL error code: -204 and SQLSTATE: 42704
select * from testlib.pf111
SQL State: 42704
Vendor Code: -204
Message: [SQL0204] PF111 in TESTLIB type *FILE not found. Cause . . . . . : PF111 in TESTLIB type *FILE was not found. If the member name is *ALL, the table is not partitioned. If this is an ALTER TABLE statement and the type is *N, a constraint or partition was not found. If this is not an ALTER TABLE statement and the type is *N, a function, procedure, trigger or sequence object was not found. If a function was not found, PF111 is the service program that contains the function. The function will not be found unless the external name and usage name match exactly. A function is not considered as a candidate unless the user has the EXECUTE privilege for the function. Examine the job log for a message that gives more details on which function name is being searched for and the name that did not match. Recovery . . . : Change the name and try the request again. If the object is a node group, ensure that the DB2 Multisystem product is installed on your system and create a nodegroup with the CRTNODGRP CL command. If an external function was not found, be sure that the case of the EXTERNAL NAME on the CREATE FUNCTION statement exactly matches the case of the name exported by the service program.
Just for your information, the file I am querying from the library testlib
is present on iasp device
on iASP machine
and not on system asp *SYSBAS
. This may be the reason why I am not able to see the contents of this file from the library present on iASP device
using Run SQL script
. However, if I query the same file from IBM I green screen by setting the ASP group using the command SETASPGRP iasp1
in testlib
library then I was able to see the result.
What settings I am missing in Run SQL script
for ASP device
or how can I query the files in those libraries which are present on iASP device
on the IBM i machine?
I also tried to query the file in a library in *SYSBAS system asp
then I was able to see data from the Run SQL script. What should I set in the Run SQL script
to see the data of the file in the library present in the iASP device
?
You can run SQL queries on files present in the library in an ASP device using 2 ways:
Schemas tool
in IBM iAccess client solutions
(ACS) and run your SQL scripts from a specific database(ASP device) since each ASP device is a separate database. You need to right-click on theASP device
and select the optionRun SQL Scripts
and now you can run your SQL scripts on the selectedASP device
on the IBM i machine.Run SQL Scripts tools
in IBM iAccess client solutions
(ACS) and under theConnections
menu, selectConnect to Database…
dialog box appears, and select thedatabase
from the drop-down. There you notice all of your ASP devices present in the drop-down list. Select yourASP device
and clickOK
. Run theSQL Script utility
and start creating thenew connection
to theASP device
and now you will be able to run your SQL query and select file data from the library present on the selectediASP device
.