CA IDMS IUA EIUA

Re:Re: Mulitasking & DC-COBOL Programs

  • 1.  Re:Re: Mulitasking & DC-COBOL Programs

    Posted 11-20-2006 10:58 AM
    Bill,

    As you suspected DC Cobol programs should be sysgened with MPMODE ANY
    and not with MPMODE SYSTEM (which incidentally also default to SYSTEM if
    MPMODE is not specified). Here's some information which might help to
    clarify the subject.

    In a multitasking environment, the system must control the order in
    which tasks are executed, so that no two tasks simultaneously do the
    same work in the same address space.

    You can specify at system generation that an application will run with
    an MPMODE of ANY or SYSTEM (the default) if MPMODE is not specified for
    the program.

    SYSTEM means that DC/UCF determines the MPMODE at run time.

    If you MOD PROG xxxxxxxx MPMODE SYSTEM or leave it to default to SYSTEM,
    IDMS will set the MPMODE as follows:

    - If ADS dialog use MPMODE ANY
    - If Reentrant Cobol program without storage protection use ANY
    - If Reentrant Cobol program with storage protection use USER
    - If Quasireentrant Cobol program without storage protection use
    DC
    - If Quasireentrant Cobol program with storage protection use USER
    - If Assembler program without storage protection use DC (DC is
    chosen because an assembler program may update DC control blocks)
    - If Assembler program is ADSOMAIN without storage protection use
    ANY
    - If Assembler program is ADSOMAIN with storage protection use
    USER (this is reason why ADSOMAIN and ADSORUN1 should be defined
    without storage protection to avoid running under USER MPMODE which
    degrade MT performance)

    If you MOD PROG xxxxxxxx MPMODE ANY

    - If ADS dialog use ANY
    - If Cobol and Assembler programs without storage protection use
    ANY
    - If Cobol and Assembler programs with storage protection use
    USER

    Programs that run with MPMODE=ANY don't need any MPMODE locking. They
    can run simultaneously on every CPU.


    For the other MPMODE only 1 task is allowed so that no two tasks with
    the same MPMODE can be executed simultaneously in the same address
    space. For example if one task runs with MPMODE=DC no other task is
    allowed to use this DC MPMODE. If it needs it, it has to wait.

    If you need to Vary Program MPMODE Dynamically, you need to disable the
    program first

    d v program ALCGL01O disable
    d v program ALCGL01O define MPMODE SYSTEM .
    d v program ALCGL01O enable

    Regards,
    Paul Mak