Before using Net.Data, you need to ensure that the user IDs under which Net.Data executes have the appropriate access rights to objects that are referenced in a Net.Data macro and to the macro that a URL references.
More specifically, ensure that the user IDs under which Net.Data executes have the following authorizations:
Examples:
Depending on the file system in which you choose to store your Net.Data macros, you need to authorize the user profile under which the Net.Data CGI program is run to the Net.Data macro. The following methods give the QTMHHTP1 user profile authority (in V3R2 and V3R7, Internet Connection for AS/400 ran CGI programs only under the QTMHHTP1 user profile.):
CHGAUT OBJ('/WWW') USER(QTMHHTP1) DTAAUT(*RX) CHGAUT OBJ('/WWW/macro') USER(QTMHHTP1) DTAAUT(*RX) CHGAUT OBJ('/WWW/macro/*') USER(QTMHHTP1) DTAAUT(*RX)
You need to give authority to all objects in the path.
GRTOBJAUT OBJ(WWW) OBJTYPE(*LIB) USER(QTMHHTP1) AUT(*USE) GRTOBJAUT OBJ(WWW/MACRO) OBJTYPE(*FILE) USER(QTMHHTP1) AUT(*USE)
You need to give authority only to the library and the source physical file.
You can also use the CHGAUT CL command to give authority to objects in the QSYS.LIB file system as follows:
CHGAUT OBJ('/QSYS.LIB/WWW.LIB') USER(QTMHHTP1) DTAAUT(*RX) CHGAUT OBJ('/QSYS.LIB/WWW.LIB/MACRO.FILE') USER(QTMHHTP1) DTAAUT(*RX)
Language environment-specific authority considerations are documented in each language environment section in Using Language Environments.