SSA coding rules

Use the following rules for coding a segment search argument.

  • Define the SSA in the data area of your program.
  • The segment name field must:
    • Be 8 bytes long. If the name of the segment you are specifying is less than 8 bytes long, it should be left justified and padded on the right with blanks.
    • Contain a segment name that has been defined in the DBD that your application program uses. In other words, make sure you use the exact segment name, or your SSA will be invalid.
    • Start of changeOr, if the DL/I call uses command code O, the segment field name is the starting offset and length of the data that you want to retrieve. The starting offset is relative to the physical segment definition and starts with 1. The maximum length that can be retrieved is the maximum segment size for the database type, and the minimum length is 1. The two fields are specified instead of a standard field name in the following format: 'oooollll'. oooo is the offset position and llll is the length of the data that you want to retrieve.End of change
  • If the SSA contains only the segment name, byte 9 must contain a blank.
  • If the SSA contains one or more command codes:
    • Byte 9 must contain an asterisk (*).
    • The last command code must be followed by a blank unless the SSA contains a qualification statement. If the SSA contains a qualification statement, the command code must be followed by the left parenthesis of the qualification statement.
  • If the SSA contains a qualification statement:
    • The qualification statement must begin with a left parenthesis and end with a right parenthesis.
    • There must not be any blanks between the segment name or command codes, if used, and the left parenthesis.
    • The field name must be 8 bytes long. If the field name is less than 8 bytes, it must be left justified and padded on the right with blanks. The field name must have been defined for the specified segment type in the DBD the application program is using.
    • The relational operator follows the field name. It must be 2 bytes long and can be represented alphabetically or symbolically. The following table lists the relational operators.
      Table 1. Relational operators
      Symbolic Alphabetic Meaning
      =b= EQ Equal to
      >= or => GE Greater than or equal to
      <= or =< LE Less than or equal to
      >b> GT Greater than
      <b< LT Less than
      ¬= or =¬ NE Not equal to
    • Start of changeThe comparative value follows the relational operator. The length of this value must be equal to the length of the field that you specified in the field name. This length is defined in the DBD. The comparative value must include leading zeros for numeric values or trailing blanks for alphabetic values as necessary. The comparative value cannot include any parenthesis.End of change
  • If you are using multiple qualification statements within one SSA (Boolean qualification statements), the qualification statements must be separated by one of these symbols:
    * or &
    Dependent AND
    + or |
    Logical OR
    #
    Independent AND

    One of these symbols must appear between the qualification statements that the symbol connects.

  • The last qualification statement must be followed by a right parenthesis.

An SSA created by the application program must not exceed the space allocated for the SSA in the PSB.

Related reading: For additional information about defining the PSB SSA size, see the explanation of the PSBGEN statement in IMS Version 13 Database Utilities.