Create Data Area (CRTDTAARA) command

The Create Data Area (CRTDTAARA) command creates a data area and stores it in a specified library. It also specifies the attributes of the data. The data area can be optionally initialized to a specific value.

You can create a DDM data area by specifying *DDM on the TYPE parameter. The DDM data area is used as a reference data area by programs to access data areas located on a remote (server) system in the DDM network. Programs on the local (client) system reference a remote data area by the DDM data area's name, not by the remote data area's name. (The DDM data area name can be the same as the remote data area name.)

The DDM data area (on the client system) contains the name of the remote data area and the name of the remote (server) system on which the remote data area is located.

The DDM data area can be used with the Retrieve Data Area (RTVDTAARA) command and the Change Data Area (CHGDTAARA) command to retrieve and update data areas on remote servers. A DDM data area can also be used with the Retrieve Data Area (QWCRDTAA) API.

Consider the following items when using this command with DDM:

  • The RMTDTAARA parameter is the name of the remote data area on the target server. The data area does not need to exist when the DDM data area is created.
  • The RMTLOCNAME parameter is the name of the remote location that is used with this object. Multiple DDM data areas can use the same remote location for the server system. RMTLOCNAME must point to a server system that is a IBM i product running at a release of IBM i that supports remote data areas. The possible values for RMTLOCNAME include:
    • remote-location-name: Specifies the name of the remote location that is associated with the server system. The remote location, which is used in accessing the server system, does not need to exist when the DDM data area is created, but it must exist when the DDM data area is accessed.
    • *RDB: The remote location information for the relational database entry specified in the relational database (RDB) parameter is used to determine the remote system.
  • The DEV parameter is the name of the APPC device description on the source server that is used with this DDM data area. The device description does not need to exist when the DDM data area is created.
  • The LCLLOCNAME parameter is the local location name.
  • The MODE parameter is the mode name that is used with the remote location name to communicate with the server system.
  • The RMTNETID parameter is the remote network ID in which the remote location resides that is used to communicate with the server system.

Consider the following restrictions when using this command with DDM:

  • You cannot create a DDM data area using the names *LDA, *GDA, or *PDA.
  • You cannot create a data area remotely. This function can be done remotely by using the Submit Remote Command (SBMRMTCMD) command.
  • You can remotely display data areas by using the SBMRMTCMD command.
  • You can display the contents of remote data areas by using the Display Data Area (DSPDTAARA) command; specify *RMT on the SYSTEM parameter. The data in the data area is displayed in the same format as that used for local data areas, with the exception of the TEXT field, which is the text description provided when the DDM data area was created. If you specify *LCL on the SYSTEM parameter for a DDM data area, the output looks similar to the following display:
 Data area . . . . . . . :     DDMDTAARA
 Library . . . . . . . :        DDMLIB
 Type    . . . . . . . . . :   *DDM
 Length    . . . . . . . . :   62
 Text    . . . . . . . . . :   'This is a DDM data area'
 
           Value
 Offset        *...+....1....+....2....+....3....+....4....+....5
    0         '*LOC      *NETATR SYSTEMA *LOC    *LOC    LCLDTAAR'
   50         'A LCLLIB    '

Use the following chart to interpret the values:

Table 1. Offset values
Offset DDMDTAARA fields
1-10 DEV
11-18 MODE
19-26 RMTLOCNAME
27-34 LCLLOCNAME
35-42 RMTNETID
43-52 RMTDTAARA (name)
53-62 RMTDTAARA (library)