Parameter list example for DDM

 

The commands in this topic are in a CL program that a user named KAREN on the source server (NEWYORK) is using. The remote location configuration of the target server (CHICAGO) specifies SECURELOC(*YES) for the NEWYORK source server. This action indicates that user IDs are to be sent and that a user profile for KAREN exists on the target server.

The program used by KAREN accesses a DDM file named LOCFILEX that opens a remote file named RMTFILEX on the target server in Chicago. Both servers are iSeries™ servers. The file is being opened for input.

CRTDDMF  FILE(LOCFILEX)  RMTFILE(LIBX/RMTFILEX)
         RMTLOCNAME(CHICAGO)

Open Database File (OPNDBF)  FILE(LOCFILEX)  OPTION(*INP)
Monitor Message (MONMSG)  MSGID(CPF0000)    EXEC(GOTO EXIT)

CLOF  OPNID(LOCFILEX)
EXIT:  End Program (ENDPGM)
When the Open Database File (OPNDBF) command is run on the NEWYORK source server, the DDM file named LOCFILEX is opened. DDM sends a request to the target server to open RMTFILEX in LIBX for input operations. From this information, the target server builds the following parameter list to be used by the user exit program for verification:
KAREN *DDM OPEN RMTFILEX LIBX *N 0 24 CHICAGO NEWYORK 1000

This parameter list shows only the significant characters that would be sent in each field; all the padded blanks and zeros are not shown. For example, the field containing KAREN is padded with five blanks because it is a 10-character field. This parameter list is sent only for the open operation, although several input operations might be performed on RMTFILEX.

This parameter list is sent to the user exit program specified on the DDMACC parameter of the Change Network Attributes (CHGNETA) command. The user exit program determines if user KAREN is authorized to open RMTFILEX. If she is authorized, the program returns a 1 in the return code field, and she can open the file and perform read operations. If the program returns a 0 in the return code field, user KAREN receives a message in the job log indicating that she is not authorized to use the file.

When all the input operations are completed, the Close File (CLOF) command runs on the source server, and DDM sends the request to close the file.

 

Parent topic:

DDM server access control exit program for additional security