The initial request

In COBOL pseudocode, DFH0SAL1 creates and starts an instance of the Sale business transaction. The initial request to start a Sale business transaction is handled by the DFH0SAL0 and DFH0SAL1 programs.

When a terminal user selects the Sale menu option by typing SALM, the menu program DFH0SAL0 links to the DFH0SAL1 program to service the request. The DFH0SAL1 program establishes a unique reference for this instance of the Sale business transaction and starts it.

Figure 1. Pseudocode for the DFH0SAL1 program. DFH0SAL1 creates and starts an instance of the Sale business transaction.
Identification Division.
Program-id. DFH0SAL1.
Environment Division.
Data Division.
Working-Storage Section.
01  Sales-Reference               pic x(36) value low-values.
    .
01  Process-Type                  pic x(8)  value 'Sales'.
    .
Linkage Section.
01  DFHEIBLK.
    .
01  DFHCOMMAREA.
    .
Procedure Division using DFHEIBLK DFHCOMMAREA.
In-The-Beginning.
    .
    .. create unique sales reference ..
    .
    EXEC CICS DEFINE PROCESS(Sales-Reference) PROCESSTYPE(Process-Type)
                 TRANSID('SALE')
                 PROGRAM('DFH0SAL2')
             RESP(data-area) RESP2(data-area) END-EXEC
      .
    EXEC CICS RUN ACQPROCESS
                 SYNCHRONOUS
             RESP(data-area) RESP2(data-area) END-EXEC
    .
    EXEC CICS RETURN END-EXEC
End Program.