odcs_ts routine

Top  Previous  Next

The odcs_ts routine is invoked by XCICS/TS Online Data Conversion System (ODCS) to convert the temporary storage records, whenever a TS queue is accessed on or by remote EBCDIC systems.

Normally the ODCS routines have per-resource definition, but temporary storage queues, which require no configuration, represent and exception: because of that user need to define one converter routine for all TS queue: the odcs_ts exit program.

In this case the routine must be smart enough to recognize by itself (using the information provided by XCICS) the data being converted.

The odcs_ts routine must conform to the rules defined by the XCICS/TS Online Data Conversion System (ODCS).

I.e.

int my_ts_conv(struct xcics_conversion_info *ci) {
    if (strcmp(ci->target, "QUEUE01X")==0) {
        if (ci->direction==CONVERT_ASCII_TO_EBCDIC) {
            CICSCONV_A2E_CHAR(ci->area, ci->length);
        } else {
            CICSCONV_E2A_CHAR(ci->area, ci->length);
        }
        return 0;
    }
    if (strcmp(ci->target, "PQQU0000")==0) {
        if (ci->direction==CONVERT_ASCII_TO_EBCDIC) {
            CICSCONV_A2E_ZONED(ci->area, 8);
            CICSCONV_A2E_CHAR(ci->area, ci->length-8);
        } else {
            CICSCONV_E2A_ZONED(ci->area, ci->length-8);
            CICSCONV_E2A_CHAR(ci->area, ci->length-8);
        }
        return 0;
    }
    return 0;
}

For further information on ODCS routines please refer to the "On-line Data Conversion" section.