Specifying the I/O areas

Use an I/O area to pass segments between the application program and IMS.

What the I/O area contains depends on the type of call you are issuing:

  • When you retrieve a segment, IMS places the segment you requested in the I/O area.
  • When you add a new segment, you first build the new segment in the I/O area.
  • Before modifying a segment, your program must first retrieve it. When you retrieve the segment, IMS places the segment in an I/O area.

The format of the record segments you pass between your program and IMS can be fixed length or variable length. Only one difference is important to the application program: a message segment containing a 2-byte length field (or 4 bytes for the PLITDLI interface) at the beginning of the data area of the segment.

The I/O area for IMS calls must be large enough to hold the largest segment your program retrieves from or sends to IMS.

If your program issues any Get or ISRT calls that use the D command code, the I/O area must be large enough to hold the largest path of segments that the program retrieves or inserts.