public Parser cicsWriteFile() {
        if (cicsWriteFileParser == null) {
           FutureParser future = scoped("cicsWriteFile");
           cicsWriteFileParser = future;
           future.setParser(
               sequence(
                   token("WRITE"),
                   choice(
                       token("FILE"),
                       token("DATASET")
                   ),
                   token("("),
                   fileName(),
                   token(")"),
                   permuted(
                       sequence(
                           choice(
                               token("SYSID"),
                               token("SYS")
                           ),
                           token("("),
                           cicsSysid(),
                           token(")")
                       ),
                       sequence(
                           token("FROM"),
                           token("("),
                           dataArea(),
                           token(")"),
                           optional(
                               sequence(
                                   token("LENGTH"),
                                   cicsWaterInBrackets()
                               )
                           )
                       ),
                       sequence(
                           token("RIDFLD"),
                           cicsWaterInBrackets(),
                           optional(
                               sequence(
                                   token("KEYLENGTH"),
                                   cicsWaterInBrackets()
                               )
                           )
                       ),
                       choice(
                           token("RBA"),
                           token("XRBA"),
                           token("RRN")
                       ),
                       token("MASSINSERT"),
                       token("NOSUSPEND")
                   )
               )
           );
        }

        return cicsWriteFileParser;
    }