COBOL

Figure 1, in COBOL, redefines the NETNAME, so that the last four characters are used to select a more suitable model than that selected in the sample control program.
Figure 1. Example of how to customize the DFHZCTDX sample program
                    .
      *
      * Redefine the netname so that the last 4 characters (of 7)
      * can be used to select the autoinstall model to be used.
      *
      * The netnames to be supplied are known to be of the form:
      *
      *      HVMXNNN
      *
      * HVM is the prefix
      * X   is the system name
      * NNN is the address of the terminal
      *
        01  NETNAME-BITS.
            02  FIRST-CHRS PIC X(3).
            02  NEXT-CHRS.
                03 NODE-LETTER PIC X(1).
                03 NODE-ADDRESS PIC X(3).
            02  LAST-CHR PIC X(1).
                    .
                    .
       PROCEDURE DIVISION.
                    .
                    .
      *
      * Select the autoinstall model to be used according to the
      * node letter (see above). The models to be used are user
      * defined.
      *
      * (It is assumed that the netname supplied in the commarea by CICS
      * has been moved to NETNAME-BITS).
      *
      * If the node letter is C then use model AUTO2
      * If the terminal netname is HVMC289 (a special case) then use
      * model AUTO1.
      * Otherwise (node letters A,B,D...) use model AUTO3.
      *
           IF NODE-LETTER = 'C' THEN MOVE 'AUTO2' TO SELECTED-MODELNAME.
           IF NEXT-CHRS = 'C289' THEN MOVE 'AUTO1' TO SELECTED-MODELNAME.
           IF NODE-LETTER = 'A' THEN MOVE 'AUTO3' TO SELECTED-MODELNAME.
           IF NODE-LETTER = 'B' THEN MOVE 'AUTO3' TO SELECTED-MODELNAME.
           IF NODE-LETTER = 'D' THEN MOVE 'AUTO3' TO SELECTED-MODELNAME.
                     .
                     .


dfha3c00201.html | Timestamp icon Last updated: Sunday, 4 June 2017