REC Parameter with Accessing SQL Defined Tables

REC parameters are automatically generated in the precompile phase to describe each SQL column retrieved in the CA Culprit input buffer. Additional REC parameters are also generated for null indicators, whenever appropriate.
idmscu19
REC parameters are automatically generated in the precompile phase to describe each SQL column retrieved in the CA Culprit input buffer. Additional REC parameters are also generated for null indicators, whenever appropriate.
Syntax
      Col       2       ▼ ►►─── REC ─── 
field-name
 ─── 
start-pos
 ─── 
field-size
 ────────────────────────►  ►─── 
data-type
 ───┬──────────────┬───────────────────────────────────────────►◄                    └─ DP = 
scale
 ─┘
Syntax Rules
  • field-name
    The
    field-name
    for generated REC cards is the alias name, if one was assigned using an AS clause. Otherwise, the field name is simply the SQL column name.
    For generated null indicator REC cards, the field-name from the previous REC card is used along with a suffix. You can use the default suffix _NULL_IND, or use _I by setting the SQLIND parameter in the profile to I.
  • start-pos
    Represents the starting position of each field within the CA Culprit input buffer. The first SQL column starts at position 49. Positions 1-48 are reserved for internal use.
  • field-size
    Is the size in bytes of the SQL column. For generated null indicators, the size is always 4.
  • data-type
    Is the CA Culprit data type code. A blank represents alphanumeric data. For generated null indicators, the data type is always 1 (binary).
    The table below describes the correspondence between CA IDMS/DB and CA Culprit data representations. CA IDMS/DB has many new data types that are not yet fully supported by CA Culprit. These unsupported data types are indicated by an asterisk in the table, and are treated as alphanumeric fields. Procedure exits and other type 7 programming logic can be used to process these data values during the extract phase: (Error: Don't know what to do with column width of "25," (3).(Error: Don't know what to do with column width of "8," (3).(Error: Don't know what to do with column width of "8," (3).
CA IDMS/DB data type
Size
Type
DP=
CHAR(15)
15
 
 
NUMERIC(5,2)
5
2
2
UNSIGNED NUMERIC(5,2)
5
2
2
DECIMAL(5,2)
3
3
2
UNSIGNED DECIMAL(5,2)
3
3
2
INTEGER
4
1
 
SMALLINT
2
1
 
LONGINT
8
1
 
FLOAT *
4 or 8
 
 
REAL *
4
 
 
DOUBLE PRECISION *
8
 
 
VARCHAR(10) *
12
 
 
DATE *
10
 
 
GRAPHIC(5) *
10
 
 
VARGRAPHIC(5) *
12
 
 
BINARY(5) *
5
 
 
  • DP=
    scale
    Represents the number of decimal places that are implied for a zoned or packed decimal number.
REC Values During EXTRACT
During the extract phase, rows from the SQL table are returned to the CA Culprit input buffer, one by one.
  • If SQL column "ABC" is not null, the ABC_NULL_IND field is set to zero, and the ABC field contains the actual data value.
  • If ABC is null, the value of ABC_NULL_IND is set to minus one. The value in the ABC field is set to zero or blanks.